PIC14000
28-Pin Programmable Mixed Signal Controller
High-Performance RISC CPU:
• Only 35 single word instructions to learn
• All single cycle instructions except for program
branches which are two cycle
• Operating speed: DC - 20 MHz clock input
• 4096 x 14 on-chip EPROM program memory
• 192 x 8 general purpose registers (SRAM)
• 6 internal and 5 external interrupt sources
• 38 special function hardware registers
• Eight-level hardware stack
Pin Diagram
PDIP, SOIC, SSOP, Windowed CERDIP
RA1/AN1
RA0/AN0
RD3/REFB
RD2/CMPB
RD1/SDAB
RD0/SCLB
OSC2/CLKOUT
OSC1/PBTN
V
DD
VREG
RC7/SDAA
RC6/SCLA
RC5
MCLR/V
PP
•1
2
3
4
5
6
7
8
9
10
11
12
13
14
28
27
26
25
RA2/AN2
RA3/AN3
RD4/AN4
RD5/AN5
RD6/AN6
RD7/AN7
CDAC
SUM
V
SS
RC0/REFA
RC1/CMPA
RC2
RC3/T0CKI
RC4
PIC14000
24
23
22
21
20
19
18
17
16
15
Analog Peripherals Features:
• Slope Analog-to-Digital (A/D) converter
- Eight external input channels including two
channels with selectable level shift inputs
- Six internal input channels
- 16-bit programmable timer with capture
register
- 16 ms maximum conversion time at maxi-
mum (16-bit) resolution and 4 MHz clock
- 4-bit programmable current source
• Internal bandgap voltage reference
• Factory calibrated with calibration constants
stored in EPROM
• On-chip temperature sensor
• Voltage regulator control output
• Two comparators with programmable references
• On-chip low voltage detector
Digital Peripherals Features:
• 22 I/O pins with individual direction control
• High current sink/source for direct LED drive
• TMR0: 8-bit timer/counter with 8-bit
programmable prescaler
• 16-bit A/D timer: can be used as a general
purpose timer
• I
2
C
™
serial port compatible with System
Management Bus
CMOS Technology:
•
•
•
•
•
Low-power, high-speed CMOS EPROM technology
Fully static design
Wide-operating voltage range (2.7V to 6.0V)
Commercial and Industrial Temperature Range
Low power dissipation (typical)
- < 3 mA @5V, 4 MHz operating mode
- < 300
µ
A @3V (Sleep mode: clocks stopped
with analog circuits active)
- < 5
µ
A @3V (Hibernate mode: clocks
stopped, analog inactive, and WDT disabled)
Special Microcontroller Features:
• Power-on Reset (POR), Power-up Timer (PWRT)
and Oscillator Start-up Timer (OST)
• Watchdog Timer (WDT) with its own on-chip RC
oscillator for reliable operation
• Multi-segment programmable code-protection
• Selectable oscillator options
- Internal 4 MHz oscillator
- External crystal oscillator
• Serial in-system programming (via two pins)
Applications:
•
•
•
•
•
•
Battery Chargers
Battery Capacity Monitoring
Uninterruptable Power Supply Controllers
Power Management Controllers
HVAC Controllers
Sensing and Data Acquisition
©
1996 Microchip Technology Inc.
Preliminary
This document was created with FrameMaker 4 0 4
DS40122B-page 1
PIC14000
TABLE OF CONTENTS
1.0: General Description........................................................................................................................... 3
2.0: Device Varieties ................................................................................................................................ 5
3.0: Architectural Overview ...................................................................................................................... 7
4.0: Memory Organization ...................................................................................................................... 13
5.0: I/O Ports .......................................................................................................................................... 25
6.0: Timer Modules................................................................................................................................. 37
7.0: Inter-integrated Circuit Serial Port (I
2
C
™
)........................................................................................ 41
8.0: Analog Modules for A/D Conversion ............................................................................................... 57
9.0: Other Analog Modules..................................................................................................................... 65
10.0: Special Features of the CPU ........................................................................................................... 75
11.0: Instruction Set Summary ................................................................................................................. 91
12.0: Development Support.................................................................................................................... 103
13.0: Electrical Characteristics for PIC14000 ..........................................................................................107
14.0: Analog Specifications: PIC14000-04 (Commercial, Industrial)...................................................... 123
Appendix A:PIC16/17 Microcontrollers ....................................................................................................133
Index .........................................................................................................................................................143
PIC14000 Product Identification System ..................................................................................................149
To Our Valued Customers
We constantly strive to improve the quality of all our products and documentation. To this end, we recently converted
to a new publishing software package which we believe will enhance our entire documentation process and product.
As in any conversion process, information may have accidently been altered or deleted. We have spent an excep-
tional amount 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.
DS40122B-page 2
Preliminary
©
1996 Microchip Technology Inc.
PIC14000
1.0
GENERAL DESCRIPTION
The PIC14000 features include medium to high reso-
lution A/D conversion (10 to 16 bits), temperature sens-
ing, closed loop charge control, serial communication,
and low power operation.
The PIC14000 uses a RISC Harvard architecture CPU
with separate 14-bit instruction and 8-bit data buses. A
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 are
available. Additionally, a large register set is included.
PIC16/17 microcontrollers typically achieve a 2:1 code
compression and a 4:1 speed improvement over other
8-bit microcontrollers.
The internal band-gap reference is used for calibrating
the measurements of the analog peripherals. The
calibration factors are stored in EPROM and can be
used to achieve high measurement accuracy.
Power savings modes are available for portable appli-
cations. The SLEEP and HIBERNATE modes offer dif-
ferent levels of power savings. The PIC14000 can
wake up from these modes through interrupts or reset.
A UV erasable CERDIP packaged version is ideal for
code development, while the cost-effective One-Time
Programmable (OTP) version is suitable for production
in any volume.
The PIC14000 fits perfectly in applications for battery
charging, capacity monitoring, and data logging. The
EPROM technology makes customization of
application programs (battery characteristics, feature
sets, etc.) extremely fast and convenient. The small
footprint packages make this microcontroller based
mixed signal device perfect for all applications with
space limitations. Low-cost, low-power, high perfor-
mance, ease of use and I/O flexibility make the
PIC14000 very versatile in other applications such as
temperature monitors/controllers.
Features:
The PIC14000 is a 28-pin device with these features:
• 4K of EPROM
• 192 bytes of RAM
• 22 I/O pins
The analog peripherals include:
• 8 external analog input channels, two with level
shift inputs
• 6 internal analog input channels
• 2 comparators with programmable references
• A bandgap reference
• An internal temperature sensor
• A programmable current source
In addition, the I
2
C serial port through a multiplexer
supports two separate I
2
C channels.
A special oscillator option allows either an internal
4 MHz oscillator or an external crystal oscillator. Using
the internal 4 MHz oscillator requires no external com-
ponents.
The PIC14000 contains three timers, the Watchdog
Timer (WDT), Timer0 (TMR0), and A/D Timer
(ADTMR). The Watchdog Timer includes its own
on-chip RC oscillator providing protection against
software lock-up. TMR0 is a general purpose 8-bit
timer/counter with an 8-bit prescaler. It may be clocked
externally using the RC3/T0CKI pin. The ADTMR is
intended for use with the slope A/D converter, but can
also be used as a general purpose timer. It has an
associated capture register which can be used to mea-
sure the time between events.
An internal low-voltage detect circuit allows for tracking
of voltage levels. Upon detecting the low voltage con-
dition, the PIC14000 can be instructed to save its oper-
ating state then enter an idle state.
1.1
Family and Upward Compatibility
Code written for PIC16C6X/7X can be easily ported to
the PIC14000 (see Appendix A).
1.2
Development Support
The PIC14000 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.
©
1996 Microchip Technology Inc.
Preliminary
This document was created with FrameMaker 4 0 4
DS40122B-page 3
PIC14000
NOTES:
DS40122B-page 4
Preliminary
©
1996 Microchip Technology Inc.
PIC14000
2.0
DEVICE VARIETIES
2.3
A variety of frequency ranges and packaging options
are available. The PIC14000 Product Selection System
section at the end of this data sheet provides the
devices options to be selected for your specific applica-
tion and production requirements. When placing
orders, please use the “PIC14000 Product Identifica-
tion System” at the back of this data sheet to specify the
correct part number.
Quick-Turnaround-Production (QTP)
Devices
2.1
UV Erasable Devices
The UV erasable version, offered in CERDIP package,
is optimal for prototype development and pilot
programs.
The UV erasable version can be erased and
reprogrammed to any of the configuration modes.
Note:
Please note that erasing the device will
also erase the pre-programmed calibration
factors. Please refer to AN621 for more
information.
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 are identical to
the OTP devices but with all EPROM locations and
fuse options already programmed by the factory.
Certain code and prototype verification procedures do
apply before production shipments are available.
Please contact your local Microchip Technology sales
office for more details.
2.4
Serialized Quick-Turnaround
Production (SQTP
SM
) Devices
Microchip's PICSTART
®
,
PICSTART-PLUS and
PRO MATE
™
programmers all support programming of
the PIC14000. Third party programmers also are avail-
able; refer to the
Microchip Third Party Guide
for a list
of sources.
Microchip offers a 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.
2.2
One-Time-Programmable (OTP)
Devices
The availability of OTP devices is especially useful for
customers who need the flexibility for frequent code
updates or small volume applications.
The OTP devices, packaged in plastic packages permit
the user to program them once. In addition to the
program memory, the configuration bits must also be
programmed.
©
1996 Microchip Technology Inc.
Preliminary
This document was created with FrameMaker 4 0 4
DS40122B-page 5