AD Port Configuration Pins & ADCON1

Status
Not open for further replies.

Urahara

Member
Hi

If I want to configure only AN4 (RA5) of a 18f4620 for ADC input, and AN0-3 for digital inputs or outputs purposes, can this be done? Looking at the datasheet for register ADCON1, this does not seem possible? Any workaround?

Thks!
 
If you only want 1 analogue pin then it needs to be AN0. To get AN4 to be analogue requires that you make 5 pins analogue. You can use analogue pins as digital outputs but not as digital inputs. Alternatively choose a more recent pic with the ANSEL registers.

Mike.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…