Duty cycle measurement
Tronic (Greece)
Posts: 130
Hello everyone.
Is it possible for basic stamp to measure the duty cycle of a PWM signal and output the HIGH time (T1) as a per cent number (%)?
Is there a limitation of the frequency it can do this kind of measurement?
Thanos
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greekbotics: Greek Robotics Forum
Post Edited (Tronic (Greece)) : 5/25/2006 7:06:20 AM GMT
Is it possible for basic stamp to measure the duty cycle of a PWM signal and output the HIGH time (T1) as a per cent number (%)?
Is there a limitation of the frequency it can do this kind of measurement?
Thanos
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greekbotics: Greek Robotics Forum
Post Edited (Tronic (Greece)) : 5/25/2006 7:06:20 AM GMT
Comments
·· Yes, the BASIC Stamp can do this using the PULSIN command but there are a·couple limitations...First of all the maximum pulse width is about 131 ms.· Second, when the pulse width is at 0 or 100% the PULSIN command will read 0.· Also you'll have to scale your results, since the resolution is 2 us increments.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
That article on Duty Cycle for More Reliable Accelerometer Measurements·really helped me alot.
On the next video I demostrate the results of my ongoing mini project:
http://www.youtube.com/watch?v=WREPqBJaVyI
Regards, Thanos
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greekbotics: Greek Robotics Forum