PWM Measurement
erhanoztekin
Posts: 2
Hello my friends,
I have a problem with the PWM measurement. I cannot on my parallax card.
scenario:
We have 3 different PWM inputs and we want to measure them separately. How can I write this code? We need to see how many milliseconds are 1 and how many milliseconds are 0.
Comments
Here's a very simplistic approach:
You need to pass pointers to your high and low milliseconds variables, and define the MS_001 constant as the number of system ticks in one millisecond. Probably better, though, to use the system counters to measure the low and high periods. I wrote the attached object to measure the duty cycle output from a DMX lighting controller. This was used in a costume for a television show. The lighting operator changed the levels out of the DMX receiver which were translated by the Propeller into lighting and animation commands for the costume piece (Thunder's buckle from the TV show "Black Lightning"). I use the counters to measure the high and low periods of the cycle.