
2001 Microchip Technology Inc.
DS30292C-page 7
PIC16F87X
TABLE 1-1:
PIC16F873 AND PIC16F876 PINOUT DESCRIPTION
Pin Name
DIP
Pin#
SOIC
Pin#
I/O/P
Type
Buffer
Type
Description
OSC1/CLKIN
OSC2/CLKOUT
9
10
9
10
I
ST/CMOS
(3)
Oscillator crystal input/external clock source input.
—
Oscillator crystal output. Connects to crystal or resonator in
crystal oscillator mode. In RC mode, the OSC2 pin outputs
CLKOUT which has 1/4 the frequency of OSC1, and denotes
the instruction cycle rate.
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.
TTL
RA0 can also be analog input0.
TTL
RA1 can also be analog input1.
TTL
RA2 can also be analog input2 or negative analog
reference voltage.
TTL
RA3 can also be analog input3 or positive analog
reference voltage.
ST
RA4 can also be the clock input to the Timer0
module. Output is open drain type.
TTL
RA5 can also be analog input4 or the slave select
for the synchronous serial port.
PORTB is a bi-directional I/O port. PORTB can be software
programmed for internal weak pull-up on all inputs.
TTL/ST
(1)
RB0 can also be the external interrupt pin.
TTL
TTL
TTL
RB3 can also be the low voltage programming input.
TTL
Interrupt-on-change pin.
TTL
Interrupt-on-change pin.
TTL/ST
(2)
Interrupt-on-change pin or In-Circuit Debugger pin. Serial
programming clock.
TTL/ST
(2)
Interrupt-on-change pin or In-Circuit Debugger pin. Serial
programming data.
PORTC is a bi-directional I/O port.
ST
RC0 can also be the Timer1 oscillator output or Timer1
clock input.
ST
RC1 can also be the Timer1 oscillator input or Capture2
input/Compare2 output/PWM2 output.
ST
RC2 can also be the Capture1 input/Compare1 output/
PWM1 output.
ST
RC3 can also be the synchronous serial clock input/output
for both SPI and I
2
C modes.
ST
RC4 can also be the SPI Data In (SPI mode) or
data I/O (I
2
C mode).
ST
RC5 can also be the SPI Data Out (SPI mode).
ST
RC6 can also be the USART Asynchronous Transmit or
Synchronous Clock.
ST
RC7 can also be the USART Asynchronous Receive or
Synchronous Data.
—
Ground reference for logic and I/O pins.
—
Positive supply for logic and I/O pins.
I/O = input/output
P = power
TTL = TTL input
ST = Schmitt Trigger input
O
MCLR/V
PP
1
1
I/P
RA0/AN0
RA1/AN1
RA2/AN2/V
REF
-
2
3
4
2
3
4
I/O
I/O
I/O
RA3/AN3/V
REF
+
5
5
I/O
RA4/T0CKI
6
6
I/O
RA5/SS/AN4
7
7
I/O
RB0/INT
RB1
RB2
RB3/PGM
RB4
RB5
RB6/PGC
21
22
23
24
25
26
27
21
22
23
24
25
26
27
I/O
I/O
I/O
I/O
I/O
I/O
I/O
RB7/PGD
28
28
I/O
RC0/T1OSO/T1CKI
11
11
I/O
RC1/T1OSI/CCP2
12
12
I/O
RC2/CCP1
13
13
I/O
RC3/SCK/SCL
14
14
I/O
RC4/SDI/SDA
15
15
I/O
RC5/SDO
RC6/TX/CK
16
17
16
17
I/O
I/O
RC7/RX/DT
18
18
I/O
V
SS
V
DD
Legend:
8, 19
20
O = output
—
= Not used
8, 19
20
P
P
I = input
Note 1:
This buffer is a Schmitt Trigger input when configured as the 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 in RC oscillator mode and a CMOS input otherwise.