I'm fairly sure you're not going to be able to do that. On a BS2 the quickest commands take about ten times that much time, and even on the faster Stamp chips commands take more than four times that much time.
Now having said that, someone will pop in here with a brilliant trick to make it work. Just watch.
Indeed ,the PULSOUT command can be used in replacement of a PAUSE command; however the PAUSE command doens't effect the I/O line that a PULSOUT command would. That would be something to take into account if you wanted to use the PULSOUT command as apposed to the PAUSE.
lol Thanks [noparse]:)[/noparse] I guess if the commands themselves make that long of a pause just to process then I am good. I just have to
send an output the raise a pin high for 10 us minimum. I know I could just pause a milliseconds but this needs to be as efficient as possible. From what that command time webpage shows a simple Pin HIGH to Pin LOW takes 140 us each so just setting the Pin low is pause enough.
No. SHIFTOUT can only send individual values up to 16 bits. You can list several array elements in one SHIFTOUT statement, but there's no automatic handling of an array. That's not a bad restriction because of the limited number of bytes of variables available on the Stamps. You can also put several SHIFTOUT statements in a row to handle larger amounts of data.
re: pauses, Basic Stamps run fairly slowly, and just executing interpreted commands takes time. Just how much time, see great timing info at http://www.emesys.com/BS2speed.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ ·"If you build it, they will come."
Comments
Now having said that, someone will pop in here with a brilliant trick to make it work. Just watch.
Depends what you're trying to accomplish.
A BS2, 2e, 2pe can PULSOUT in 2us increments, a 2sx, 2p, 2px can PULSOUT in 0.8us increments.
Indeed ,the PULSOUT command can be used in replacement of a PAUSE command; however the PAUSE command doens't effect the I/O line that a PULSOUT command would. That would be something to take into account if you wanted to use the PULSOUT command as apposed to the PAUSE.
I hope this helps
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
* You know, the people you have to drive behind, and cope with at the supermarket, and so on.
send an output the raise a pin high for 10 us minimum. I know I could just pause a milliseconds but this needs to be as efficient as possible. From what that command time webpage shows a simple Pin HIGH to Pin LOW takes 140 us each so just setting the Pin low is pause enough.
PULSOUT pin, 5 -- That's a 10usec lo-hi-lo transition (assuming the pin is in a Lo state to begin with)·and that's the bottom line on efficiency.
·
What's going on here?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."