PIC16C781/782
Data Sheet
8-Bit CMOS Microcontrollers with A/D,
D/A, OPAMP, Comparators and PSMC
2001 Microchip Technology Inc.
Preliminary
DS41171A
Note the following details of the code protection feature on PICmicro
®
MCUs.
•
•
•
The PICmicro family meets the specifications contained in the Microchip Data Sheet.
Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today,
when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowl-
edge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet.
The person doing so may be engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable”.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of
our product.
•
•
•
If you have any further questions about this matter, please contact the local sales office nearest to you.
Information contained in this publication regarding device
applications and the like is intended through suggestion only
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
No representation or warranty is given and no liability is
assumed by Microchip Technology Incorporated with respect
to the accuracy or use of such information, or infringement of
patents or other intellectual property rights arising from such
use or otherwise. Use of Microchip’s products as critical com-
ponents in life support systems is not authorized except with
express written approval by Microchip. No licenses are con-
veyed, implicitly or otherwise, under any intellectual property
rights.
Trademarks
The Microchip name and logo, the Microchip logo, PIC, PICmicro,
PICMASTER, PICSTART, PRO MATE, K
EE
L
OQ
, SEEVAL,
MPLAB and The Embedded Control Solutions Company are reg-
istered trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
Total Endurance, ICSP, In-Circuit Serial Programming, Filter-
Lab, MXDEV, microID,
FlexROM, fuzzyLAB,
MPASM,
MPLINK, MPLIB, PICC, PICDEM, PICDEM.net, ICEPIC,
Migratable Memory, FanSense, ECONOMONITOR, Select
Mode and microPort are trademarks of Microchip Technology
Incorporated in the U.S.A.
Serialized Quick Term Programming (SQTP) is a service mark
of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2001, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received QS-9000 quality system
certification for its worldwide headquarters,
design and wafer fabrication facilities in
Chandler and Tempe, Arizona in July 1999. The
Company’s quality system processes and
procedures are QS-9000 compliant for its
PICmicro
®
8-bit MCUs, K
EE
L
OQ
®
code hopping
devices, Serial EEPROMs and microperipheral
products. In addition, Microchip’s quality
system for the design and manufacture of
development systems is ISO 9001 certified.
DS41171A - page ii
Preliminary
2001 Microchip Technology Inc.
PIC16C781/782
8-Bit CMOS Microcontrollers with A/D, D/A, OPAMP,
Comparators and PSMC
Microcontroller Core Features:
• High performance RISC CPU
• Only 35 single word instructions to learn
• All single cycle instructions except for program
branches which are two cycle
• Direct, indirect and relative addressing modes
- Operating speed: DC - 20 MHz clock input
DC - 200 ns instruction cycle
Device
PIC16C781
PIC16C782
Program
Memory
X14
1K
2K
Data Memory
X8
128
128
Microcontroller Core Features (Continued):
• Low power, high speed CMOS EPROM
technology
• Fully static design
• Low power consumption:
- < 2 mA @ 5V, 4 MHz
- < 1
µA
typical standby current.
Pin Diagram
PDIP, Windowed CERDIP, SOIC, SSOP
RA0/AN0/OPA+
RA1/AN1/OPA-
RA4/T0CKI
RA5/MCLR/V
PP
V
SS
AV
SS
RA2/AN2/V
REF
2
RA3/AN3/V
REF
1
RB0/INT/AN4/V
R
RB1/AN5/V
DAC
•1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
20
19
18
17
16
15
14
13
12
11
RB3/AN7/OPA
RB2/AN6
RA7/OSC1/CLKIN
RA6/OSC2/CLKOUT/T1CKI
V
DD
AV
DD
RB7/C2/PSMC1B/T1G
RB6/C1/PSMC1A
RB5
RB4
PIC16C781/782
• 8-level deep hardware stack
• Interrupt capability (up to 8 internal/external
interrupt sources)
• 16 I/O pins:
- Individual direction control (13 pins)
- Input only (3 pins), low leakage (2 pins)
- Digital/Analog inputs (8 pins)
• Programmable PORTB interrupt-on-change (8 pins)
• Programmable PORTB weak pull-ups (8 pins)
• Power-on Reset (POR)
• Power-up Timer (PWRT) and
Oscillator Start-up Timer (OST)
• Watchdog Timer (WDT) with a software enabled
option and its own on-chip RC oscillator for
reliable operation
• Programmable Brown-out Reset (BOR)
• Programmable Low Voltage Detection (LVD)
• Internal/external MCLR
• Programmable code protection
• Power saving SLEEP mode
• Selectable oscillator options:
HS, XT, LP, EC, RC, INTRC (4 MHz/37 kHz)
• In-Circuit Serial Programming™ (ISCP™)
• Program Memory Read (PMR) capability
• Four user programmable ID locations
• Wide operating voltage range:
- 2.5V to 5.5V for commercial and industrial
temperature ranges
- Extended temperature range available
Peripheral Features:
• Timer0: 8-bit timer/counter with 8-bit prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Option to use OSC1 and OSC2 in LP mode
as Timer1 oscillator, if INTRC oscillator mode
selected
• Analog-to-Digital Converter (ADC):
- 8-bit resolution
- Programmable 8-channel input
- Internal voltages available for self-
diagnostics
• Digital-to-Analog Converter (DAC):
- 8-bit resolution
- Reference from AV
DD
, V
REF
1, or V
R
module
- Output configurable to V
DAC
pin, Compara-
tors, and ADC reference
• Operational Amplifier module (OPA):
- Firmware initiated input offset voltage Auto
Calibration module
- Low leakage inputs
- Programmable Gain Bandwidth Product
(GBWP)
2001 Microchip Technology Inc.
Preliminary
DS41171A-page 1
PIC16C781/782
Peripheral Features (Continued):
• Dual Analog Comparator module with:
- Individual enable and interrupt bits
- Programmable speed and output polarity
- Fully configurable inputs and outputs
- Reference from DAC, or V
REF
1/V
REF
2
- Low input offset voltage.
• V
R
voltage reference module:
- 3.072V +/- 0.7% @25°C, AV
DD
= 5V
- Configurable output to ADC reference, DAC
reference, and V
R
pin
- 5 mA sink/source
• Programmable Switch Mode Controller module:
- PWM and PSM modes
- Programmable switching frequency
- Configurable for either single or dual
feedback inputs
- Configurable single or dual outputs
- Slope compensation output available in
single output mode
Key Features
PICmicro™ Mid-Range
Reference Manual
(DS33023)
Operating Frequency
RESETS (and Delays)
Program Memory (14 bit words)
Data Memory (bytes)
Interrupts
I/O Ports
Timers
Programmable Switch Mode Controller
8-bit Analog-to-Digital Module
ADC channels
8-bit Digital-to-Analog Module
Comparators
Comparator Channels
Operational Amplifier
Voltage Reference
Brown-out Reset
Programmable Low Voltage Detect
Instruction Set
PIC16C781
PIC16C782
DC - 20 MHz
1K
128
8
13 + 3 Input only
2
1
1
8 External, 2 Internal
1
2
4 (AN<7:4>)
1
1
Yes
Yes
35 Instructions
DC - 20 MHZ
2K
128
8
13 + 3 Input only
2
1
1
8 External, 2 Internal
1
2
4 (AN<7:4>)
1
1
Yes
Yes
35 Instructions
POR, BOR, MCLR, WDT (PWRT, OST) POR, BOR, MCLR, WDT (PWRT, OST)
DS41171A-page 2
Preliminary
2001 Microchip Technology Inc.
PIC16C781/782
Table of Contents
1.0 Device Overview ......................................................................................................................................................................... 5
2.0 Memory Organization ................................................................................................................................................................ 11
3.0 I/O Ports .................................................................................................................................................................................... 25
4.0 Program Memory Read (PMR) .................................................................................................................................................. 47
5.0 Timer0 Module .......................................................................................................................................................................... 51
6.0 Timer1 Module with Gate Control .............................................................................................................................................. 55
7.0 Voltage Reference Module (V
R
) ................................................................................................................................................ 61
8.0 Programmable Low Voltage Detect Module (PLVD) ................................................................................................................. 63
9.0 Analog-to-Digital Converter (ADC) Module ............................................................................................................................... 69
10.0 Digital-to-Analog Converter (DAC) Module ............................................................................................................................... 79
11.0 Operational Amplifier (OPA) Module ......................................................................................................................................... 83
12.0 Comparator Module ................................................................................................................................................................... 89
13.0 Programmable Switch Mode Controller (PSMC) ....................................................................................................................... 99
14.0 Special Features of The CPU .................................................................................................................................................. 117
15.0 Instruction Set Summary ......................................................................................................................................................... 133
16.0 Development Support .............................................................................................................................................................. 141
17.0 Electrical Characteristics ......................................................................................................................................................... 147
18.0 DC and AC Characteristics Graphs and Tables ...................................................................................................................... 167
19.0 Packaging Information ............................................................................................................................................................. 169
Index .................................................................................................................................................................................................. 175
On-Line Support................................................................................................................................................................................. 181
Reader Response .............................................................................................................................................................................. 182
PIC16C781/782 Product Identification System .................................................................................................................................. 183
TO OUR VALUED CUSTOMERS
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip
products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and
enhanced as new volumes and updates are introduced.
If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via
E-mail at
docerrors@mail.microchip.com
or fax the
Reader Response Form
in the back of this data sheet to (480) 792-4150.
We welcome your feedback.
Most Current Data Sheet
To 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).
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision
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) 792-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.
Customer Notification System
Register on our web site at
www.microchip.com/cn
to receive the most current information on all of our products.
2001 Microchip Technology Inc.
Preliminary
DS41171A-page 3