"Man can do anything if he will." - Maybe he should give it a go first...
I threw this example together in five minutes flat. There's a hundred different ways of accomplishing what you want... this is just one. Use as a teaching aid, learn and build from it. Study in conjunction with MEL's PBP manual and the 16F877's Datasheet section 8.3 (PWM Mode).
0-1023Hz input produces a correspondingly neatly linear 0-100% 10-bit PWM output. This PWM Output can be filtered (say via 10K Resistor first, then 1uF between that and Vss). You will generate your proportional voltage (0-5v in this case) across the Capacitor... buffer and scale it in a cheap op-amp for it to be useful and away you go.
PS. You owe me a holiday...
*smiles*
Melanie
Bookmarks