benryves wrote:
If using C, it's just a simple
Code:
Otherwise, you have to bear in mind the following:
Thanks, Ben. I really need to learn more about the AVRs and coding for them in C and ASM; at this point I just kinda splash around in my ugly hybrid of Arduino and C code. Code:
uint16_t value = ADC;
Otherwise, you have to bear in mind the following:
Quote:
When ADCL is read, the ADC Data Register is not updated until ADCH is read. Consequently, if the result is left adjusted and no more than 8-bit precision is required, it is sufficient to read ADCH. Otherwise, ADCL must be read first, then ADCH.