Datasheet

PIC16F84A
DS35007C-page 24 2001-2013 Microchip Technology Inc.
6.3 RESET
The PIC16F84A differentiates between various kinds
of RESET:
Power-on Reset (POR)
•MCLR
during normal operation
•MCLR during SLEEP
WDT Reset (during normal operation)
WDT Wake-up (during SLEEP)
Figure 6-4 shows a simplified block diagram of the
On-Chip RESET Circuit. The MCLR
Reset path has a
noise filter to ignore small pulses. The electrical speci-
fications state the pulse width requirements for the
MCLR
pin.
Some registers are not affected in any RESET condition;
their status is unknown on a POR and unchanged in any
other RESET. Most other registers are reset to a “RESET
state” on POR, MCLR
or WDT Reset during normal oper-
ation and on MCLR
during SLEEP. They are not affected
by a WDT Reset during SLEEP, since this RESET is
viewed as the resumption of normal operation.
Table 6-3 gives a description of RESET conditions for
the program counter (PC) and the STATUS register.
Table 6-4 gives a full description of RESET states for all
registers.
The TO
and PD bits are set or cleared differently in dif-
ferent RESET situations (Section 6.7). These bits are
used in software to determine the nature of the RESET.
FIGURE 6-4: SIMPLIFIED BLOCK DIAGRAM OF ON-CHIP RESET CIRCUIT
TABLE 6-3: RESET CONDITION FOR PROGRAM COUNTER AND THE STATUS REGISTER
S
R
Q
External Reset
MCLR
VDD
OSC1/
WDT
Module
V
DD Rise
Detect
OST/PWRT
On-Chip
RC Osc
(1)
WDT
Time-out
Power-on Reset
OST
10-bit Ripple Counter
PWRT
Chip_Reset
10-bit Ripple Counter
Reset
Enable OST
Enable PWRT
SLEEP
CLKIN
Note 1: This is a separate oscillator from the RC oscillator of the CLKIN pin.
2: See Table 6-5.
See Table 6-5
Condition Program Counter STATUS Register
Power-on Reset 000h
0001 1xxx
MCLR during normal operation 000h
000u uuuu
MCLR during SLEEP 000h
0001 0uuu
WDT Reset (during normal operation) 000h
0000 1uuu
WDT Wake-up PC + 1
uuu0 0uuu
Interrupt wake-up from SLEEP PC + 1
(1)
uuu1 0uuu
Legend: u = unchanged, x = unknown
Note 1: When the wake-up is due to an interrupt and the GIE bit is set, the PC is loaded with the interrupt vector (0004h).