rmain1972
Member
Might have found the problem. Try the following:
Found this on the CCS Support forum:
Variable Declaration - Position Dependant? - SOLVED
If all else fails, try making it a global variable.
C:
int1 done; // Put local variable at beginning of code block
set_adc_channel(0); // Select AN0
delay_ms(ADC_DELAY); //Charge capacitor
read_adc(ADC_START_ONLY); //Do A/D conversion
done = = adc_done();
while(!done) {
done = adc_done();
}
Found this on the CCS Support forum:
Variable Declaration - Position Dependant? - SOLVED
If all else fails, try making it a global variable.
Last edited by a moderator: