Hi Savageio, How much do you expect you can modify the vref value?
On 10/25/09, savageio <[email protected]> wrote: > > > Hello List, > > I am trying to measure voltage levels of two IR photodiodes. The > voltage varies from about 0,2 to 0,5 volts. > > My device is 16F873A. > > I have following ADC setup: > > ----------- code start ------------------- > const bit ADC_HIGH_RESOLUTION = low > const byte ADC_NCHANNEL = 3 -- 2 analog channels on AN0, AN1 > const byte ADC_NVREF = 1 -- VREF+ is AN3 > include adc > adc_init() > ----------- code end ------------------- > > The photodiodes are connected to AN0 and AN1, and I have a 4K7 > potmeter as voltage divider on AN3. > I am showing the values from adc_read_low_res(0) and adc_read_low_res > (1) on a LCD. > > The vref does not seem to be working as I expected, it makes no > difference how I set the potmeter, the values I read are always the > same (in a range of 12 - 22, so that fits when vref+ is vdd) > > What am I missing? > > TIA, > > Sander > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
