
Originally Posted by
HenrikOlsson
Well, anyway you like really. The simplest way is a voltage divider but then the stability and accuracy of you reading depends on the stability of the powersupply rail, which it does when you're using the Vdd/Vss for Vref anyway.
The voltage supplied to Vref- is what will equal a returned value of 0 from the ADC, the voltage supplied to VRef+ is what will equal a returned value of 1023 from the ADC. So by feeding 1V to Vref- and 5V to Vref+ the ADC's 10 bits gets divided across 1-5V instead of 0-5V as is the case when you use Vss/Vdd as reference. (As long as you use 5V supply of course). Read up on the ADC section of the datasheet for details about the ADC.
I can't help with your problem as I have absolutely no idea how you've coded it.
/Henrik.
As you said i looked at the pins and i cant find any -vref.
"The positive voltage reference can be either VDD or an external voltage source. The negative voltage reference is always connected to the ground reference" this is what i found on the datasheet.
THANKS and REGARDS,
PUGAL
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
Bookmarks