Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top