PIC16C62X
9.9
Code Protection
9.11
In-Circuit Serial Programming
If the code protection bit(s) have not been
programmed, the on-chip program memory can be
read out for veri铿乧ation purposes.
Note:
Microchip does not recommend code
protecting windowed devices.
The PIC16C62X microcontrollers can be serially
programmed while in the end application circuit. This is
simply done with two lines for clock and data, and three
other lines for power, ground, and the programming
voltage. This allows customers to manufacture boards
with unprogrammed devices, and then program the
microcontroller just before shipping the product. This
also allows the most recent 铿乺mware or a custom
铿乺mware to be programmed.
The device is placed into a program/verify mode by
holding the RB6 and RB7 pins low while raising the
MCLR (V
PP
) pin from V
IL
to V
IHH
(see programming
speci铿乧ation). RB6 becomes the programming clock
and RB7 becomes the programming data. Both RB6
and RB7 are Schmitt Trigger inputs in this mode.
After reset, to place the device into programming/verify
mode, the program counter (PC) is at location 00h. A
6-bit command is then supplied to the device.
Depending on the command, 14-bits of program data
are then supplied to or from the device, depending if the
command was a load or a read. For complete details of
serial
programming,
please
refer
to
the
PIC16C6X/7X/9XX
Programming
Speci铿乧ations
(#DS30228).
A typical in-circuit serial programming connection is
shown in Figure 9-19.
9.10
ID Locations
Four memory locations (2000h-2003h) are designated
as ID locations where the user can store checksum or
other code-identi铿乧ation numbers. These locations are
not accessible during normal execution but are
readable and writable during program/verify. Only the
least signi铿乧ant 4 bits of the ID locations are used.
FIGURE 9-19: TYPICAL IN-CIRCUIT SERIAL
PROGRAMMING
CONNECTION
To Normal
Connections
PIC16C62X
V
DD
V
SS
MCLR/V
PP
RB6
RB7
V
DD
To Normal
Connections
External
Connector
Signals
+5V
0V
V
PP
CLK
Data I/O
DS30235G-page 60
Preliminary
漏
1998 Microchip Technology Inc.