setting up adc ports but using some as digital pins
Posted: Wed Aug 08, 2012 1:31 pm
Hi all:
I had a question regarding setup_adc_ports() functionality for PIC 18F2685.
I need to ONLY have AN0 to AN4, AN10 as analog inputs. However, I see from the header file and from the PIC datasheet (18f2685) that I can only use a few combinations (AN0 to AN3; AN0 to AN4; AN0 to AN10 etc).
So, seems like the only option I have is to:
a) Configure all pins (AN0 to AN10) as analog input.
b) Re-configure AN8, AN9 as digital pins and use them and/or re-configure the pins back to analog once the firmware is done using them as digital pins.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum