Question about reading rapid signals
MG
Posts: 9
I'm am working a project which involves sending high (external) signals ("1's") to an input pin of the BS2 at a rapid rate. The rate may get up to about 50 or so high signals in 3 seconds.
I would like the BS2 to receive those signals and tell me how much 1's it receives within the 3 second block while it continues to read the signals for the next 3 seconds.
What would the code for this look like?
I would like the BS2 to receive those signals and tell me how much 1's it receives within the 3 second block while it continues to read the signals for the next 3 seconds.
What would the code for this look like?
Comments
Up to a point you can do what you're looking to do by using the PBASIC COUNT command. However, the Stamp is a single threaded device and as such does but one thing at a time, so it's possible to lose part of your count while the prior count is being displayed.
It's certainly worth a try to see if it can keep up. If not, you might want to opt for a faster Stamp like the BS-2SX or BS-2PX. The BS-2 (no suffix) is the slowest member of the entire BS-2? family.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 10/27/2006 8:56:51 PM GMT