PIC12(L)F1612/16(L)F1613
8/14/16-Pin, 8-Bit Flash Microcontroller
Description:
PIC12(L)F1612/16(L)F1613 microcontrollers deliver
on-chip features that are unique to the design for
embedded control of small motors and general purpose
applications in 8 and 14-pin count packages. Features
like 10-bit A/D, CCP, 24-bit SMT and Zero-Cross
Detection offer an excellent solution to a variety of
applications. The CRC and Window WDT are provided
to support safety-critical applications in home
appliances and white goods.
Clocking Structure:
• Precision Internal Oscillator:
- Factory calibrated to ±1%, typical
- Software-selectable frequency range from
32 MHz to 31 kHz
• 31 kHz Low-Power Internal Oscillator
• External Oscillator Block with:
- Three external clock modes up to 32 MHz
• 4x Phase-Locked Loop (PLL)
Digital Peripherals:
• Up to 11 I/O Pins and one Input-only Pin:
- Individually programmable interrupt-on-
change pins
- Individually programmable weak pull-ups
- Individual programmable digital port controls
(Input level selection, open drain, slew rate
control)
• Timer0: 8-Bit Timer/Counter with 8-Bit
Programmable Prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Timer Clock In (T1CKI)
• Enhanced Timer2/4/6:
- 8-bit timer/counter with 8-bit period register
- 1:1 up to 1:16 linear Postscaler
- 1:1 up to 128:1 Prescaler
- Asynchronous clock source capability
- External Reset/Gate sources
- One-shot count operation
• Two Capture, Compare, PWM modules:
- 16-bit Capture/Compare
- 10-bit PWM
• Two Signal Measurement Timers (SMT):
- 24-bit Signal Measurement Timer
- Up to 12 different Acquisition modes
- Two 24-bit result Buffer registers
- Input polarity control
• 16-Bit CRC:
- Software-selectable polynomial
- Software-selectable data width
- Integrated CCPR memory scan capability for
memory integrity checking
Core Features:
• C Compiler Optimized RISC Architecture
• Only 49 Instructions
• Operating Speed:
- 0-32 MHz clock input
- 125 ns minimum instruction cycle
• Interrupt Capability with Automatic Context
Saving
• 16-Level Deep Hardware Stack with Optional
Overflow/Underflow Reset
• Direct, Indirect and Relative Addressing modes:
- Two full 16-bit File Select Registers (FSRs)
- FSRs can read program and data memory
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Brown-out Reset (BOR) with Selectable Trip Point
• Windowed Watchdog Timer (WWDT):
- Variable prescaler selection
- Variable window size selection
- All sources configurable in hardware or
software
Memory:
• Up to 2 Kwords Flash Program Memory
• Up to 256 Bytes Data SRAM Memory
• Direct, Indirect and Relative Addressing modes
Operating Characteristics:
• In-Circuit Serial Programming™ (ICSP™) via Two
Pins
• Enhanced Low-Voltage Programming (LVP)
• Operating Voltage Range:
- 1.8V to 3.6V (PIC12LF1612/16LF1613)
- 2.3V to 5.5V (PIC12F1612/16F1613)
• Programmable Code Protection
• Self-Programmable under Software Control
2014 Microchip Technology Inc.
Preliminary
DS40001737A-page 1
PIC12(L)F1612/16(L)F1613
Digital Peripherals (Continued):
• Complementary Waveform Generator (CWG):
- Multiple signal sources
- True and complement from any source
- Programmable one to four crossover
- Programmable dead band
- Fault-shutdown input
Packages:
• PIC12(L)F1612:
- 8-pin: PDIP, SOIC, DFN
• PIC16(L)F1613:
- 14-pin: PDIP, SOIC, TSSOP
- 16-pin: QFN (4x4x0.9)
Analog Peripherals:
• Analog-to-Digital Converter (ADC):
- 10-bit resolution
- Up to eight channels
• Voltage Reference module:
- Fixed Voltage Reference (FVR) with 1.024V,
2.048V and 4.096V output levels
- 8-bit rail-to-rail resistive DAC with positive
reference selection
• Zero Cross Detector:
- Detect when AC signal on pin passes through
ground
• Up to Two Comparators:
- Rail-to-rail inputs
- Power mode control
- Software-controllable hysteresis
Debug Features:
• In-Circuit Debug (ICD):
- Integrated: supports all services
- Header: not required
• Emulation:
- Header: supports all devices
TABLE 1:
PIC12/16(L)F161X FAMILY TYPES
CRC with Memory Scan
Program Memory Flash
(W)
8-bit/16-bit Timers
Window Watchdog
Timer
Zero-Cross Detect
Math Accelerator
Data Sheet Index
CCP/10-bit PWM
10-bit ADC (ch)
Angular Timer
Comparators
Data SRAM
(bytes)
I
2
C™/SPI
0
0
1
1
1
1
SMT/HLT
Device
PIC12(L)F1612
PIC16(L)F1613
PIC16(L)F1614
PIC16(L)F1615
PIC16(L)F1618
PIC16(L)F1619
Note 1:
A.
B.
C.
Data Sheet Index:
(A)
(A)
(B)
(C)
(B)
(C)
2048
2048
4096
8192
4096
8192
256
256
512
1024
512
1024
6
12
12
12
18
18
1/1
1/1
1/3
1/3
1/3
1/3
1
2
2
2
2
2
4
8
8
8
12
12
1
1
1
1
1
1
2/0
2/0
2/2
2/2
2/2
2/2
1
1
1
1
1
1
0
0
2
4
2
4
2/3
2/3
2/3
2/3
2/3
2/3
0
0
1
1
1
1
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
0
0
1
1
1
1
EUSART
0
0
1
1
1
1
Debugging Methods: (I) – Integrated on Chip; (H) – via ICD Header; E – using Emulation Product.
DS40001737
Future Release
Future Release
PIC12(L)F1612/16(L)F1613 Data Sheet, 8/14-Pin, 8-bit Flash Microcontrollers
PIC16(L)F1614/8 Data Sheet, 14/20-Pin, 8-bit Flash Microcontrollers
PIC16(L)F1615/9 Data Sheet, 14/20-Pin, 8-bit Flash Microcontrollers
Note:
For other small form-factor package availability and marking information, please visit
http://www.microchip.com/packaging
or contact your local sales office.
DS40001737A-page 2
Preliminary
2014 Microchip Technology Inc.
Debug
(1)
I/H
I/H
I/H
I/H
I/H
I/H
I/O Pins
CWG
CLC
PIC12(L)F1612/16(L)F1613
PIN DIAGRAMS
Pin Diagram – 8-PIN PDIP, SOIC, DFN, UDFN
PIC12F1612
PIC12LF1612
V
DD
RA5
RA4
1
2
8
7
6
5
V
SS
RA0
RA1
RA2
3
RA3 4
Note:
See
Table 2
for location of all peripheral functions.
Pin Diagram – 14-PIN PDIP, SOIC, TSSOP
V
DD
RA5
RA4
RA3
RC5
RC4
RC3
1
PIC16F1613
PIC16LF1613
NC
NC
2
3
4
5
6
7
14
13
12
11
10
9
8
V
SS
RA0
RA1
RA2
RC0
RC1
RC2
Note:
See
Table 3
for location of all peripheral functions.
Pin Diagram –
16-PIN QFN
V
DD
16 15 14 13
RA5 1
RA4 2
RA3/MCLR/V
PP
3
RC5 4
5
RC4
6
RC3
7
RC2
8
RC1
12 RA0
PIC16F1613
PIC16LF1613
11 RA1
10 RA2
9 RC0
Note 1:
See
Table 3
for location of all peripheral functions.
2:
For the QFN package, it is recommended that the bottom pad be connected to V
SS
.
2014 Microchip Technology Inc.
Preliminary
V
SS
DS40001737A-page 3
PIC12(L)F1612/16(L)F1613
PIN ALLOCATION TABLE
TABLE 2:
8-Pin PDIP/SOIC/DFN
8-PIN ALLOCATION TABLE FOR PIC12(L)F1612
Comparator
Reference
Interrupt
Pull-up
Timers
RA0
RA1
RA2
RA3
RA4
RA5
V
DD
Vss
Note 1:
7
6
5
4
3
2
1
8
AN0
AN1
AN2
—
AN3
—
—
—
DAC1OUT1
V
REF
+
—
—
—
—
—
—
C1IN+
C1IN0-
C1OUT
—
C1IN1-
—
—
—
—
—
T0CKI
T4IN
T1G
(1)
T6IN
T1G
T1CKI
T2IN
—
—
CCP2
—
CCP1
—
—
CCP1
—
—
(1)
CWG1B
—
CWG1A
CWG1IN
—
CWG1B
CWG1A
—
—
(1)
—
ZCD1OUT
ZCD1IN
—
—
—
—
—
IOC
IOC
INT
IOC
IOC
IOC
IOC
—
—
—
—
SMTSIG2
SMTWIN2
SMTSIG1
SMTWIN1
—
—
Y
Y
Y
Y
Y
Y
—
—
ICSPDAT
ICSPCLK
—
MCLR
V
PP
CLKOUT
CLKIN
V
DD
V
SS
Alternate pin function selected with the APFCON register (Register
12-1).
TABLE 3:
14-Pin PDIP/SOIC/TSSOP
14-PIN AND 16-PIN ALLOCATION TABLE FOR PIC16(L)F1613
Comparator
16-Pin QFN
Reference
Interrupt
Pull-up
Timers
RA0
RA1
RA2
RA3
RA4
RA5
RC0
RC1
RC2
RC3
RC4
RC5
V
DD
V
SS
Note
1:
13
12
11
4
3
2
10
9
8
7
6
5
1
14
12
11
10
3
2
1
9
8
7
6
5
4
16
13
AN0
AN1
AN2
—
AN3
—
AN4
AN5
AN6
AN7
—
—
—
—
DAC1OUT1
V
REF
+
—
—
—
—
—
—
—
—
—
—
—
—
C1IN+
C1IN0-
C2IN0-
C1OUT
—
—
—
C2IN+
C1IN1-
C2IN1-
C1IN2-
C2IN2-
C1IN3-
C2IN3-
C2OUT
—
—
—
—
—
T0CKI
T1G
(1)
T6IN
T1G
T1CKI
T2IN
—
T4IN
—
—
—
—
—
—
—
—
—
—
—
CCP2
—
—
—
CCP2
—
CCP1
—
—
(1)
—
—
CWG1IN
—
—
—
—
—
CWG1D
CWG1C
CWG1B
CWG1A
—
—
—
ZCD1OUT
ZCD1IN
—
—
—
—
—
—
—
—
—
—
—
IOC
IOC
INT
IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
—
—
—
—
—
SMTWIN2
SMTSIG1
SMTWIN1
—
SMTSIG2
—
—
—
—
—
—
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
—
—
ICSPDAT
ICSPCLK
—
MCLR
V
PP
CLKOUT
CLKIN
—
—
—
—
—
—
V
DD
V
SS
Alternate pin function selected with the APFCON register (Register
12-1).
DS40001737A-page 4
Preliminary
2014 Microchip Technology Inc.
Basic
CWG
CCP
SMT
ZCD
A/D
I/O
Basic
CWG
CCP
SMT
ZCD
A/D
I/O
PIC12(L)F1612/16(L)F1613
TABLE OF CONTENTS
Device Overview ................................................................................................................................................................................... 7
Enhanced Mid-Range CPU ................................................................................................................................................................. 13
Memory Organization .......................................................................................................................................................................... 15
Device Configuration ........................................................................................................................................................................... 47
Oscillator Module ................................................................................................................................................................................ 54
Resets ................................................................................................................................................................................................. 65
Interrupts ............................................................................................................................................................................................. 73
Power-Down Mode (Sleep) ................................................................................................................................................................. 88
Windowed Watchdog Timer (WDT) .................................................................................................................................................... 91
Flash Program Memory Control .......................................................................................................................................................... 99
Cyclic Redundancy Check (CRC) Module ........................................................................................................................................ 115
I/O Ports ............................................................................................................................................................................................ 127
Interrupt-On-Change ......................................................................................................................................................................... 141
Fixed Voltage Reference (FVR) ........................................................................................................................................................ 146
Temperature Indicator Module .......................................................................................................................................................... 149
Analog-to-Digital Converter (ADC) Module ....................................................................................................................................... 151
8-bit Digital-to-Analog Converter (DAC1) Module ............................................................................................................................. 165
Comparator Module .......................................................................................................................................................................... 169
Zero-Cross Detection (ZCD) Module ................................................................................................................................................ 177
Timer0 Module .................................................................................................................................................................................. 181
Timer1 Module with Gate Control ..................................................................................................................................................... 184
Timer2/4/6 Module ............................................................................................................................................................................ 195
Capture/Compare/PWM Modules ..................................................................................................................................................... 214
Complementary Waveform Generator (CWG) Module ..................................................................................................................... 228
Signal Measurement Timer (SMTx) .................................................................................................................................................. 255
In-Circuit Serial Programming™ (ICSP™) ........................................................................................................................................ 299
Instruction Set Summary................................................................................................................................................................... 301
Electrical Specifications .................................................................................................................................................................... 315
DC and AC Characteristics Graphs and Charts................................................................................................................................ 339
Development Support ....................................................................................................................................................................... 357
Packaging Information ...................................................................................................................................................................... 361
Appendix A: Data Sheet Revision History......................................................................................................................................... 380
The Microchip Web Site .................................................................................................................................................................... 381
Customer Change Notification Service ............................................................................................................................................. 381
Customer Support ............................................................................................................................................................................. 381
Product Identification System ........................................................................................................................................................... 382
2014 Microchip Technology Inc.
Preliminary
DS40001737A-page 5