On 2014-05-13 20:24, andy pugh wrote: > On 13 May 2014 19:13, Marius Liebenberg <mar...@mastercut.co.za> wrote: > >> You would count up until the comparator tripped and the count would >> equal the voltage that you wanted to measure. >> The kids are spoiled these days :) > >From that point on, of course, the pwm duty cycle just need to > increase if the comparator is not tripped and decrease if it is > tripped to track the state of the knob. Correct. It will have to have a small bit of hysteresis to stop it from hunting but that could be a parameter for the component. Maybe also a sweep window that can be enlarged a little bit at a time if the signal is not found inside of the window. Until it is found again and then you shrink the sweep window again. Or else if you have lost track of the signal, just sweep again from zero.
> It would be a fairly simple HAL component. > -- Regards /Groete Marius D. Liebenberg +27 82 698 3251 +27 12 743 6064 QQ 1767394877 ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users