ChipFind - документация

Электронный компонент: PIC16F8x

Скачать:  PDF   ZIP

Document Outline

1998 Microchip Technology Inc.
DS30430C-page 1
M
Devices Included in this Data Sheet:
PIC16F83
PIC16F84
PIC16CR83
PIC16CR84
Extended voltage range devices available
(PIC16
LF
8X, PIC16
LCR
8X)
High Performance RISC CPU Features:
Only 35 single word instructions to learn
All instructions single cycle except for program
branches which are two-cycle
Operating speed: DC - 10 MHz clock input
DC - 400 ns instruction cycle
14-bit wide instructions
8-bit wide data path
15 special function hardware registers
Eight-level deep hardware stack
Direct, indirect and relative addressing modes
Four interrupt sources:
- External RB0/INT pin
- TMR0 timer overflow
- PORTB<7:4> interrupt on change
- Data EEPROM write complete
1000 erase/write cycles Flash program memory
10,000,000 erase/write cycles EEPROM data mem-
ory
EEPROM Data Retention > 40 years
Peripheral Features:
13 I/O pins with individual direction control
High current sink/source for direct LED drive
- 25 mA sink max. per pin
- 20 mA source max. per pin
TMR0: 8-bit timer/counter with 8-bit
programmable prescaler
Pin Diagrams
Special Microcontroller Features:
In-Circuit Serial Programming (ICSPTM) - via two
pins (ROM devices support only Data EEPROM
programming)
Power-on Reset (POR)
Power-up Timer (PWRT)
Oscillator Start-up Timer (OST)
Watchdog Timer (WDT) with its own on-chip RC
oscillator for reliable operation
Code-protection
Power saving SLEEP mode
Selectable oscillator options
CMOS Flash/EEPROM Technology:
Low-power, high-speed technology
Fully static design
Wide operating voltage range:
- Commercial: 2.0V to 6.0V
- Industrial:
2.0V to 6.0V
Low power consumption:
- < 2 mA typical @ 5V, 4 MHz
- 15
A typical @ 2V, 32 kHz
- < 1
A typical standby current @ 2V
Device
Program
Memory
(words)
Data
RAM
(bytes)
Data
EEPROM
(bytes)
Max.
Freq
(MHz)
PIC16F83
512 Flash
36
64
10
PIC16F84
1 K Flash
68
64
10
PIC16CR83
512 ROM
36
64
10
PIC16CR84
1 K ROM
68
64
10
RA1
RA0
OSC1/CLKIN
OSC2/CLKOUT
V
DD
RB7
RB6
RB5
RB4
RA2
RA3
RA4/T0CKI
MCLR
V
SS
RB0/INT
RB1
RB2
RB3
1
2
3
4
5
6
7
8
9
18
17
16
15
14
13
12
11
10
PDIP, SOIC
PIC16F8X
PIC16CR8X
PIC16F8X
18-pin Flash/EEPROM 8-Bit Microcontrollers
PIC16F8X
DS30430C-page 2
1998 Microchip Technology Inc.
Table of Contents
1.0
General Description ...................................................................................................................................................................... 3
2.0
PIC16F8X Device Varieties .......................................................................................................................................................... 5
3.0
Architectural Overview.................................................................................................................................................................. 7
4.0
Memory Organization ................................................................................................................................................................. 11
5.0
I/O Ports...................................................................................................................................................................................... 21
6.0
Timer0 Module and TMR0 Register............................................................................................................................................ 27
7.0
Data EEPROM Memory.............................................................................................................................................................. 33
8.0
Special Features of the CPU ...................................................................................................................................................... 37
9.0
Instruction Set Summary ............................................................................................................................................................ 53
10.0 Development Support ................................................................................................................................................................. 69
11.0 Electrical Characteristics for PIC16F83 and PIC16F84.............................................................................................................. 73
12.0 Electrical Characteristics for PIC16CR83 and PIC16CR84........................................................................................................ 85
13.0 DC & AC Characteristics Graphs/Tables.................................................................................................................................... 97
14.0 Packaging Information .............................................................................................................................................................. 109
Appendix A:
Feature Improvements - From PIC16C5X To PIC16F8X .......................................................................................... 113
Appendix B:
Code Compatibility - from PIC16C5X to PIC16F8X.................................................................................................. 113
Appendix C:
What's New In This Data Sheet ................................................................................................................................. 114
Appendix D:
What's Changed In This Data Sheet ......................................................................................................................... 114
Appendix E:
Conversion Considerations - PIC16C84 to PIC16F83/F84 And PIC16CR83/CR84.................................................. 115
Index ................................................................................................................................................................................................. 117
On-Line Support................................................................................................................................................................................. 119
Reader Response .............................................................................................................................................................................. 120
PIC16F8X Product Identification System ........................................................................................................................................... 121
Sales and Support.............................................................................................................................................................................. 121
To Our Valued Customers
We constantly strive to improve the quality of all our products and documentation. We have spent a great deal of
time to ensure that these documents are correct. However, we realize that we may have missed a few things. If you
find any information that is missing or appears in error, please use the reader response form in the back of this data
sheet to inform us. We appreciate your assistance in making this a better document.
PIC16F8X
1998 Microchip Technology Inc.
DS30430C-page 3
1.0
GENERAL DESCRIPTION
The PIC16F8X is a group in the PIC16CXX family of
low-cost, high-performance, CMOS, fully-static, 8-bit
microcontrollers. This group contains the following
devices:
PIC16F83
PIC16F84
PIC16CR83
PIC16CR84
All PICmicroTM microcontrollers employ an advanced
RISC architecture. PIC16F8X devices have enhanced
core features, eight-level deep stack, and multiple
internal and external interrupt sources. The separate
instruction and data buses of the Harvard architecture
allow a 14-bit wide instruction word with a separate
8-bit wide data bus. The two stage instruction pipeline
allows all instructions to execute in a single cycle,
except for program branches (which require two
cycles). A total of 35 instructions (reduced instruction
set) are available. Additionally, a large register set is
used to achieve a very high performance level.
PIC16F8X microcontrollers typically achieve a 2:1 code
compression and up to a 4:1 speed improvement (at 20
MHz) over other 8-bit microcontrollers in their class.
The PIC16F8X has up to 68 bytes of RAM, 64 bytes of
Data EEPROM memory, and 13 I/O pins. A timer/
counter is also available.
The PIC16CXX family has special features to reduce
external components, thus reducing cost, enhancing
system reliability and reducing power consumption.
There are four oscillator options, of which the single pin
RC oscillator provides a low-cost solution, the LP
oscillator minimizes power consumption, XT is a
standard crystal, and the HS is for High Speed crystals.
The SLEEP (power-down) mode offers power saving.
The user can wake the chip from sleep through several
external and internal interrupts and resets.
A highly reliable Watchdog Timer with its own on-chip
RC oscillator provides protection against software lock-
up.
The devices with Flash program memory allow the
same device package to be used for prototyping and
production. In-circuit reprogrammability allows the
code to be updated without the device being removed
from the end application. This is useful in the
development of many applications where the device
may not be easily accessible, but the prototypes may
require code updates. This is also useful for remote
applications where the code may need to be updated
(such as rate information).
Table 1-1 lists the features of the PIC16F8X. A simpli-
fied block diagram of the PIC16F8X is shown in
Figure 3-1.
The PIC16F8X fits perfectly in applications ranging
from high speed automotive and appliance motor
control to low-power remote sensors, electronic locks,
security devices and smart cards. The Flash/EEPROM
technology makes customization of application
programs (transmitter codes, motor speeds, receiver
frequencies, security codes, etc.) extremely fast and
convenient. The small footprint packages make this
microcontroller series perfect for all applications with
space limitations. Low-cost, low-power, high
performance, ease-of-use and I/O flexibility make the
PIC16F8X very versatile even in areas where no
microcontroller use has been considered before
(e.g.,
timer functions; serial communication; capture,
compare and PWM functions; and co-processor
applications).
The serial in-system programming feature (via two
pins) offers flexibility of customizing the product after
complete assembly and testing. This feature can be
used to serialize a product, store calibration data, or
program the device with the current firmware before
shipping.
1.1
Family and Upward Compatibility
Those users familiar with the PIC16C5X family of
microcontrollers will realize that this is an enhanced
version of the PIC16C5X architecture. Please refer to
Appendix A for a detailed list of enhancements. Code
written for PIC16C5X devices can be easily ported to
PIC16F8X devices (Appendix B).
1.2
Development Support
The PIC16CXX family is supported by a full-featured
macro assembler, a software simulator, an in-circuit
emulator, a low-cost development programmer and a
full-featured programmer. A "C" compiler and fuzzy
logic support tools are also available.
PIC16F8X
DS30430C-page 4
1998 Microchip Technology Inc.
TABLE 1-1
PIC16F8X FAMILY OF DEVICES
PIC16F83
PIC16CR83
PIC16F84
PIC16CR84
Clock
Maximum Frequency
of Operation (MHz)
10
10
10
10
Flash Program Memory
512
--
1K
--
Memory
EEPROM Program Memory
--
--
--
--
ROM Program Memory
--
512
--
1K
Data Memory (bytes)
36
36
68
68
Data EEPROM (bytes)
64
64
64
64
Peripherals
Timer Module(s)
TMR0
TMR0
TMR0
TMR0
Features
Interrupt Sources
4
4
4
4
I/O Pins
13
13
13
13
Voltage Range (Volts)
2.0-6.0
2.0-6.0
2.0-6.0
2.0-6.0
Packages
18-pin DIP,
SOIC
18-pin DIP,
SOIC
18-pin DIP,
SOIC
18-pin DIP,
SOIC
All PICmicroTM Family devices have Power-on Reset, selectable Watchdog Timer, selectable code protect and high I/O current capa-
bility. All PIC16F8X Family devices use serial programming with clock pin RB6 and data pin RB7.
PIC16F8X
1998 Microchip Technology Inc.
DS30430C-page 5
2.0
PIC16F8X DEVICE VARIETIES
A variety of frequency ranges and packaging options
are available. Depending on application and production
requirements the proper device option can be selected
using the information in this section. When placing
orders, please use the "PIC16F8X Product
Identification System" at the back of this data sheet to
specify the correct part number.
There are four device "types" as indicated in the device
number.
1.
F
, as in PIC16
F
84. These devices have Flash
program memory and operate over the standard
voltage range.
2.
LF
, as in PIC16
LF
84. These devices have Flash
program memory and operate over an extended
voltage range.
3.
CR
, as in PIC16
CR
83. These devices have
ROM program memory and operate over the
standard voltage range.
4.
LCR
, as in PIC16
LCR
84. These devices have
ROM program memory and operate over an
extended voltage range.
When discussing memory maps and other architectural
features, the use of
F
and
CR
also implies the
LF
and
LCR
versions.
2.1
Flash Devices
These devices are offered in the lower cost plastic
package, even though the device can be erased and
reprogrammed. This allows the same device to be used
for prototype development and pilot programs as well
as production.
A further advantage of the electrically-erasable Flash
version is that it can be erased and reprogrammed in-
circuit, or by device programmers, such as Microchip's
PICSTART
Plus or PRO MATE
II programmers.
2.2
Quick-Turnaround-Production (QTP)
Devices
Microchip offers a QTP Programming Service for
factory production orders. This service is made
available for users who choose not to program a
medium to high quantity of units and whose code
patterns have stabilized. The devices have all Flash
locations and configuration options already pro-
grammed by the factory. Certain code and prototype
verification procedures do apply before production
shipments are available.
For information on submitting a QTP code, please
contact your Microchip Regional Sales Office.
2.3
Serialized Quick-Turnaround-
Production (SQTP
) Devices
Microchip offers the unique programming service
where a few user-defined locations in each device are
programmed with different serial numbers. The serial
numbers may be random, pseudo-random
or
sequential.
Serial programming allows each device to have a
unique number which can serve as an entry-code,
password or ID number.
For information on submitting a SQTP code, please
contact your Microchip Regional Sales Office.
2.4
ROM Devices
Some of Microchip's devices have a corresponding
device where the program memory is a ROM. These
devices give a cost savings over Microchip's traditional
user programmed devices (EPROM, EEPROM).
ROM devices (PIC16CR8X) do not allow serialization
information in the program memory space. The user
may program this information into the Data EEPROM.
For information on submitting a ROM code, please
contact your Microchip Regional Sales Office.
SM