Datasheet

1996 Microchip Technology Inc. Preliminary DS40122B-page 89
PIC14000
FIGURE 10-13: WAKE-UP FROM SLEEP AND HIBERNATE THROUGH INTERRUPT
Note 1: HS oscillator mode assumed.
2: T
OST = 1024 TOSC (drawing not to scale). This delay will be 8 TOSC for IN osc mode.
3: GIE = 1 assumed. In this case after wake up processor jumps to interrupt routine. If GIE = 0, execution will continue in line.
4: CLKOUT is not available in these osc modes, but shown here for timing reference.
5: Refer to Section 10.8 for sources.
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
OSC1
CLKOUT(4)
INTERRUPT
GIE bit
(INTCON<7>)
INSTRUCTION FLOW
PC
Instruction
fetched
Instruction
executed
PC PC+1 PC+2
Inst(PC) = SLEEP
Inst(PC - 1)
Inst(PC + 1)
SLEEP
Processor in
SLEEP
Interrupt Latency
(Note 2)
Inst(PC + 2)
Inst(PC + 1)
Inst(0004h)
Inst(0005h)
Inst(0004h)
Dummy cycle
PC + 2 0004h 0005h
Dummy cycle
T
OST(2)
Flag (5)
10.9 Code Protection
The code in the program memory can be protected by
programming the code protect bits. When code
protected, the contents of the program memory cannot
be read out. In code-protected mode, the configuration
word (2007h) will not be scrambled, allowing reading of
all configuration bits.
10.10 In-Circuit Serial Programming
PIC14000 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 allows the most recent firmware or a
custom firmware to be programmed.
The device is placed into a program/verify mode by
holding the RC6/SCL and RC7/SDA pins low while
raising the MCLR
(VPP) pin from VIL to VIH. RC6 then
becomes the programming clock and RC7 becomes
the programmed data. Both RC6 and RC7 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. For complete
details about serial programming, please refer to the
PIC16C6X/7X Programming Specifications
(Literature
#DS30228).
A typical in-system serial programming connection is
shown in Figure 10-14.
FIGURE 10-14: TYPICAL IN-SYSTEM SERIAL
PROGRAMMING
CONNECTION
External
Connector
Signals
To Normal
Connections
To Normal
Connections
PIC14000
V
DD
VSS
MCLR/VPP
RC6
RC7
+5V
0V
Vpp
CLK
Data I/O
VDD