16F84 MICROCHIP [Microchip Technology], 16F84 Datasheet - Page 52

no-image

16F84

Manufacturer Part Number
16F84
Description
18-pin Flash/EEPROM 8-Bit Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC16F8X
8.12.3
When global interrupts are disabled (GIE cleared) and
any interrupt source has both its interrupt enable bit
and interrupt flag bit set, one of the following will occur:
• If the interrupt occurs before the execution of a
• If the interrupt occurs during or after the execu-
Even if the flag bits were checked before executing a
SLEEP instruction, it may be possible for flag bits to
become set before the SLEEP instruction completes. To
determine whether a SLEEP instruction executed, test
the PD bit. If the PD bit is set, the SLEEP instruction was
executed as a NOP.
To ensure that the WDT is cleared, a CLRWDT instruc-
tion should be executed before a SLEEP instruction.
8.13
If
programmed, the on-chip program memory can be
read out for verification purposes.
8.14
Four memory locations (2000h - 2003h) are designated
as ID locations to store checksum or other code
identification numbers. These locations are not
accessible during normal execution but are readable
and writable only during program/verify. Only the
4 least significant bits of ID location are usable.
For ROM devices, these values are submitted along
with the ROM code.
DS30430C-page 52
SLEEP instruction, the SLEEP instruction will com-
plete as a NOP. Therefore, the WDT and WDT
postscaler will not be cleared, the TO bit will not
be set and PD bits will not be cleared.
tion of a SLEEP instruction, the device will immedi-
ately wake up from sleep. The SLEEP instruction
will be completely executed before the wake-up.
Therefore, the WDT and WDT postscaler will be
cleared, the TO bit will be set and the PD bit will
be cleared.
Note:
the
WAKE-UP USING INTERRUPTS
Program Verification/Code Protection
ID Locations
code
Microchip does not recommend code pro-
tecting widowed devices.
protection
bit(s)
have
not
been
8.15
PIC16F8X
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. Customers can manufacture boards with
unprogrammed devices, and then program the
microcontroller just before shipping the product,
allowing the most recent firmware or custom firmware
to be programmed.
The device is placed into a program/verify mode by
holding the RB6 and RB7 pins low, while raising the
MCLR pin from V
specification). 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) points to location 00h.
A 6-bit command is then supplied to the device, 14-bits
of program data is then supplied to or from the device,
using load or read-type instructions. For complete
details of serial programming, please refer to the
PIC16CXX Programming Specifications (Literature
#DS30189).
FIGURE 8-20: TYPICAL IN-SYSTEM SERIAL
For ROM devices, both the program memory and Data
EEPROM memory may be read, but only the Data
EEPROM memory may be programmed.
External
Connector
Signals
Data I/O
CLK
+5V
V
In-Circuit Serial Programming
0V
PP
microcontrollers
PROGRAMMING
CONNECTION
IL
To Normal
Connections
To Normal
Connections
to V
1998 Microchip Technology Inc.
IHH
can
(see programming
V
V
MCLR/V
RB6
RB7
DD
SS
PIC16FXX
be
V
PP
DD
serially

Related parts for 16F84