PIC16F87X
TABLE 1-1:
PIC16F873 AND PIC16F876 PINOUT DESCRIPTION
DIP
Pin#
SOIC
Pin#
I/O/P
Type
Buffer
Type
Pin Name
Description
(3)
OSC1/CLKIN
9
9
I
Oscillator crystal input/external clock source input.
ST/CMOS
OSC2/CLKOUT
10
10
O
—
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.
MCLR/VPP/THV
1
1
I/P
ST
Master clear (reset) input or programming voltage input or high
voltage test mode control. This pin is an active low reset to the
device.
PORTA is a bi-directional I/O port.
RA0 can also be analog input0
RA1 can also be analog input1
RA0/AN0
2
3
4
2
3
4
I/O
I/O
I/O
TTL
TTL
TTL
RA1/AN1
RA2/AN2/VREF-
RA2 can also be analog input2 or negative analog reference
voltage
RA3/AN3/VREF+
RA4/T0CKI
5
6
7
5
6
7
I/O
I/O
I/O
TTL
ST
RA3 can also be analog input3 or positive analog reference
voltage
RA4 can also be the clock input to the Timer0 module. Output
is open drain type.
RA5/SS/AN4
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.
(1)
RB0/INT
21
21
I/O
RB0 can also be the external interrupt pin.
TTL/ST
TTL
RB1
22
23
24
25
26
27
22
23
24
25
26
27
I/O
I/O
I/O
I/O
I/O
I/O
RB2
TTL
RB3/PGM
RB4
TTL
RB3 can also be the low voltage programming input
Interrupt on change pin.
TTL
RB5
TTL
Interrupt on change pin.
(2)
RB6/PGC
Interrupt on change pin or In-Circuit Debugger pin. Serial
programming clock.
TTL/ST
(2)
RB7/PGD
28
28
I/O
Interrupt on change pin or In-Circuit Debugger pin. Serial
programming data.
TTL/ST
PORTC is a bi-directional I/O port.
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
11
12
13
14
15
11
12
13
14
15
I/O
I/O
I/O
I/O
I/O
ST
ST
ST
ST
ST
RC0 can also be the Timer1 oscillator output or Timer1 clock
input.
RC1 can also be the Timer1 oscillator input or Capture2 input/
Compare2 output/PWM2 output.
RC2 can also be the Capture1 input/Compare1 output/PWM1
output.
RC3/SCK/SCL
RC4/SDI/SDA
RC3 can also be the synchronous serial clock input/output for
2
both SPI and I C modes.
RC4 can also be the SPI Data In (SPI mode) or
2
data I/O (I C mode).
RC5/SDO
16
17
16
17
I/O
I/O
ST
ST
RC5 can also be the SPI Data Out (SPI mode).
RC6/TX/CK
RC6 can also be the USART Asynchronous Transmit or
Synchronous Clock.
RC7/RX/DT
18
18
I/O
ST
RC7 can also be the USART Asynchronous Receive or
Synchronous Data.
VSS
8, 19
20
8, 19
20
P
P
—
—
Ground reference for logic and I/O pins.
Positive supply for logic and I/O pins.
VDD
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 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.
1999 Microchip Technology Inc.
DS30292B-page 7