Correct FOR loop that didn't get to channel 8

git-svn-id: https://arducopter.googlecode.com/svn/trunk@39 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
analoguedevices 2010-07-05 00:54:36 +00:00
parent 1a8856d0d5
commit 8a82413080
1 changed files with 1 additions and 1 deletions

View File

@ -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