ATmega32a ADC is not working

Status
Not open for further replies.

awwsome

Newbie level 2
Joined
Mar 11, 2018
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
26
I have been trying to get analog data from the sensor and convert it to digital using the ADC pins of the ATmega32a. The code is working fine with the simulation, but when i run the same code on ATmega32a it gives the 255 every time. I tried using the simple potential divider circuit using two 10k resistors but still, the output of the adc is 255. I even connected the adc pin to ground but the output didn't change.

Please help. Thanks in advance
 

I tried using the simple potential divider circuit using two 10k resistors but still, the output of the adc is 255. I even connected the adc pin to ground but the output didn't change.

Instead of verbally describing the connections made, it would be better to show a circuit print for the ADC references, as well as to show the configuration for I/O and ADC registers that was programmed in the microcontroller code.
 

How do you check the ADC result? Noticed that ADC is disabled during in-circuit debug?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…