PIC 16F 877A setting input

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

PIC 16F 877A setting input

Postby stanley1925 » Sat Dec 03, 2011 8:11 pm

I having a problem which when i want to use PIC16F877A's RA0 or RA1 as input, but it failed, i tried using Proteus to simulate also failed. Does any body how can solve this problem? Thx u ^^
stanley1925
Newbie
 
Posts: 13
Joined: Sat Dec 03, 2011 8:05 pm

Re: PIC 16F 877A setting input

Postby ABSF » Sat Dec 03, 2011 9:04 pm

I think RA0 and RA1 are default to analog and you must be using them as digital inputs.

You have to set them manually to digital at ADCON1/PCFG3:PCFG0 to "011x" for it to work. See the datasheet for more info on the ADC section.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PIC 16F 877A setting input

Postby stanley1925 » Sun Dec 04, 2011 4:28 pm

Yes, solved my problem, thx u ^^
stanley1925
Newbie
 
Posts: 13
Joined: Sat Dec 03, 2011 8:05 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 2 guests