Hi Henrik.
Thanks for the info. I would rather use the internal vRef which as you say moves with Vdd. So if I can adjust Vdd and so vRef to exactly 5 volts (from a mains variable supply) as the constant I can use the formula (ADC output/5) * 255 to display my readings. I can always set Vdd with a multimeter but as a learning exercise would like to do this through the Pic as well.
Perhaps I should explain what I am trying to do which is to display on LCD variables between 0 and 30 volts AC. The AC input is rectified through a diode then a 10uf cap and a voltage divider. Maybe add a 4v7 zener for safety? - still to try that. So 0-30 VAC becomes 0-5 VDC. Then just a matter of scaling the readings by 6.
Or is there more to it? Thanks Dave.
Bookmarks