diff --git a/libraries/APM_ADC/APM_ADC.cpp b/libraries/APM_ADC/APM_ADC.cpp index 7a49da4e5d..002211eba9 100644 --- a/libraries/APM_ADC/APM_ADC.cpp +++ b/libraries/APM_ADC/APM_ADC.cpp @@ -66,7 +66,7 @@ ISR (TIMER2_OVF_vect) //bit_set(PORTL,6); // To test performance bit_clear(PORTC,4); // Enable Chip Select (PIN PC4) ADC_SPI_transfer(adc_cmd[0]); // Command to read the first channel - for (ch=0;ch<7;ch++) + for (ch=0;ch<8;ch++) { adc_tmp = ADC_SPI_transfer(0)<<8; // Read first byte adc_tmp |= ADC_SPI_transfer(adc_cmd[ch+1]); // Read second byte and send next command