Page 1 of 1

PIC 16F 877A setting input

PostPosted: Sat Dec 03, 2011 8:11 pm
by stanley1925
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 ^^

Re: PIC 16F 877A setting input

PostPosted: Sat Dec 03, 2011 9:04 pm
by ABSF
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

Re: PIC 16F 877A setting input

PostPosted: Sun Dec 04, 2011 4:28 pm
by stanley1925
Yes, solved my problem, thx u ^^