English
Language : 

PIC16F877-20L Datasheet, PDF (8/218 Pages) Microchip Technology – 28/40-Pin 8-Bit CMOS FLASH Microcontrollers
PIC16F87X
TABLE 1-2: PIC16F874 AND PIC16F877 PINOUT DESCRIPTION
Pin Name
DIP PLCC QFP I/O/P
Pin# Pin# Pin# Type
Buffer
Type
Description
OSC1/CLKIN
13
14
30
I
ST/CMOS(4) Oscillator crystal input/external clock source input.
OSC2/CLKOUT
14
15
31
O
—
Oscillator crystal output. Connects to crystal or resonator
in crystal oscillator mode. In RC mode, OSC2 pin outputs
CLKOUT which has 1/4 the frequency of OSC1, and
denotes the instruction cycle rate.
MCLR/VPP
1
2
18
I/P
ST
Master Clear (Reset) input or programming voltage input.
This pin is an active low RESET to the device.
PORTA is a bi-directional I/O port.
RA0/AN0
2
3
19
I/O
TTL
RA0 can also be analog input0.
RA1/AN1
3
4
20
I/O
TTL
RA1 can also be analog input1.
RA2/AN2/VREF-
4
5
21
I/O
TTL
RA2 can also be analog input2 or negative
analog reference voltage.
RA3/AN3/VREF+
5
6
22
I/O
TTL
RA3 can also be analog input3 or positive
analog reference voltage.
RA4/T0CKI
6
7
23
I/O
ST
RA4 can also be the clock input to the Timer0 timer/
counter. Output is open drain type.
RA5/SS/AN4
7
8
24
I/O
TTL
RA5 can also be analog input4 or the slave select for
the synchronous serial port.
RB0/INT
33
36
PORTB is a bi-directional I/O port. PORTB can be soft-
ware programmed for internal weak pull-up on all inputs.
8
I/O
TTL/ST(1)
RB0 can also be the external interrupt pin.
RB1
34
37
9
I/O
TTL
RB2
35
38
10
I/O
TTL
RB3/PGM
36
39
11
I/O
TTL
RB3 can also be the low voltage programming input.
RB4
37
41
14
I/O
TTL
Interrupt-on-change pin.
RB5
RB6/PGC
RB7/PGD
38
42
39
43
40
44
15
I/O
TTL
16
I/O
TTL/ST(2)
17
I/O
TTL/ST(2)
Interrupt-on-change pin.
Interrupt-on-change pin or In-Circuit Debugger pin.
Serial programming clock.
Interrupt-on-change pin or In-Circuit Debugger pin.
Serial programming data.
Legend: I = input
O = output
— = Not used
I/O = input/output
TTL = TTL input
P = power
ST = Schmitt Trigger input
Note 1: This buffer is a Schmitt Trigger input when configured as an external interrupt.
2: This buffer is a Schmitt Trigger input when used in Serial Programming mode.
3: This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL input when used in the Parallel
Slave Port mode (for interfacing to a microprocessor bus).
4: This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise.
DS30292D-page 8
 1998-2013 Microchip Technology Inc.