View Full Version : Pulse counter

09-14-2007, 06:56 AM

Any code sample for a pulse counter and the code as·"lookdown,branch" in Stamp? Thanks.


Ken Peterson
09-14-2007, 08:46 AM

If you are looking for help with the Stamp, this forum is for the Propeller so you should post to a Stamp forum in stead.· If you are looking to set up a pulse counter with the Propeller, that is a very simple matter as the built-in counters have that capability.· It is documented in the Propeller manual and in a Counter app-note in the Propeller Download section.



The more I know, the more I know I don't know.· Is this what they call Wisdom?

09-15-2007, 12:50 AM
Thanks, Ken.

I know the "lookdown and branch" in stamp. What I mean is the same function but in propeller. Probably it is in the manual too. I am going to look into that. Thanks again.


Andy Lindsay (Parallax)
09-15-2007, 01:03 AM
There's an example in the Propeller Education Kit Counters lab that explains how to use counter modules to count rising and falling edges. Each of the Propeller chip's cogs has two counter modules. The nice thing about using counter modules to count transitions is that your cog's code can move on to other tasks, and check back later to find the value the counter module accumulated.

The·Counter Modules and Circuit·Applications lab is available for download here: http://forums.parallax.com/showthread.php?p=617192 (http://forums.parallax.com/showthread.php?p=617192)

See pages 32 - 35.

Andy Lindsay

Education Department
Parallax, Inc.