Hi,
All 10 bits from my ADC are showing all 1's when I watch the ADRESL and ADRESH registers using the debug mode. Here is the code:
Any ideas?
All 10 bits from my ADC are showing all 1's when I watch the ADRESL and ADRESH registers using the debug mode. Here is the code:
Rich (BB code):
TRISA1 = 1; //Tempterature Sensor Port is Input
//ADCONO Set to AN1 (RA1)
CHS0 = 1;
CHS1 = 0;
CHS2 = 0;
CHS3 = 0;
CHS4 = 0;
ADON = 1; // ADC is enabled
ADPREF0 = 1; // Use Fixed Voltage ...
ADPREF1 = 1; // Reference Module
ADFM = 1; // Right Justified
ADGO = 1; // Start ADC conversion cycle
while(ADGO)
continue; // wait for conversion complete
templ = ADRESL;
temph = ADRESH;