Changing analog read channel mask from 0x07 to 0x0f to allow for reading of the temperature and other extended channels.

This commit is contained in:
David A. Mellis 2009-06-15 19:40:47 +00:00
parent db605dd18b
commit a0ba08b4f4
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ int analogRead(uint8_t pin)
// set the analog reference (high two bits of ADMUX) and select the
// channel (low 4 bits). this also sets ADLAR (left-adjust result)
// to 0 (the default).
ADMUX = (analog_reference << 6) | (pin & 0x07);
ADMUX = (analog_reference << 6) | (pin & 0x0f);
#if defined(__AVR_ATmega1280__)
// the MUX5 bit of ADCSRB selects whether we're reading from channels