PIC12(L)F1571/2
8-Pin MCU with High-Precision 16-Bit PWMs
Description:
PIC12(L)F1571/2 microcontrollers combine the capabilities of 16-bit PWMs with Analog to suit a variety of applications.
These devices deliver three 16-bit PWMs with independent timers for applications where high resolution is needed, such
as LED lighting, stepper motors, power supplies and other general purpose applications. The core independent
peripherals (16-bit PWMs, Complementary Waveform Generator), Enhanced Universal Synchronous Asynchronous
Receiver Transceiver (EUSART) and Analog (ADCs, Comparator and DAC) enable closed-loop feedback and
communication for use in multiple market segments. The EUSART peripheral enables the communication for
applications such as LIN.
Core Features:
• C Compiler Optimized RISC Architecture
• Only 49 Instructions
• Operating Speed:
- DC – 32 MHz clock input
- 125 ns minimum instruction cycle
• Interrupt Capability
• 16-Level Deep Hardware Stack
• Two 8-Bit Timers
• One 16-Bit Timer
• Three Additional 16-Bit Timers available using the
16-Bit PWMs
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Low-Power Brown-out Reset (LPBOR)
• Programmable Watchdog Timer (WDT) up to 256s
• Programmable Code Protection
eXtreme Low-Power (XLP) Features:
• Sleep mode: 20 nA @ 1.8V, Typical
• Watchdog Timer: 260 nA @ 1.8V, Typical
• Operating Current:
- 30
A/MHz
@ 1.8V, typical
Digital Peripherals:
• 16-Bit PWM:
- Three 16-bit PWMs with independent timers
- Multiple Output modes (Edge-Aligned,
Center-Aligned, Set and Toggle on
Register Match)
- User settings for phase, duty cycle, period,
offset and polarity
- 16-bit timer capability
- Interrupts generated based on timer matches
with Offset, Duty Cycle, Period and Phase
registers
• Complementary Waveform Generator (CWG):
- Rising and falling edge dead-band control
- Multiple signal sources
• Enhanced Universal Synchronous Asynchronous
Receiver Transceiver (EUSART):
- Supports LIN applications
Memory:
•
•
•
•
Up to 3.5 Kbytes Flash Program Memory
Up to 256 Bytes Data SRAM Memory
Direct, Indirect and Relative Addressing modes
High-Endurance Flash Data Memory (HEF)
- 128 bytes if nonvolatile data storage
- 100k erase/write cycles
Device I/O Port Features:
• Six I/Os
• Individually Selectable Weak Pull-ups
• Interrupt-On-Change Pins Option with
Edge-Selectable Option
Operating Characteristics:
• Operating Voltage Range:
- 1.8V to 3.6V (PIC12LF1571/2)
- 2.3V to 5.5V (PIC12F1571/2)
• Temperature Range:
- Industrial: -40°C to +85°C
- Extended: -40°C to +125°C
• Internal Voltage Reference module
• In-Circuit Serial Programming™ (ICSP™) via
Two Pins
2013-2015 Microchip Technology Inc.
DS40001723D-page 1
PIC12(L)F1571/2
Analog Peripherals:
• 10-Bit Analog-to-Digital Converter (ADC):
- Up to four external channels
- Conversion available during Sleep
• Comparator:
- Low-Power/High-Speed modes
- Fixed Voltage Reference at (non)inverting
input(s)
- Comparator outputs externally accessible
- Synchronization with Timer1 clock source
- Software hysteresis enable
• 5-Bit Digital-to-Analog Converter (DAC):
- 5-bit resolution, rail-to-rail
- Positive reference selection
- Unbuffered I/O pin output
- Internal connections to ADCs and
comparators
• Voltage Reference:
- Fixed voltage reference with 1.024V, 2.048V
and 4.096V output levels
Clocking Structure:
• Precision Internal Oscillator:
- Factory calibrated ±1%, typical
- Software-selectable clock speeds from
31 kHz to 32 MHz
• External Oscillator Block with:
- Resonator modes up to 20 MHz
- Two External Clock modes up to 32 MHz
• Fail-Safe Clock Monitor
• Digital Oscillator Input Available
PIC12(L)F1571/2 FAMILY TYPES
Program Memory Flash
(K words)
Data SRAM (bytes)
8-Bit/16-Bit Timers
Data Sheet Index
High-Endurance
Flash (bytes)
10-Bit ADC (ch)
Comparators
16-Bit PWM
5-Bit DAC
EUSART
Debug
(1)
I
I
I/O Pins
CWG
Device
PIC12(L)F1571
PIC12(L)F1572
Note 1:
2:
A
A
A
1
2
128
256
128
128
6
6
2/4
(2)
2/4
(2)
1
1
3
3
4
4
1
1
1
1
0
1
I – Debugging integrated on chip.
Three additional 16-bit timers available when not using the 16-bit PWM outputs.
DS40001723
PIC12(L)F1571/2 Data Sheet, 8-Pin Flash, 8-Bit MCU with High-Precision 16-Bit PWM.
Data Sheet Index:
(Unshaded devices are described in this document.)
DS40001723D-page 2
2013-2015 Microchip Technology Inc.
XLP
Y
Y
PIC12(L)F1571/2
PIN DIAGRAMS
Pin Diagram – 8-Pin PDIP, SOIC, DFN, MSOP, UDFN
V
DD
RA5
RA4
RA3/MCLR/V
PP
1
PIC12(L)F1571
PIC12(L)F1572
2
3
4
8
7
6
5
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
Note:
See
Table 1
for location of all peripheral functions.
TABLE 1:
8-Pin PDIP/SOIC/MSOP/DFN/UDFN
8-PIN ALLOCATION TABLE (PIC12(L)F1571/2)
Comparator
EUSART
(2)
Reference
Interrupt
Pull-up
Timers
RA0
RA1
RA2
RA3
RA4
RA5
V
DD
Vss
Note 1:
2:
7
6
5
4
3
2
1
8
AN0
AN1
AN2
—
AN3
—
—
—
DAC1OUT
V
REF
+
—
—
—
—
—
—
C1IN+
C1IN0-
C1OUT
—
C1IN1-
—
—
—
—
—
T0CKI
T1G
(1)
T1G
T1CKI
—
—
PWM2
PWM1
PWM3
—
PWM2
(1)
PWM1
(1)
—
—
TX
(2)
CK
(2)
RX
(2)
DT
(2)
—
—
TX
(1,2)
CK
(1,2)
RX
(1,2)
DT
(1,2)
—
—
CWG1B
—
CWG1FLT
CWG1A
—
CWG1B
(1)
CWG1A
(1)
—
—
IOC
IOC
IOC
INT
IOC
IOC
IOC
—
—
Y
Y
Y
Y
Y
Y
—
—
ICSPDAT
ICDDAT
ICSPCLK
ICDCLK
—
MCLR
V
PP
CLKOUT
CLKIN
V
DD
V
SS
Alternate pin function selected with the APFCON (Register
11-1)
register.
PIC12(L)F1572 only.
2013-2015 Microchip Technology Inc.
DS40001723D-page 3
Basic
CWG
PWM
ADC
I/O
PIC12(L)F1571/2
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 7
2.0 Enhanced Mid-Range CPU ........................................................................................................................................................ 13
3.0 Memory Organization ................................................................................................................................................................. 15
4.0 Device Configuration .................................................................................................................................................................. 41
5.0 Oscillator Module........................................................................................................................................................................ 47
6.0 Resets ........................................................................................................................................................................................ 59
7.0 Interrupts .................................................................................................................................................................................... 69
8.0 Power-Down Mode (Sleep) ........................................................................................................................................................ 83
9.0 Watchdog Timer (WDT) ............................................................................................................................................................. 87
10.0 Flash Program Memory Control ................................................................................................................................................. 91
11.0 I/O Ports ................................................................................................................................................................................... 109
12.0 Interrupt-On-Change ................................................................................................................................................................ 119
13.0 Fixed Voltage Reference (FVR) ............................................................................................................................................... 123
14.0 Temperature Indicator Module ................................................................................................................................................. 127
15.0 Analog-to-Digital Converter (ADC) Module .............................................................................................................................. 129
16.0 5-Bit Digital-to-Analog Converter (DAC) Module ...................................................................................................................... 143
17.0 Comparator Module.................................................................................................................................................................. 147
18.0 Timer0 Module ......................................................................................................................................................................... 155
19.0 Timer1 Module with Gate Control............................................................................................................................................. 159
20.0 Timer2 Module ......................................................................................................................................................................... 171
21.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) ............................................................... 175
22.0 16-Bit Pulse-Width Modulation (PWM) Module ........................................................................................................................ 203
23.0 Complementary Waveform Generator (CWG) Module ............................................................................................................ 231
24.0 In-Circuit Serial Programming™ (ICSP™) ............................................................................................................................... 243
25.0 Instruction Set Summary .......................................................................................................................................................... 245
26.0 Electrical Specifications............................................................................................................................................................ 259
27.0 DC and AC Characteristics Graphs and Charts ....................................................................................................................... 283
28.0 Development Support............................................................................................................................................................... 305
29.0 Packaging Information.............................................................................................................................................................. 309
Appendix A: Data Sheet Revision History.......................................................................................................................................... 327
The Microchip Web Site ..................................................................................................................................................................... 329
Customer Change Notification Service .............................................................................................................................................. 329
Customer Support .............................................................................................................................................................................. 329
Product Identification System............................................................................................................................................................. 331
DS40001723D-page 4
2013-2015 Microchip Technology Inc.
PIC12(L)F1571/2
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@microchip.com.
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., DS30000000A is version A of document DS30000000).
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)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
Customer Notification System
Register on our web site at
www.microchip.com
to receive the most current information on all of our products.
2013-2015 Microchip Technology Inc.
DS40001723D-page 5