For one thing, in the sequence
ADCON0.6 = 0
ADCON0.7 = 1
CM1CON0.3 = 0
ADCON0 = %00000001 'Set AN0 active
You first set ADCON0 bit 7 and then clear it two instructions later.
Try
CM1CON0.3 = 0
ADCON0 = %10000001
Instead
For one thing, in the sequence
ADCON0.6 = 0
ADCON0.7 = 1
CM1CON0.3 = 0
ADCON0 = %00000001 'Set AN0 active
You first set ADCON0 bit 7 and then clear it two instructions later.
Try
CM1CON0.3 = 0
ADCON0 = %10000001
Instead
Charles Linquist
Bookmarks