PIC12(L)F1501
8-Pin Flash, 8-Bit Microcontrollers
High-Performance RISC CPU:
C Compiler Optimized Architecture
Only 49 Instructions
1 Kwords Linear Program Memory Addressing
64 bytes Linear Data Memory Addressing
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
•
•
•
•
•
Low-Power Features (PIC12LF1501):
• Standby 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
- Four 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
• One Comparator:
- 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
• Six 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
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 (PIC12LF1501)
- 2.3V to 5.5V (PIC12F1501)
• 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)
2011-2014 Microchip Technology Inc.
DS40001615B-page 1
PIC12(L)F1501
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)
MSSP (I
2
C™/SPI)
Data Sheet Index
10-bit ADC (ch)
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:
DS0004001615
2:
DS0004001607
PIC16(L)F1503 Data Sheet, 14-Pin Flash, 8-bit Microcontrollers.
3:
DS0004001586
PIC16(L)F1507 Data Sheet, 20-Pin Flash, 8-bit Microcontrollers.
4:
DS0004001609
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.
DS40001615B-page 2
2011-2014 Microchip Technology Inc.
XLP
PIC12(L)F1501
PIN DIAGRAMS
Pin Diagram – 8-Pin PDIP, SOIC, MSOP, DFN, UDFN
V
DD
RA5
RA4
MCLR/V
PP
/RA3
1
PIC12(L)F1501
8
7
6
5
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
2
3
4
Note:
See
Table 1
for location of all peripheral functions.
2011-2014 Microchip Technology Inc.
DS40001615B-page 3
PIC12(L)F1501
PIN ALLOCATION TABLE
TABLE 1:
8-Pin PDIP/SOIC/MSOP/DFN/UDFN
8-PIN ALLOCATION TABLE (PIC12(L)F1501)
Comparator
Reference
Interrupt
Pull-Up
Timer
RA0
RA1
RA2
RA3
RA4
RA5
V
DD
V
SS
Note 1:
7
6
5
4
3
2
1
8
AN0
AN1
AN2
—
AN3
—
—
—
DACOUT1
V
REF
+
DACOUT2
—
—
—
—
—
C1IN+
C1IN0-
C1OUT
—
C1IN1-
—
—
—
—
—
T0CKI
T1G
(1)
T1G
T1CKI
—
—
CWG1B
—
CWG1A
CWG1FLT
—
CWG1B
(1)
CWG1A
(1)
—
—
—
NCO1
—
—
CLC2IN1
CLC2IN0
CLC1
CLC1IN0
CLC1
(1)
PWM2
—
PWM1
—
PWM3
PWM4
—
—
IOC
IOC
INT
IOC
IOC
IOC
IOC
—
—
Y
Y
Y
Y
Y
Y
—
—
ICSPDAT
ICSPCLK
—
MCLR
V
PP
CLKOUT
CLKIN
V
DD
V
SS
NCO1
(1)
NCO1CLK
—
—
CLC1IN1
CLC2
—
—
Alternate pin function selected with the APFCON (Register
11-1)
register.
DS40001615B-page 4
2011-2014 Microchip Technology Inc.
Basic
CWG
PWM
NCO
ADC
CLC
I/O
PIC12(L)F1501
TABLE OF CONTENTS
Device Overview ................................................................................................................................................................................... 7
Enhanced Mid-Range CPU ................................................................................................................................................................. 11
Memory Organization .......................................................................................................................................................................... 13
Device Configuration........................................................................................................................................................................... 37
Oscillator Module ................................................................................................................................................................................ 42
Resets ................................................................................................................................................................................................. 51
Interrupts ............................................................................................................................................................................................. 59
Power-Down Mode (Sleep) ................................................................................................................................................................. 72
Watchdog Timer (WDT) ...................................................................................................................................................................... 75
Flash Program Memory Control .......................................................................................................................................................... 79
I/O Ports .............................................................................................................................................................................................. 95
Interrupt-On-Change ......................................................................................................................................................................... 101
Fixed Voltage Reference (FVR) ........................................................................................................................................................ 105
Temperature Indicator Module .......................................................................................................................................................... 108
Analog-to-Digital Converter (ADC) Module ....................................................................................................................................... 110
5-Bit Digital-to-Analog Converter (DAC) Module ............................................................................................................................... 124
Comparator Module .......................................................................................................................................................................... 127
Timer0 Module .................................................................................................................................................................................. 134
Timer1 Module with Gate Control ..................................................................................................................................................... 137
Timer2 Module .................................................................................................................................................................................. 148
Pulse Width Modulation (PWM) Module ........................................................................................................................................... 151
Configurable Logic Cell (CLC) .......................................................................................................................................................... 157
Numerically Controlled Oscillator (NCO) Module .............................................................................................................................. 173
Complementary Waveform Generator (CWG) Module ..................................................................................................................... 180
In-Circuit Serial Programming™ (ICSP™) ........................................................................................................................................ 193
Instruction Set Summary ................................................................................................................................................................... 195
Electrical Specifications .................................................................................................................................................................... 209
DC and AC Characteristics Graphs and Charts ................................................................................................................................ 233
Development Support ....................................................................................................................................................................... 268
Packaging Information ...................................................................................................................................................................... 272
Appendix A: Data Sheet Revision History......................................................................................................................................... 289
The Microchip Web Site .................................................................................................................................................................... 290
Customer Change Notification Service ............................................................................................................................................. 290
Customer Support ............................................................................................................................................................................. 290
Product Identification System ........................................................................................................................................................... 291
2011-2014 Microchip Technology Inc.
DS40001615B-page 5