col_implant
New Member
Hi,
I'm trying to use the PIC ADC for a simple detection circuit. I'm running the PIC via ICD2 in debug mode and examining the operation of the ADC.
I'm sure that I have the module set up correctly... I'm using channel An0, with Vss & Vdd references, right justified, with a conversion clock of fosc/8. I have double checked that the TRISA,0 bit is set as an input
ADCON0 = 0x01
ADCON1 = 0x0E
ADCON2 = 0x89
My ADIF interupt is working fine, and the GO/DONE bit (ADCON0,1) is going high. However the ADRES registers are showing zero value. I have measured the voltage at the An0 pin with a multimeter and confirmed it is not 0.
I have used the PIC ADC before without such issues. I'm wondering is there any other reason which I have overlooked why the result is zero.
Any help appreciated
Cheers
C
I'm trying to use the PIC ADC for a simple detection circuit. I'm running the PIC via ICD2 in debug mode and examining the operation of the ADC.
I'm sure that I have the module set up correctly... I'm using channel An0, with Vss & Vdd references, right justified, with a conversion clock of fosc/8. I have double checked that the TRISA,0 bit is set as an input
ADCON0 = 0x01
ADCON1 = 0x0E
ADCON2 = 0x89
My ADIF interupt is working fine, and the GO/DONE bit (ADCON0,1) is going high. However the ADRES registers are showing zero value. I have measured the voltage at the An0 pin with a multimeter and confirmed it is not 0.
I have used the PIC ADC before without such issues. I'm wondering is there any other reason which I have overlooked why the result is zero.
Any help appreciated
Cheers
C