Thanks guys, since the only difference between ADC channel6 & adc channel 7 is 1 bit, I actually I think i've figured a workaround, something like this...
the code below assumes ADCON0 set as something like 11101 to start with (bit 2-6 set the ADC channel, so this would be ADC channel 7 selected)
Code:
if adcon0.2 = 1 then ' if bit 2 is set then ADC Channel must presently be CH7
adccon.2 =0 ' clear bit 2, to set ADC channel to Channel 6
else
adccon0.2 = 1 ' if adcon.2 wasn't set as a '1' then ch6 must have been active therefore now set bit 2 to make AD ch7 active.
I think that should toggle between ADC ch6 & ch7 on successive calls?
Bookmarks