PIC16(L)F720/721
20-Pin Flash Microcontrollers
Devices Included In This Data Sheet:
• PIC16F720
• PIC16F721
• PIC16LF720
• PIC16LF721
Low-Power Features:
• Standby Current:
- 40 nA @ 1.8V, typical
• Low-Power Watchdog Timer Current:
- 500 nA @ 1.8V, typical
High-Performance RISC CPU:
• Only 35 Instructions to Learn:
- All single-cycle instructions except branches
• Operating Speed:
- DC – 16 MHz oscillator/clock input
- DC – 250 ns instruction cycle
• Up to 4K x 14 Words of Flash Program Memory
• Up to 256 bytes of Data Memory (RAM)
• Interrupt Capability
• 8-Level Deep Hardware Stack
• Direct, Indirect and Relative Addressing modes
• Processor Self-Write/Read access to Program
Memory
Peripheral Features:
• Up to 17 I/O Pins and 1 Input-only Pin:
- High-current source/sink for direct LED drive
- Interrupt-on-change pins
- Individually programmable weak pull-ups
• A/D Converter:
- 8-bit resolution
- 12 channels
- Selectable Voltage reference
• Timer0: 8-Bit Timer/Counter with 8-Bit
Programmable Prescaler
• Enhanced Timer1
- 16-bit timer/counter with prescaler
- External Gate Input mode with toggle and
single shot modes
- Interrupt-on-gate completion
• Timer2: 8-Bit Timer/Counter with 8-Bit Period
Register, Prescaler and Postscaler
• Capture, Compare, PWM module (CCP)
- 16-bit Capture, max resolution 12.5 ns
- 16-bit Compare, max resolution 250 ns
- 10-bit PWM, max frequency 15 kHz
• Addressable Universal Synchronous
Asynchronous Receiver Transmitter (AUSART)
• Synchronous Serial Port (SSP)
- SPI (Master/Slave)
- I
2
C
TM
(Slave) with Address Mask
Special Microcontroller Features:
• Precision Internal Oscillator:
- 16 MHz or 500 kHz operation
- Factory calibrated to ±1%, typical
- Software tunable
- Software selectable ÷1, ÷2, ÷4 or ÷8 divider
• Power-Saving Sleep mode
• Industrial and Extended Temperature Range
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Brown-out Reset (BOR)
• Multiplexed Master Clear with Pull-up/Input Pin
• Programmable Code Protection
• In-Circuit Serial Programming
TM
(ICSP
TM
) via Two
Pins
• 128 Bytes High-Endurance Flash:
- 100,000 write Flash endurance (minimum)
• Wide Operating Voltage Range:
- 1.8V to 5.5V (PIC16F720/721)
- 1.8V to 3.6V (PIC16LF720/721)
2010-2013 Microchip Technology Inc.
DS41430D-page 1
PIC16(L)F720/721
PIC16(L)F72X Family Types
Program Memory
Flash (words)
Data Sheet Index
SSP (I
2
C™/SPI)
CapSense (ch)
8-bit ADC (ch)
Data SRAM
(bytes)
Timers
(8/16-bit)
AUSART
Debug
(1)
I/O’s
(2)
CCP
Device
PIC16(L)F707
(1)
8192
363
36 14 32
4/2
1
1
PIC16(L)F720
(2)
2048
128
18 12 —
2/1
1
1
PIC16(L)F721
(2)
4096
256
18 12 —
2/1
1
1
PIC16(L)F722
(4)
2048
128
25 11
8
2/1
1
1
PIC16(L)F722A
(3)
2048
128
25 11
8
2/1
1
1
PIC16(L)F723
(4)
4096
192
25 11
8
2/1
1
1
PIC16(L)F723A
(3)
4096
192
25 11
8
2/1
1
1
PIC16(L)F724
(4)
4096
192
36 14 16
2/1
1
1
PIC16(L)F726
(4)
8192
368
25 11
8
2/1
1
1
PIC16(L)F727
(4)
8192
368
36 14 16
2/1
1
1
Note 1:
I - Debugging, Integrated on Chip; H - Debugging, Requires Debug Header.
2:
One pin is input-only.
Data Sheet Index:
(Unshaded devices are described in this document.)
1:
DS41418
PIC16(L)F707 Data Sheet, 40/44-Pin Flash, 8-bit Microcontrollers.
2:
DS41430
PIC16(L)F720/721 Data Sheet, 20-Pin Flash, 8-bit Microcontrollers.
3:
DS41417
PIC16(L)F722A/723A Data Sheet, 28-Pin Flash, 8-bit Microcontrollers.
4:
DS41341
PIC16(L)F72X Data Sheet, 28/40/44-Pin Flash, 8-bit Microcontrollers.
2
1
1
2
2
2
2
2
2
2
I
I
I
I
I
I
I
I
I
I
DS41430D-page 2
2010-2013 Microchip Technology Inc.
XLP
Y
—
—
Y
Y
Y
Y
Y
Y
Y
PIC16(L)F720/721
Pin Diagrams –
20-PIN DIAGRAM FOR PIC16F720/721 AND PIC16LF720/721
PDIP, SOIC, SSOP
V
DD
RA5/T1CKI/CLKIN
RA4/AN3/T1G/CLKOUT
RA3/MCLR/V
PP
1
2
3
PIC16F720/721
PIC16LF720/721
4
6
7
8
9
10
20
19
18
17
16
15
14
13
12
11
V
SS
RA0/AN0/ICSPDAT
RA1/AN1/ICSPCLK
RA2/AN2/T0CKI/INT
RC0/AN4
RC1/AN5
RC2/AN6
RB4/AN10/SDI/SDA
RB5/AN11/RX/DT
RB6/SCK/SCL
RC5/CCP1 5
RC4
RC3/AN7
RC6/AN8/SS
RC7/AN9/SDO
RB7/TX/CK
Pin Diagrams –
20-PIN DIAGRAM FOR PIC16F720/721 AND PIC16LF720/721
QFN (4x4)
RA4/AN3/T1G/CLKOUT
RA5/T1CKI/CLKIN
V
DD
20 19 18 17 16
RA3/MCLR/V
PP
1
RC5/CCP1
RC4
RC6/AN8/SS
2
3
5
6
RC7/AN9/SDO
7
RB7/TX/CK
8
RB6/SCK/SCL
9 10
RB4/AN10/SDI/SDA
RB5/AN11/RX/DT
15 RA1/AN1/ICSPCLK
PIC16F720/721
13 RC0/AN4
PIC16LF720/721
12 RC1/AN5
11 RC2/AN6
14 RA2/AN2/T0CKI/INT
RC3/AN7 4
2010-2013 Microchip Technology Inc.
V
SS
RA0/AN0/ICSPDAT
DS41430D-page 3
PIC16(L)F720/721
TABLE 1:
20-PIN ALLOCATION TABLE (PIC16F720/721 AND PIC16LF720/721)
20-Pin PDIP/SOIC/
SSOP
20-Pin QFN
AUSART
Interrupt
Pull-up
Timers
RA0
RA1
RA2
RA3
RA4
RA5
RB4
RB5
RB6
RB7
RC0
RC1
RC2
RC3
RC4
RC5
RC6
RC7
V
DD
Vss
19
18
17
4
3
2
13
12
11
10
16
15
14
7
6
5
8
9
1
20
16
15
14
1
20
19
10
9
8
7
13
12
11
4
3
2
5
6
18
17
AN0
AN1
AN2
—
AN3
—
AN10
AN11
—
—
AN4
AN5
AN6
AN7
—
—
AN8
AN9
—
—
—
—
T0CKI
—
T1G
T1CKI
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
CCP1
—
—
—
—
—
—
—
—
—
—
—
RX/DT
—
TX/CK
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
SDI/SDA
—
SCK/SCL
—
—
—
—
—
—
—
SS
SDO
—
—
IOC
IOC
INT/IOC
IOC
IOC
IOC
IOC
IOC
IOC
IOC
—
—
—
—
—
—
—
—
—
—
Y
Y
—
Y
Y
Y
Y
Y
Y
Y
—
—
—
—
—
—
—
—
—
—
ICSPDAT
ICSPCLK
—
MCLR/V
PP
CLKOUT
CLKIN
—
—
—
—
—
—
—
—
—
—
—
—
V
DD
V
SS
DS41430D-page 4
2010-2013 Microchip Technology Inc.
Basic
CCP
SSP
A/D
I/O
PIC16(L)F720/721
Table of Contents
1.0 Device Overview ......................................................................................................................................................................... 7
2.0 Memory Organization ................................................................................................................................................................ 11
3.0 Resets ....................................................................................................................................................................................... 25
4.0 Interrupts ................................................................................................................................................................................... 35
5.0 Low Dropout (LDO) Voltage Regulator ..................................................................................................................................... 43
6.0 I/O Ports .................................................................................................................................................................................... 45
7.0 Oscillator Module....................................................................................................................................................................... 65
8.0 Device Configuration ................................................................................................................................................................. 71
9.0 Analog-to-Digital Converter (ADC) Module ............................................................................................................................... 75
10.0 Fixed Voltage Reference........................................................................................................................................................... 85
11.0 Temperature Indicator Module ................................................................................................................................................... 87
12.0 Timer0 Module .......................................................................................................................................................................... 89
13.0 Timer1 Module with Gate Control.............................................................................................................................................. 93
14.0 Timer2 Module ........................................................................................................................................................................ 105
15.0 Capture/Compare/PWM (CCP) Module .................................................................................................................................. 107
16.0 Addressable Universal Synchronous Asynchronous Receiver Transmitter (AUSART) .......................................................... 117
17.0 SSP Module Overview ............................................................................................................................................................ 137
18.0 Flash Program Memory Self Read/Self Write Control............................................................................................................. 159
19.0 Power-Down Mode (Sleep) ..................................................................................................................................................... 167
20.0 In-Circuit Serial Programming™ (ICSP™) .............................................................................................................................. 169
21.0 Instruction Set Summary ......................................................................................................................................................... 171
22.0 Development Support.............................................................................................................................................................. 181
23.0 Electrical Specifications........................................................................................................................................................... 185
24.0 DC and AC Characteristics Graphs and Charts ...................................................................................................................... 211
25.0 Packaging Information............................................................................................................................................................. 231
Appendix A: Data Sheet Revision History......................................................................................................................................... 241
Appendix B: Migrating From Other PIC
®
Devices............................................................................................................................. 241
The Microchip Web Site .................................................................................................................................................................... 249
Customer Change Notification Service ............................................................................................................................................. 249
Customer Support ............................................................................................................................................................................. 249
Reader Response ............................................................................................................................................................................. 250
Product Identification System ............................................................................................................................................................ 251
2010-2013 Microchip Technology Inc.
DS41430D-page 5