Professional Documents
Culture Documents
PIC16C58B/CR58B
PIC16C58A/CR58A
PIC16C56
PIC16C54/54A/CR54A
PIC16C52
RA3 2 17 RA0
INTRODUCTION T0CKI 3 16 OSC1/CLKIN
MCLR/VPP 4 15 OSC2/CLKOUT
Overview VSS 5 14 VDD
RB0 6 13 RB7
The PIC16C5X Series is a family of single-chip CMOS RB1 7 12 RB6
microcontrollers with on-chip EPROM for program stor- RB2 8 11 RB5
age. The programming specification also applies to RB3 9 10 RB4
The programming technique is described in the follow- Clearly, to implement this technique, the most stringent
ing section. It is designed to guarantee good program- requirements will be that of the power supplies:
ming margins. It does, however, require a variable VPP: VPP can be a fixed 13.0V to 13.25V supply. It
power supply for VCC. must not exceed 14.0V to avoid damage to the pin and
should be current limited to approximately 100mA.
1.4.1 PROGRAMMING METHOD DETAILS
VDD: 2.0V to 6.5V with 0.25V granularity. Since this
Essentially, this technique includes the following steps: method calls for verification at different VDD values, a
1. Perform blank check at VDD = VDDmin. Report programmable VDD power supply is needed.
failure. The device may not be properly erased. Current Requirement:100mA maximum
2. Program location with pulses and verify after Microchip may release PIC16C5Xs in the future with
each pulse at VDD = VDDP: different VDD ranges which make it necessary to have
where VDDP = VDD range required during pro- a programmable VDD.
gramming (4.75V - 5.25V).
It is important to verify an EPROM at the voltages
a) Programming condition:
specified in this method to remain consistent with
VPP = 13.0V to 13.25V Microchip's test screening. For example, a PIC16C5X
VDD = VDDP = 4.75V - 5.25V specified for 4.75V - 5.25V should be tested for proper
programming from 4.75V - 5.25V.
VPP must be ≥ VDD + 7.25V to keep “programming
mode” active. Note: Any programmer not meeting the program-
b) Verify condition: mable VDD requirement and the verify at
VDDmax and VDDmin requirement may
VDD = VDDP only be classified as “prototype” or “devel-
VPP ≥ VDD + 7.5V but not to exceed 13.25V opment” programmer but not a production
programmer.
If location fails to program after “N” pulses, (sug-
gested maximum program pulses of 8) then report 1.4.3 SOFTWARE REQUIREMENTS
error as a programming failure.
Certain parameters should be programmable (and
Note: Device must be verified at minimum and
therefore easily modified) for easy upgrade.
maximum specified operating voltages as
specified in the data sheet. a) Pulse width
3. Once location passes “Step 2", apply 11X over- b) Maximum number of pulses, current limit 8.
programming, i.e., apply eleven times the num- c) Number of over-programming pulses: should be
ber of pulses that were required to program the = (A • N) + B, where N = number of pulses
location. This will guarantee a solid program- required in regular programming. In our current
ming margin. The overprogramming should be algorithm A = 11, B = 0.
made “software programmable” for easy
updates. 1.5 Programming Pulse Width
4. Program all locations. Program Memory Cells: When programming one
5. Verify all locations (using speed verify mode) at word of EPROM, a programming pulse width (TPW) of
VDD = VDDmin 100 µs is recommended.
6. Verify all locations at VDD = VDDmax The maximum number of programming attempts
VDDmin is the minimum operating voltage spec. for should be limited to 8 per word.
the part. VDDmax is the maximum operating volt- After the first successful verify, the same location
age spec. for the part. should be over-programmed with 11X over-program-
ming.
Configuration Word:The configuration word for oscil-
lator selection, WDT (watchdog timer) disable and
code protection, requires a programming pulse width
(TPWF) of 10 ms. A series of 100 µs pulses is preferred
over a single 10 ms pulse.
Start
Blank Check
@ VDD = VDDmin
Program 1 Location No
@ VPP = 13.0V to 13.25V N > 8?
VDD = VDDP
No N=N+1
Pass? (N = # of program pulses)
Yes
All
locations
No done?
Yes
No
Pass? Report verify failure
@ VDDmin
Yes
No
Report verify failure
Pass? @ VDDmax
Yes
Now program Verify Configuration Word
Configuration Word @ VDDmax & VDDmin
Done
TTT 0 0 ID0
TTT + 1 0 0 ID1 For Customer Use
(4 x 4 bit usable)
TTT + 2 0 0 ID2
TTT + 3 0 0 ID3
TTT + 3F
NNN Highest normal EPROM memory address. NNN = 0x1FF for PIC16C54, 54A, 55.
NNN = 0x3FF for PIC16C56 and 0x7FF for PIC16C57, 58A.
TTT Start address of special EPROM area and ID Locations.
The configuration word can only be accessed immedi- Reading these four memory locations, even with the
ately after MCLR going from VIL to VHH. The Program code protection bit programmed would still output on
Counter will be set to all ’1’s upon MCLR = VIL. Thus, Port A the bit sequence “1101”, “0001”, “1110”, “0010”
it has the value “0xFFF” when accessing the configura- which is “0xD1E2”.
tion EPROM. Incrementing the Program Counter once Note: Microchip will assign a unique pattern
by pulsing OSC1 causes the Program Counter to roll number for QTP and SQTP requests and
over to all '0's. Incrementing the Program Counter 4K for ROM devices. This pattern number will
times after reset (MCLR = VIL) does not allow access be unique and traceable to the submitted
to the configuration EPROM. code.
1.6.1 CUSTOMER ID CODE LOCATIONS
To allow portability of code, a PIC16C5X programmer is required to read the configuration word and ID locations from
the hex file when loading the hex file. If configuration word information was not present in the hex file then a simple
warning message may be issued. Similarly, while saving a hex file, all configuration word and ID information must be
included. Configuration word should have the address of 0xFFF. ID locations are mapped at addresses described in
Section 1.6.1 and Table 3-1. An option to not include this information may be provided.
Microchip Technology Inc. feels strongly that this feature is important for the benefit of the end customer.
TABLE 4-1:
(25°C IS RECOMMENDED
Parameter
Symbol Characteristics Min Typ Max Units Conditions
No.
P1 TR MCLR Rise Time 0.15 1.0 8 µs
P2 TF MCLR Fall Time 0.5 2.0 8 µs
P3 TPS Program Mode Setup Time 1.0 µs
P4 TACC Data Access Time 250 ns
P5 TDS Data Setup Time 1.0 µs
P6 TDH Data Hold Time 1.0 µs
P7 TOE Output Enable Time 0 100 ns
P8 TOZ Output Disable Time 0 100 ns
P9 TPW Programming Pulse Width 10.0 100 µs
P10 TPWF Programming Pulse Width 10,000 µs Configuration Word only
P11 TRC Recovery Time 10.0 µs
P12 FOSC Frequency on OSC1 DC 5 MHz For incrementing of the PC
P1
VHH1/VHH2
MCLR/VPP
P3 P10 P11 P9
T0CKI
OSC1
P4 P4 P4 P4
DATA
(RB7:0,
RA3:0)
P7 P8 P7 P7 P7
P5 P6 P8 P5 P6 P8 P8
Data in Data out Data out Data in Data out Data out
(Config) (Config) (Config) (LOC 0x000) (LOC 0x000) (LOC0x000)
VHH1
MCLR/VPP
T0CKI
OSC1 ’1’
Data out Data out Data out Data out Data out
(Config) (0x000) (0x001) (0x002) (0x003)
DATA
(RB7:0, RA3:0) P7
P8
P4
PC 0xFFF 0x000 0x001 0x002 0x003
(Internal)
All rights reserved. © 1999 Microchip Technology Incorporated. Printed in the USA. 11/99 Printed on recycled paper.
Information contained in this publication regarding device applications and the like is intended for suggestion only and may be superseded by updates. No representation or warranty is given and no liability is assumed
by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Microchip’s products
as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights. The Microchip
logo and name are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. All rights reserved. All other trademarks mentioned herein are the property of their respective companies.