PWM decoder and Frequency Counter

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1
Request group membership
By: created: 2013-04-12 | updated: 2013-04-12


File: _FreqCount.spin

Frequency and duty cycle counter

Written by Michael J. Lord Electronic Design Service 2010-06-01650-219-6467 mike@electronicdesignservice.comdrop me a note if you find this program usefull.

I wrote this for a client. It runs well on the demo board using the tv display

This program measures frequency and duty cycle of a square wave that is input into CountPin The practical range for the unit is 0 to 100 khz. At 1mhz the accuracy is not so good. This works well for any pulse width modulation decoding that is needed. It measures one cycle and reports the results back in the next cycle. In this way it reads every other cycle

This is usefull when needing to decode the meaning such as position of a pwm signal such as that sent to a servo.


Original File Upload
Package icon _Freq_counter.zip13.69 KB