PIC16F87X
M
EEPROM Memory Programming Specification
This document includes the programming
specifications for the following devices:
Pin Diagram
PDIP, SOIC
• PIC16F870
• PIC16F871
• PIC16F872
• PIC16F873
• PIC16F874
• PIC16F876
• PIC16F877
1
2
3
4
5
28
27
26
25
24
23
22
21
20
19
18
17
16
15
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0/INT
VDD
MCLR/VPP
RA0/AN0
RA1/AN1
RA2/AN2/VREF
RA3/AN3/VREF
RA4/T0CKI
6
7
8
RA5/AN4/SS
VSS
9
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
VSS
1.0
PROGRAMMING THE
PIC16F87X
10
11
RC7/RX/DT
RC6/TX/CK
RC5/SDO
RC4/SDI/SDA
12
13
14
RC3/SCK/SCL
The PIC16F87X is programmed using a serial method.
The Serial mode will allow the PIC16F87X to be pro-
grammed while in the user’s system. This allows for
increased design flexibility. This programming specifi-
cation applies to PIC16F87X devices in all packages.
MCLR/VPP
RA0/AN0
1
40
RB7
RB6
2
39
38
37
36
35
34
33
32
31
30
29
28
RA1/AN1
RA2/AN2/VREF
3
RB5
RB4
RB3
RB2
4
RA3/AN3/VREF
RA4/T0CKI
5
1.1
Programming Algorithm
Requirements
6
RA5/AN4/SS
RE0/RD/AN5
RE1/WR/AN6
RE2/CS/AN7
VDD
7
RB1
8
RB0/INT
VDD
The programming algorithm used depends on the
operating voltage (VDD) of the PIC16F87X device.
9
10
11
12
13
14
15
16
17
18
19
20
VSS
Algorithm
1 is designed for a VDD range of
RD7/PSP7
RD6/PSP6
RD5/PSP5
VSS
2.2V ≤ VDD < 5.5V. Algorithm 2 is for a range of
4.5V ≤ VDD ≤ 5.5V. Either algorithm can be used with
the two available programming entry methods. The first
method follows the normal Microchip Programming
mode entry of applying a VPP voltage of 13V ± .5V. The
second method, called Low Voltage ICSPTM or LVP for
short, applies VDD to MCLR and uses the I/O pin RB3
to enter Programming mode. When RB3 is driven to
VDD from ground, the PIC16F87X device enters
Programming mode.
OSC1/CLKIN
OSC2/CLKOUT
RD4/PSP4
RC7/RX/DT
RC6/TX/CK
RC5/SDO
27
26
25
24
23
22
21
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3/SCK/SCL
RD0/PSP0
RC4/SDI/SDA
RD3/PSP3
RD1/PSP1
RD2/PSP2
1.2
Programming Mode
The Programming mode for the PIC16F87X allows pro-
gramming of user program memory, data memory, spe-
cial locations used for ID, and the configuration word.
2002 Microchip Technology Inc.
DS39025F-page 1