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.
Please help. Thanks in advance.