Page 1 of 1

AVR ADC PROBLEM !

Posted: Mon Jun 30, 2008 5:32 pm
by hadikazemi
HI
I use AVR ATMEGA 16 ADC for 0-5V Voltmeter ! But ADC get me only 0xFF for all Voltage !
i link AREF and AVCC to VCC (5V) and with 1uf to ground !

i use CodevisionAVR for programming !

any body can help me ?

Posted: Fri Aug 29, 2008 8:02 am
by Maciek
I have the same problem. i use ATmega 32 and 16. Tested with 7 devices on the same bord. 0xFF for all Voltage, for 0V on ADC0 too. I have tested the program on difrent PCB and it works.
I got AVCC linked to VCC. AVCC, AREF and VCC with 100nf to ground.

When I push the VCC from 5V to 5,3V the ADC starts to work. I got 0x00 with 0V on ADC0.

PS. Sorry for my english.

Posted: Fri Aug 29, 2008 11:31 am
by Maciek
To high clock speed. You have to change ADPS bits in ADCSRA register. The ADC clock speed must be less then 200khz to work right.