Snippet - Register-Based Fast Pulse Counter (Object-Oriented Version)

Register-Based Fast Pulse Counter (Object-Oriented Version)

There are already several very good pulse counter examples on Codeshare and on the Wiki that use registers

This is yet another pulse counter utilizing the same approach, but it has been encapsulated in an easy to use FastPulseCounter object, which should be drop-in ready for any Panda II project, and perhaps other LPC23XX-based boards with minor modifications to the code. Extensive comments are included in the usage example and in the class, explaining various properties and features.

Related Codeshare entries:
http://www.tinyclr.com/codeshare/entry/298
http://www.tinyclr.com/codeshare/entry/235

3 Likes

This is a very nice code share. I especially like how you have exposed the interrupt!

Good one. Thank you!

There some problem ( especially when device is transmitting data via GSM module, the counter start increased without any pulses, so looks like there some noise while trasmitting data.

is there any ay to add glitch filter on this code???