PIC12(L)F1822/16(L)F1823
8/14-Pin Flash Microcontrollers with XLP Technology
High-Performance RISC CPU
• Only 49 Instructions to Learn:
- All single-cycle instructions except branches
• Operating Speed:
- DC – 32 MHz oscillator/clock input
- DC – 125 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 Management
PIC12LF1822/16LF1823 with XLP
•
•
•
•
Sleep mode: 20 nA @ 1.8V, typical
Watchdog Timer: 300 nA @ 1.8V, typical
Timer1 Oscillator: 650 nA @ 32 kHz, typical
Operating Current: 30 µA/MHz @ 1.8V, typical
Analog Features
• Analog-to-Digital Converter (ADC) module:
- 10-bit resolution, up to 8 channels
- Conversion available during Sleep
• Analog Comparator module:
- Up to two rail-to-rail analog comparators
- Power mode control
- Software controllable hysteresis
• Voltage Reference module:
- Fixed Voltage Reference (FVR) with 1.024V,
2.048V and 4.096V output levels
- 5-bit rail-to-rail resistive DAC with positive
and negative reference selection
Flexible Oscillator Structure
• Precision 32 MHz internal Oscillator Block:
- Factory calibrated to ± 1%, typical
- Software selectable frequencies range of
31 kHz to 32 MHz
• 31 kHz Low-Power Internal Oscillator
• Four Crystal modes up to 32 MHz
• Three External Clock modes up to 32 MHz
• 4X Phase Lock Loop (PLL)
• Fail-Safe Clock Monitor:
- Allows for safe shutdown if peripheral clock
stops
• Two-Speed Oscillator Start-up
• Reference Clock module:
- Programmable clock output frequency and
duty-cycle
Peripheral Highlights
• Up to 11 I/O Pins and 1 Input-Only Pin:
- High current sink/source 25 mA/25 mA
- Programmable weak pull-ups
- Programmable interrupt-on-change pins
• Timer0: 8-Bit Timer/Counter with 8-Bit Prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Dedicated, low-power 32 kHz oscillator driver
• Timer2: 8-Bit Timer/Counter with 8-Bit Period
Register, Prescaler and Postscaler
• Enhanced CCP (ECCP) modules:
- Software selectable time bases
- Auto-shutdown and auto-restart
- PWM steering
• Master Synchronous Serial Port (MSSP) with SPI
and I
2
C
TM
with:
- 7-bit address masking
- SMBus/PMBus
TM
compatibility
• Enhanced Universal Synchronous Asynchronous
Receiver Transmitter (EUSART) module:
- RS-232, RS-485 and LIN compatible
- Auto-Baud Detect
• Capacitive Sensing (CPS) module (mTouch™):
- Up to 8 input channels
Special Microcontroller Features
•
•
•
•
•
•
•
•
•
•
Full 5.5V Operation – PIC12F1822/16F1823
1.8V-3.6V Operation – PIC12LF1822/16LF1823
Self-Reprogrammable under Software Control
Power-on Reset (POR), Power-up Timer (PWRT)
and Oscillator Start-up Timer (OST)
Programmable Brown-out Reset (BOR)
Extended Watchdog Timer (WDT)
In-Circuit Serial Programming™ (ICSP™) via
Two Pins
In-Circuit Debug (ICD) via Two Pins
Enhanced Low-Voltage Programming (LVP)
Operating Voltage Range:
- 1.8V-5.5V (PIC12F1822/16F1823)
- 1.8V-3.6V (PIC12LF1822/16LF1823)
Programmable Code Protection
Self-Programmable under Software Control
•
•
2010-2015 Microchip Technology Inc.
DS40001413E-page 1
PIC12(L)F1822/16(L)F1823
Peripheral Features (Continued)
• Data Signal Modulator module
- Selectable modulator and carrier sources
• SR Latch:
- Multiple Set/Reset input options
- Emulates 555 Timer applications
TABLE 1:
PIC12(L)F1822/1840/PIC16(L)F182X/1847 FAMILY TYPES
ECCP (Full-Bridge)
ECCP (Half-Bridge)
CCP
Program Memory
Flash (words)
MSSP (I
2
C™/SPI)
Data Sheet Index
10-bit ADC (ch)
CapSense (ch)
Data EEPROM
(bytes)
Comparators
Data SRAM
(bytes)
SR Latch
Timers
(8/16-bit)
EUSART
Debug
(1)
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/O’s
(2)
Device
PIC12(L)F1822
PIC12(L)F1840
PIC16(L)F1823
PIC16(L)F1824
PIC16(L)F1825
PIC16(L)F1826
PIC16(L)F1827
PIC16(L)F1828
PIC16(L)F1829
PIC16(L)F1847
(1)
(2)
(1)
(3)
(4)
(5)
(5)
(3)
(4)
(6)
2K
4K
2K
4K
8K
2K
4K
4K
8K
8K
256
256
256
256
256
256
256
256
256
256
128
256
128
256
1024
256
384
256
1024
1024
6
6
12
12
12
16
16
18
18
16
4
4
8
8
8
12
12
12
12
12
4
4
8
8
8
12
12
12
12
12
1
1
2
2
2
2
2
2
2
2
2/1
2/1
2/1
4/1
4/1
2/1
4/1
4/1
4/1
4/1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
1
2
2
0/1/0
0/1/0
1/0/0
1/1/2
1/1/2
1/0/0
1/1/2
1/1/2
1/1/2
1/1/2
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Note 1:
I - Debugging, Integrated on Chip; H - Debugging, available using Debug Header.
2:
One pin is input-only.
Data Sheet Index:
(Unshaded devices are described in this document.)
1:
DS41413
PIC12(L)F1822/PIC16(L)F1823 Data Sheet, 8/14-Pin Flash Microcontrollers.
2:
DS41441
PIC12(L)F1840 Data Sheet, 8-Pin Flash Microcontrollers.
3:
DS41419
PIC16(L)F1824/1828 Data Sheet, 28/40/44-Pin Flash Microcontrollers.
4:
DS41440
PIC16(L)F1825/1829 Data Sheet, 14/20-Pin Flash Microcontrollers.
5:
DS41391
PIC16(L)F1826/1827 Data Sheet, 18/20/28-Pin Flash Microcontrollers.
6:
DS41453
PIC16(L)F1847 Data Sheet, 18/20/28-Pin Flash Microcontrollers.
Note:
For other small form-factor package availability and marking information, please visit
www.microchip.com/packaging
or contact your local sales office.
DS40001413E-page 2
2010-2015 Microchip Technology Inc.
XLP
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
PIC12(L)F1822/16(L)F1823
FIGURE 1:
8-PIN DIAGRAM FOR PIC12(L)F1822
PDIP, SOIC, DFN, UDFN
PIC12(L)F1822
V
DD
RA5
RA4
MCLR/V
PP
/RA3
1
2
3
4
8
7
6
5
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
TABLE 2:
8-Pin PDIP/SOIC/DFN/UDFN
8-PIN ALLOCATION TABLE (PIC12(L)F1822)
Comparator
Cap Sense
Reference
Modulator
SR Latch
EUSART
Interrupt
Pull-up
Timers
MSSP
ECCP
RA0
RA1
RA2
7
6
5
AN0
AN1
AN2
DACOUT CPS0
V
REF
+
—
CPS1
C1IN+
C1IN0-
—
SRI
SRQ
—
—
T0CKI
P1B
(1)
—
CCP1
(1)
P1A
(1)
FLT0
—
P1B
(1)
TX
(1)
CK
(1)
RX
(1)
DT
(1)
—
SDO
(1)
SS
(1)
SCL
SCK
SDA
SDI
SS
(1)
SDO
(1)
IOC
IOC
INT/
IOC
IOC
IOC
MDOUT
MDMIN
MDCIN1
Y
Y
Y
ICSPDAT
ICDDAT
ICSPCLK
ICPCLK
—
CPS2 C1OUT
RA3
RA4
4
3
—
AN3
—
—
—
CPS3
—
C1IN1-
—
—
T1G
(1)
T1G
(1)
T1OSO
T1CKI
T1OSI
—
—
—
TX
(1)
CK
(1)
RX
(1)
DT
(1)
—
—
—
MDCIN2
Y
Y
MCLR
V
PP
OSC2
CLKOUT
CLKR
OSC1
CLKIN
V
DD
V
SS
RA5
V
DD
V
SS
2
1
8
—
—
—
—
—
—
—
—
—
—
—
—
SRNQ
—
—
CCP1
(1)
P1A
(1)
—
—
—
—
—
IOC
—
—
—
—
—
Y
—
—
Note 1:
Pin function is selectable via the APFCON register.
2010-2015 Microchip Technology Inc.
DS40001413E-page 3
Basic
A/D
I/O
PIC12(L)F1822/16(L)F1823
FIGURE 2:
14-PIN DIAGRAM FOR PIC16(L)F1823
PDIP, SOIC, TSSOP
V
DD
RA5
RA4
MCLR/V
PP
/RA3
RC5
RC4
RC3
1
PIC16(L)F1823
2
3
4
5
6
7
14
13
12
11
10
9
8
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
RC0
RC1
RC2
FIGURE 3:
QFN, UQFN
16-PIN DIAGRAM FOR PIC16(L)F1823
V
DD
16
15
14
RA5 1
RA4 2
MCLR/V
PP
/RA3 3
RC5 4
13
RC1 8
V
SS
12 RA0/ICSPDAT
11 RA1/ICSPCLK
10 RA2
9 RC0
NC
RC3 6
PIC16(L)F1823
5
RC4
RC2 7
NC
DS40001413E-page 4
2010-2015 Microchip Technology Inc.
PIC12(L)F1822/16(L)F1823
TABLE 3:
14-Pin PDIP/SOIC/TSSOP
16-Pin QFN/UQFN
14-PIN ALLOCATION TABLE (PIC16(L)F1823)
Comparator
Cap Sense
Modulator
Reference
SR Latch
EUSART
Interrupt
Pull-up
Timers
MSSP
ECCP
RA0
RA1
RA2
RA3
RA4
13 12
12 11
11 10
4
3
3
2
AN0
AN1
AN2
—
AN3
DACOUT
V
REF
+
—
—
—
CPS0
CPS1
CPS2
—
CPS3
C1IN+
C12IN0-
C1OUT
—
—
—
SRI
SRQ
—
—
—
—
T0CKI
T1G
(1)
T1G
(1)
T1OSO
T1CKI
T1OSI
—
—
—
—
—
—
—
—
—
—
FLT0
—
TX
(1)
CK
(1)
RX
(1)
DT
(1)
—
—
—
—
—
—
SS
(1)
SDO
(1)
IOC
IOC
INT/
IOC
IOC
IOC
—
—
—
—
—
Y
Y
Y
Y
Y
ICSPDAT
ICDDAT
ICSPCLK
ICDCLK
—
MCLR
V
PP
OSC2
CLKOUT
CLKR
OSC1
CLKIN
—
—
—
—
—
—
V
DD
V
SS
RA5
RC0
RC1
RC2
RC3
RC4
RC5
V
DD
V
SS
Note 1:
2
10
9
8
7
6
5
1
1
9
8
7
6
5
4
16
—
AN4
AN5
AN6
AN7
—
—
—
—
—
—
—
—
—
—
—
—
—
—
CPS4
CPS5
CPS6
CPS7
—
—
—
—
—
C2IN+
C12IN1-
C12IN2-
C12IN3-
C2OUT
—
—
—
—
—
—
—
—
SRNQ
—
—
—
—
—
—
P1D
P1C
P1B
CCP1
P1A
—
—
—
—
—
—
—
TX
(1)
CK
(1)
RX
(1)
DT
(1)
—
—
—
SCL
SCK
SDA
SDI
SDO
(1)
SS
(1)
—
—
—
—
IOC
—
—
—
—
—
—
—
—
—
—
—
MDCIN1
MDMIN
MDOUT
MDCIN2
—
—
Y
Y
Y
Y
Y
Y
Y
—
—
14 13
Pin function is selectable via the APFCON register.
2010-2015 Microchip Technology Inc.
DS40001413E-page 5
Basic
A/D
I/O