• 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.

16F877 newbie help on pin out

Not open for further replies.


New Member
First thanks to Chippie for the previous help

I would appreciate help on the following, when working with the 16F84A I used all the revevant pins RA and RB as input/output with no probs.

Wih the 16F877 can I do the same RA... RB...RC... RD... RE... OR is their problems in using some of the pins . I thought I read an article that advised caution with the RA !!! as this was A/D

Confused :roll:



Consider, what you want the portA pins to do, when writing your code....

On a Power On reset, PortA pins are configured as, analog in, as a default and status inputs read as 0.......

here's a sample of code for initializing, taken from Microchips site......

BCF STATUS, RP1 ; Bank 0
CLRF PORTA ; Initialize PortA by clearing
; output data latches
BSF STATUS, RP0 ; Select Bank 1
MOVLW 0x06 ; Configure all pins
MOVWF ADCON1 ; as digital inputs
MOVLW 0xCF ; Value used to
; initialize data direction
MOVWF TRISA : Set RA<3:0> as inputs
; RA<5:4> as outputs
; TRISA<7:6> are always
; read as 0
Not open for further replies.

Latest threads

EE World Online Articles