PIC12C67X
8-Pin, 8-Bit CMOS Microcontroller with A/D Converter
and EEPROM Data Memory
Devices Included in this Data Sheet:
•
•
•
•
PIC12C671
PIC12C672
PIC12CE673
PIC12CE674
Note:
Throughout this data sheet
PIC12C67X
refers to the PIC12C671, PIC12C672,
PIC12CE673 and PIC12CE674.
PIC12CE67X
refers to PIC12CE673 and
PIC12CE674.
Pin Diagrams:
PDIP, SOIC, Windowed CERDIP
V
DD
GP5/OSC1/CLKIN
GP4/OSC2/AN3/
CLKOUT
GP3/MCLR/V
PP
1
2
3
4
8
7
6
5
V
SS
GP0/AN0
GP1/AN1/V
REF
GP2/T0CKI/AN2/
INT
PDIP, Windowed CERDIP
V
DD
GP5/OSC1/CLKIN
GP4/OSC2/AN3/
CLKOUT
GP3/MCLR/V
PP
1
2
3
4
8
7
6
5
V
SS
GP0/AN0
GP1/AN1/V
REF
GP2/T0CKI/AN2/
INT
PIC12C671
PIC12C672
PIC12CE673
PIC12CE674
High-Performance RISC CPU:
• Only 35 single word instructions to learn
• All instructions are single cycle (400 ns) except for
program branches which are two-cycle
• Operating speed: DC - 10 MHz clock input
DC - 400 ns instruction cycle
Memory
Device
Program
PIC12C671
PIC12C672
PIC12CE673
PIC12CE674
•
•
•
•
•
•
1024 x 14
2048 x 14
1024 x 14
2048 x 14
Data
RAM
128 x 8
128 x 8
128 x 8
128 x 8
Data
EEPROM
—
—
16 x 8
16 x 8
Special Microcontroller Features:
•
•
•
•
•
•
•
•
•
•
•
•
In-Circuit Serial Programming (ICSP™)
Internal 4 MHz oscillator with programmable calibration
Selectable clockout
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
Programmable code protection
Power saving SLEEP mode
Interrupt-on-pin change (GP0, GP1, GP3)
Internal pull-ups on I/O pins (GP0, GP1, GP3)
Internal pull-up on MCLR pin
Selectable oscillator options:
- INTRC: Precision internal 4 MHz oscillator
- EXTRC: External low-cost RC oscillator
- XT:
Standard crystal/resonator
- HS:
High speed crystal/resonator
- LP:
Power saving, low frequency crystal
14-bit wide instructions
8-bit wide data path
Interrupt capability
Special function hardware registers
8-level deep hardware stack
Direct, indirect and relative addressing modes for
data and instructions
Peripheral Features:
• Four-channel, 8-bit A/D converter
• 8-bit real time clock/counter (TMR0) with 8-bit
programmable prescaler
• 1,000,000 erase/write cycle EEPROM data
memory
• EEPROM data retention > 40 years
CMOS Technology:
• Low-power, high-speed CMOS EPROM/EEPROM
technology
• Fully static design
• Wide operating voltage range 2.5V to 5.5V
• Commercial, Industrial and Extended
temperature ranges
• Low power consumption
< 2 mA @ 5V, 4 MHz
15
µA
typical @ 3V, 32 kHz
< 1
µA
typical standby current
©
1999 Microchip Technology Inc.
DS30561B-page 1
PIC12C67X
Table of Contents
1.0 General Description ...................................................................................................................................................................... 3
2.0 PIC12C67X Device Varieties ........................................................................................................................................................ 5
3.0 Architectural Overview .................................................................................................................................................................. 7
4.0 Memory Organization.................................................................................................................................................................. 11
5.0 I/O Port........................................................................................................................................................................................ 25
6.0 EEPROM Peripheral Operation .................................................................................................................................................. 33
7.0 Timer0 Module ............................................................................................................................................................................ 39
8.0 Analog-to-Digital Converter (A/D) Module................................................................................................................................... 45
9.0 Special Features of the CPU....................................................................................................................................................... 53
10.0 Instruction Set Summary............................................................................................................................................................. 69
11.0 Development Support ................................................................................................................................................................. 83
12.0 Electrical Specifications .............................................................................................................................................................. 89
13.0 DC and AC Characteristics ....................................................................................................................................................... 109
14.0 Packaging Information .............................................................................................................................................................. 115
Appendix A:Compatibility ................................................................................................................................................................... 119
Appendix B:Code for Accessing EEPROM Data Memory ................................................................................................................. 119
Index .................................................................................................................................................................................................. 121
On-Line Support................................................................................................................................................................................. 125
Reader Response .............................................................................................................................................................................. 126
PIC12C67X Product Identification System ........................................................................................................................................ 127
To Our Valued Customers
Most Current Data Sheet
To automatically obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at:
http://www.microchip.com
You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page.
The last character of the literature number is the version number. e.g., DS30000A is version A of document DS30000.
New Customer Notification System
Register on our web site (www.microchip.com/cn) to receive the most current information on our products.
Errata
An errata sheet may exist for current devices, describing minor operational differences (from the data sheet) and recommended
workarounds. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revi-
sion of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
• The Microchip Corporate Literature Center; U.S. FAX: (480) 786-7277
When contacting a sales office or the literature center, please specify which device, revision of silicon and data sheet (include liter-
ature number) you are using.
Corrections to this Data Sheet
We constantly strive to improve the quality of all our products and documentation. We have spent a great deal of time to ensure
that this document is 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:
• Fill out and mail in the reader response form in the back of this data sheet.
• E-mail us at webmaster@microchip.com.
We appreciate your assistance in making this a better document.
DS30561B-page 2
©
1999 Microchip Technology Inc.
PIC12C67X
1.0
GENERAL DESCRIPTION
The PIC12C67X devices are low-cost, high-perfor-
mance, CMOS, fully-static, 8-bit microcontrollers with
integrated analog-to-digital (A/D) converter and
EEPROM data memory (EEPROM on PIC12CE67X
versions only).
All PICmicro
®
microcontrollers employ an advanced
RISC architecture. The PIC12C67X microcontrollers
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
the separate 8-bit wide data. 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 gives
some of the architectural innovations used to achieve a
very high performance.
PIC12C67X microcontrollers typically achieve a 2:1
code compression and a 4:1 speed improvement over
other 8-bit microcontrollers in their class.
The PIC12C67X devices have 128 bytes of RAM, 16
bytes of EEPROM data memory (PIC12CE67X only), 5
I/O pins and 1 input pin. In addition a timer/counter is
available. Also a 4-channel, high-speed, 8-bit A/D is
provided. The 8-bit resolution is ideally suited for appli-
cations requiring low-cost analog interface, (i.e.,
thermostat control, pressure sensing, etc.)
The PIC12C67X devices have special features to
reduce external components, thus reducing cost,
enhancing system reliability and reducing power con-
sumption. The Power-On Reset (POR), Power-up
Timer (PWRT), and Oscillator Start-up Timer (OST)
eliminate the need for external reset circuitry. There are
five oscillator configurations to choose from, including
INTRC precision internal oscillator mode and the
power-saving LP (Low Power) oscillator mode. Power-
saving SLEEP mode, Watchdog Timer and code
protection features improve system cost, power and
reliability. The SLEEP (power-down) feature provides a
power-saving mode. The user can wake-up 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.
A UV erasable windowed package version is ideal for
code development, while the cost-effective One-Time-
Programmable (OTP) version is suitable for production
in any volume. The customer can take full advantage of
Microchip’s price leadership in OTP microcontrollers,
while benefiting from the OTP’s flexibility.
1.1
Applications
The PIC12C67X series fits perfectly in applications
ranging from personal care appliances and security
systems to low-power remote transmitters/receivers.
The EPROM technology makes customizing applica-
tion programs (transmitter codes, appliance settings,
receiver frequencies, etc.) extremely fast and conve-
nient, while the EEPROM data memory (PIC12CE67X
only) technology allows for the changing of calibration
factors and security codes. The small footprint pack-
ages, for through hole or surface mounting, make this
microcontroller series perfect for applications with
space limitations. Low-cost, low-power, high perfor-
mance, ease of use and I/O flexibility make the
PIC12C67X series very versatile even in areas where
no microcontroller use has been considered before
(i.e., timer functions, replacement of "glue" logic and
PLD’s in larger systems, coprocessor applications).
1.2
Family and Upward Compatibility
The PIC12C67X products are compatible with other
members of the 14-bit PIC16CXXX families.
1.3
Development Support
The PIC12C67X devices are 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.
©
1999 Microchip Technology Inc.
DS30561B-page 3
PIC12C67X
TABLE 1-1:
PIC12C67X & PIC12CE67X FAMILY OF DEVICES
PIC12C671
Maximum
Frequency
of Operation
(MHz)
EPROM
Program
Memory
RAM Data
Memory
(bytes)
10
PIC12LC671
10
PIC12C672
10
PIC12LC672 PIC12CE673 PIC12LCE673 PIC12CE674 PIC12LCE674
10
10
10
10
10
Clock
1024 x 14
1024 x 14
2048 x 14
2048 x 14
1024 x 14
1024 x 14
2048 x 14
2048 x 14
Memory
128
128
128
128
128
128
128
128
EEPROM
—
Data Memory
(bytes)
Peripherals
Timer
Module(s)
A/D Con-
verter (8-bit)
Channels
Wake-up
from SLEEP
on pin
change
Interrupt
Sources
Features
I/O Pins
Input Pins
Internal
Pull-ups
TMR0
4
—
—
—
16
16
16
16
TMR0
4
TMR0
4
TMR0
4
TMR0
4
TMR0
4
TMR0
4
TMR0
4
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
4
5
1
Yes
4
5
1
Yes
Yes
4
5
1
Yes
Yes
4
5
1
Yes
Yes
4
5
1
Yes
Yes
4
5
1
Yes
Yes
4
5
1
Yes
Yes
4
5
1
Yes
Yes
In-Circuit
Yes
Serial
Programming
Number of
Instructions
35
35
2.5V - 5.5V
8-pin DIP,
JW, SOIC
35
3.0V - 5.5V
8-pin DIP,
JW, SOIC
35
2.5V - 5.5V
8-pin DIP,
JW, SOIC
35
3.0V - 5.5V
8-pin DIP,
JW
35
2.5V - 5.5V
8-pin DIP,
JW
35
3.0V - 5.5V
8-pin DIP,
JW
35
2.5V - 5.5V
8-pin DIP,
JW
Voltage
3.0V - 5.5V
Range (Volts)
Packages
8-pin DIP,
JW, SOIC
All PIC12C67X devices have Power-on Reset, selectable Watchdog Timer, selectable code protect and high I/O current capability.
All PIC12C67X devices use serial programming with data pin GP0 and clock pin GP1.
DS30561B-page 4
©
1999 Microchip Technology Inc.
PIC12C67X
2.0
PIC12C67X DEVICE VARIETIES
2.3
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 the PIC12C67X Product Iden-
tification System section at the end of this data sheet.
When placing orders, please use that page of the data
sheet to specify the correct part number.
For example, the PIC12C67X device “type” is indicated
in the device number:
1.
C,
as in PIC12C671. These devices have
EPROM type memory and operate over the
standard voltage range.
LC,
as in PIC12LC671. These devices have
EPROM type memory and operate over an
extended voltage range.
CE,
as in PIC12CE674. These devices have
EPROM type memory, EEPROM data memory
and operate over the standard voltage range.
LCE,
as in PIC12LCE674. These devices have
EPROM type memory, EEPROM data memory
and operate over an extended voltage range.
Quick-Turn-Programming (QTP)
Devices
Microchip offers a QTP Programming Service for fac-
tory 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 stabi-
lized. The devices are identical to the OTP devices, but
with all EPROM locations and configuration options
already programmed by the factory. Certain code and
prototype verification procedures apply before produc-
tion shipments are available. Please contact your local
Microchip Technology sales office for more details.
2.4
2.
Serialized Quick-Turn Programming
(SQTP
SM
) Devices
3.
Microchip offers a unique programming service where
a few user-defined locations in each device are pro-
grammed with different serial numbers. The serial num-
bers 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.
4.
2.1
UV Erasable Devices
The UV erasable version, offered in windowed pack-
age, is optimal for prototype development and pilot pro-
grams.
The UV erasable version can be erased and repro-
grammed to any of the configuration modes.
Microchip's PICSTART
®
Plus and PRO MATE
®
pro-
grammers both support the PIC12C67X. Third party
programmers also are available; refer to the Microchip
Third Party Guide for a list of sources.
Note:
Please note that erasing the device will
also erase the pre-programmed internal
calibration value for the internal oscillator.
The calibration value must be saved prior
to erasing the part.
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 and small volume applications.
The OTP devices, packaged in plastic packages, per-
mit the user to program them once. In addition to the
program memory, the configuration bits must also be
programmed.
©
1999 Microchip Technology Inc.
DS30561B-page 5