Hello all, So i'm trying to get my atMega2560 to run a interrupt ADC but it doesn't seem to be updating my values correctly. I am trying to measure the ADC on PINS A0-A7 which are all thermistors. To do this I am using a interrupt on the ADC, and within the interrupt I am changing the MUX value and than reading the ADC. From reading the datasheets I believe the Interupt Flag is cleared after reading the ADC, because I'm trying to update the MUX before the flag is cleared. However by doing this I am getting all values of 1023 when this code was working when I didn't change the MUX and only measured one pin. I am developing on AtmelStudio6.2. Any help would be greatly appreciated. I attached my code.
Joined: Wed. Jul 1, 2015
Posts: 21 View posts
Last Edited: Thu. Jul 16, 2015 - 06:42 PM