|
Re: PWM inputs?
Presumably you'd have a sensor that has a PWM output or something. A R-C circuit would smooth the signal out into a mostly DC signal.... However, the smoother you get it, the bigger delay there would be in the system. It's probably not terribly relevant if your PWM is high frequency, though.
For direct input, I think you'd need two digital interrupt inputs and a NOT IC. interrupts firing on the rising edge of the signal, so you start a timer when the straight signal fires, and stop the timer when the NOTed signal fires. Voila, the time of the pulse. Then you just need to calibrate the time widths to your data. And account for the delay from the NOT gate if you need real precision or something. It'd act to add a constant amount to your pulse widths, so as long as you calibrate it it shouldn't matter, though. Note that I'm not figuring out if the pulses are wide enough for the controller to measure or if there would be too many interrupts per second for the processor to handle.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.
Lone Star Regional Troubleshooter
|