- Joined
- Nov 17, 2011
- Messages
- 13,098
Your code:
doesn't match the output:serial.print ("ADC A0 = ");
serial.println(ADC_A0 );
serial.print ("A0Voltage = ");
serial.println(A0Voltage );
According to the code the output should start with "ADC A0 = ..." but it starts with "A0Voltage = ...". A copy paste error only?A0Voltage = 0.22
ADC A0 = 358
A0Voltage = 0.38
ADC A0 = 391
...
Wrong. The code in post #8 obviously works without this instruction. And apart from the above mentioned error, and ADC value of 1023 gives a voltage of 1.1 V. Exactly what was expected.it does not work without this command ADCSRB = (1<<ADLAR);