Correct, you can only SAMPLE one analog port into ADRES (the result register) at a time, but you can SAMPLE all analog ports sequentially by changing the channel...
How would you go about having 3 port using the A/D command ?
I would need to redefine the ADCON0 in the program ?
begin:
ADCON0 = %10000 000 'read channel AN0
...program goes here
ADCON0 = %10001 000 'read channel AN1
...program goes here
ADCON0 = %10110 000 'read channel AN6
goto begin
(keeping in mind to turn off and on the A/D module each time ADCON0 is selected)
K
Bookmarks