- Sun Oct 05, 2008 5:35 am
#56513
I'm using an ATMEGA8 and trying to get the ADC to work.
I have a 10k potentiometer connected between two 330 ohm resistors, and according to my multimeter this yields a linearly varying voltage of 0.16V to 4.85V.
Unfortunately, when I read ADCL and ADCH after a conversion, ADCL only varies from 0 to 64 and ADCH is always 0.
I've used Vcc as a reference voltage, and I've also tried connecting 5V to AREF and using that.
Any help would be appreciated
I have a 10k potentiometer connected between two 330 ohm resistors, and according to my multimeter this yields a linearly varying voltage of 0.16V to 4.85V.
Unfortunately, when I read ADCL and ADCH after a conversion, ADCL only varies from 0 to 64 and ADCH is always 0.
I've used Vcc as a reference voltage, and I've also tried connecting 5V to AREF and using that.
Any help would be appreciated