PIC16(L)F1503
14-Pin Flash, 8-Bit Microcontrollers
High-Performance RISC CPU:
• C Compiler Optimized Architecture
• Only 49 Instructions
• Operating Speed:
- DC – 20 MHz clock input
- DC – 200 ns 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
eXtreme Low-Power (XLP) Features
(PIC16LF1503):
• Sleep Current:
- 20 nA @ 1.8V, typical
• Watchdog Timer Current:
- 260 nA @ 1.8V, typical
• Operating Current:
- 30
A/MHz
@ 1.8V, typical
Peripheral Features:
• Analog-to-Digital Converter (ADC):
- 10-bit resolution
- Eight external channels
- Three internal channels:
- Fixed Voltage Reference
- Digital-to-Analog Converter (DAC)
- Temperature Indicator channel
- Auto acquisition capability
- Conversion available during Sleep
• 5-Bit Digital-to-Analog Converter (DAC):
- Output available externally
- Positive reference selection
- Internal connections to comparators and ADC
• Two Comparators:
- Rail-to-rail inputs
- Power mode control
- Software controllable hysteresis
• Voltage Reference:
- 1.024V Fixed Voltage Reference (FVR) with
1x, 2x and 4x Gain output levels
• 12 I/O Pins (1 Input-only Pin):
- High current sink/source 25 mA/25 mA
- Individually programmable weak pull-ups
- Individually programmable
Interrupt-on-Change (IOC) pins
• Timer0: 8-Bit Timer/Counter with 8-Bit
Programmable Prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
• Timer2: 8-Bit Timer/Counter with 8-Bit Period
Register, Prescaler and Postscaler
• Four 10-bit PWM modules
• Master Synchronous Serial Port (MSSP) with SPI
and I
2
C with:
- 7-bit address masking
- SMBus/PMBus™ compatibility
Flexible Oscillator Structure:
• 16 MHz Internal Oscillator Block:
- Factory calibrated to ±1%, typical
- Software selectable frequency range from
16 MHz to 31 kHz
• 31 kHz Low-Power Internal Oscillator
• Three External Clock modes up to 20 MHz
Special Microcontroller Features:
• Operating Voltage Range:
- 1.8V to 3.6V (PIC16LF1503)
- 2.3V to 5.5V (PIC16F1503)
• Self-Programmable under Software Control
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Programmable Low-Power Brown-out Reset
(LPBOR)
• Extended Watchdog Timer (WDT):
- Programmable period from 1 ms to 256s
• Programmable Code Protection
• In-Circuit Serial Programming™ (ICSP™) via Two
Pins
• Enhanced Low-Voltage Programming (LVP)
• In-Circuit Debug (ICD) via Two Pins
• Power-Saving Sleep mode:
- Low-Power Sleep mode
- Low-Power BOR (LPBOR)
• Integrated Temperature Indicator
• 128 Bytes High-Endurance Flash
- 100,000 write Flash endurance (minimum)
Memory:
• 2 Kwords Linear Program Memory Addressing
• 128 bytes Linear Data Memory Addressing
• High-Endurance Flash Data Memory (HEF)
- 128 bytes if nonvolatile data storage
- 100k erase/write cycles
2011-2015 Microchip Technology Inc.
DS40001607D-page 1
PIC16(L)F1503
Peripheral Features (Continued):
• Two Configurable Logic Cell (CLC) modules:
- 16 selectable input source signals
- Four inputs per module
- Software control of combinational/sequential
logic/state/clock functions
- AND/OR/XOR/D Flop/D Latch/SR/JK
- Inputs from external and internal sources
- Output available to pins and peripherals
- Operation while in Sleep
• Numerically Controlled Oscillator (NCO):
- 20-bit accumulator
- 16-bit increment
- True linear frequency control
- High-speed clock input
- Selectable Output modes
- Fixed Duty Cycle (FDC) mode
- Pulse Frequency (PF) mode
• Complementary Waveform Generator (CWG):
- Eight selectable signal sources
- Selectable falling and rising edge dead-band
control
- Polarity control
- Four auto-shutdown sources
- Multiple input sources: PWM, CLC, NCO
PIC12(L)F1501/PIC16(L)F150X FAMILY TYPES
Program Memory
Flash (words)
Data Sheet Index
10-bit ADC (ch)
MSSP (I
2
C/SPI)
Comparators
Data SRAM
(bytes)
Timers
(8/16-bit)
EUSART
Debug
(1)
I/O’s
(2)
PWM
CWG
NCO
DAC
CLC
Device
PIC12(L)F1501 (1) 1024 64
6 4
1
1
2/1
4
—
—
1
2
1
H
—
PIC16(L)F1503 (2) 2048 128 12 8
2
1
2/1
4
—
1
1
2
1
H
—
PIC16(L)F1507 (3) 2048 128 18 12 — —
2/1
4
—
—
1
2
1
H
—
PIC16(L)F1508 (4) 4096 256 18 12 2
1
2/1
4
1
1
1
4
1 I/H
Y
PIC16(L)F1509 (4) 8192 512 18 12 2
1
2/1
4
1
1
1
4
1 I/H
Y
Note 1:
Debugging Methods: (I) - Integrated on Chip; (H) - using Debug Header; (E) - using Emulation Header.
2:
One pin is input-only.
Data Sheet Index:
(Unshaded devices are described in this document.)
PIC12(L)F1501 Data Sheet, 8-Pin Flash, 8-bit Microcontrollers.
1:
DS40001615
2:
DS40001607
PIC16(L)F1503 Data Sheet, 14-Pin Flash, 8-bit Microcontrollers.
3:
DS40001586
PIC16(L)F1507 Data Sheet, 20-Pin Flash, 8-bit Microcontrollers.
4:
DS40001609
PIC16(L)F1508/9 Data Sheet, 20-Pin Flash, 8-bit 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.
DS40001607D-page 2
2011-2015 Microchip Technology Inc.
XLP
PIC16(L)F1503
PIN DIAGRAMS
14-pin PDIP, SOIC, TSSOP
V
DD
RA5
RA4
MCLR/V
PP
/RA3
RC5
RC4
RC3
1
PIC16(L)F1503
2
3
4
5
6
7
14
13
12
11
10
9
8
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
RC0
RC1
RC2
Note:
See
Table 1
for location of all peripheral functions.
16-pin QFN, UQFN
RA5
RA4
MCLR/V
PP
/RA3
RC5
1
12 RA0/ICSPDAT
2
PIC16(L)F1503
11 RA1/ICSPCLK
3
10 RA2
4
9 RC0
5 6 7 8
RC4
RC3
RC2
RC1
Note 1:
2:
See
Table 1
for location of all peripheral functions.
It is recommended that the exposed bottom pad be connected to V
SS
.
2011-2015 Microchip Technology Inc.
V
DD
NC
NC
Vss
16 15 14 13
DS40001607D-page 3
PIC16(L)F1503
PIN ALLOCATION TABLE
TABLE 1:
14-Pin PDIP/SOIC/TSSOP
16-Pin QFN, UQFN
14-PIN ALLOCATION TABLE (PIC16(L)F1503)
Comparator
Reference
Interrupt
Pull-Up
MSSP
Timer
RA0
RA1
RA2
RA3
RA4
RA5
RC0
RC1
RC2
RC3
RC4
RC5
V
DD
V
SS
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
—
—
—
—
DACOUT1
V
REF
+
DACOUT2
—
—
—
—
—
—
—
—
—
—
—
C1IN+
C1IN0-
C2IN0-
C1OUT
—
—
—
C2IN+
C1IN1-
C2IN1-
C1IN2-
C2IN2-
C1IN3-
C2IN3-
C2OUT
—
—
—
—
—
T0CKI
T1G
(1)
T1G
T1CKI
—
—
—
—
—
—
—
—
—
—
CWG1FLT
—
—
—
—
—
—
—
CWG1B
CWG1A
—
—
—
—
—
—
NCO1
(1)
NCO1CLK
—
NCO1
—
—
—
—
—
—
—
—
CLC1
CLC1IN0
—
CLC1IN1
CLC2
—
—
CLC2IN0
CLC2IN1
CLC1
—
—
(1)
—
—
PWM3
—
—
—
—
PWM4
—
PWM2
—
PWM1
—
—
—
—
—
SS
(1)
SDO
(1)
—
SCL
SCK
SDA
SDI
SDO
SS
—
—
—
—
IOC
IOC
INT
IOC
IOC
IOC
IOC
—
—
—
—
—
—
—
—
Y
Y
Y
Y
Y
Y
—
—
—
—
—
—
—
—
ICSPDAT
ICSPCLK
—
MCLR
V
PP
CLKOUT
CLKIN
—
—
—
—
—
—
V
DD
V
SS
Note 1:
Alternate pin function selected with the APFCON
(Register
11-1)
register.
DS40001607D-page 4
2011-2015 Microchip Technology Inc.
Basic
PWM
CWG
NCO
ADC
CLC
I/O
PIC16(L)F1503
TABLE OF CONTENTS
1.0 Device Overview .......................................................................................................................................................................... 7
2.0 Enhanced Mid-Range CPU ........................................................................................................................................................ 11
3.0 Memory Organization ................................................................................................................................................................. 13
4.0 Device Configuration .................................................................................................................................................................. 37
5.0 Oscillator Module........................................................................................................................................................................ 42
6.0 Resets ........................................................................................................................................................................................ 51
7.0 Interrupts .................................................................................................................................................................................... 59
8.0 Power-Down Mode (Sleep) ........................................................................................................................................................ 72
9.0 Watchdog Timer (WDT) ............................................................................................................................................................. 75
10.0 Flash Program Memory Control ................................................................................................................................................. 79
11.0 I/O Ports ..................................................................................................................................................................................... 95
12.0 Interrupt-On-Change ................................................................................................................................................................ 104
13.0 Fixed Voltage Reference (FVR) ............................................................................................................................................... 108
14.0 Temperature Indicator Module ................................................................................................................................................. 111
15.0 Analog-to-Digital Converter (ADC) Module .............................................................................................................................. 113
16.0 5-Bit Digital-to-Analog Converter (DAC) Module...................................................................................................................... 127
17.0 Comparator Module.................................................................................................................................................................. 130
18.0 Timer0 Module ......................................................................................................................................................................... 137
19.0 Timer1 Module with Gate Control............................................................................................................................................. 140
20.0 Timer2 Module ......................................................................................................................................................................... 151
21.0 Master Synchronous Serial Port (MSSP) Module .................................................................................................................... 154
22.0 Pulse-Width Modulation (PWM) Module .................................................................................................................................. 208
23.0 Configurable Logic Cell (CLC).................................................................................................................................................. 214
24.0 Numerically Controlled Oscillator (NCO) Module ..................................................................................................................... 230
25.0 Complementary Waveform Generator (CWG) Module ............................................................................................................ 237
26.0 In-Circuit Serial Programming™ (ICSP™) ............................................................................................................................... 249
27.0 Instruction Set Summary .......................................................................................................................................................... 251
28.0 Electrical Specifications............................................................................................................................................................ 265
29.0 DC and AC Characteristics Graphs and Charts ....................................................................................................................... 293
30.0 Development Support............................................................................................................................................................... 328
31.0 Packaging Information.............................................................................................................................................................. 332
Appendix A: Data Sheet Revision History.......................................................................................................................................... 347
The Microchip Website ...................................................................................................................................................................... 348
Customer Change Notification Service .............................................................................................................................................. 348
Customer Support .............................................................................................................................................................................. 348
Product Identification System ............................................................................................................................................................ 349
2011-2015 Microchip Technology Inc.
DS40001607D-page 5