PIC18(L)F2X/4XK22
Data Sheet
28/40/44-Pin, Low-Power,
High-Performance Microcontrollers
with nanoWatt XLP Technology
2010 Microchip Technology Inc.
Preliminary
DS41412B
Note the following details of the code protection feature on Microchip devices:
•
•
•
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
•
•
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
EE
L
OQ
, K
EE
L
OQ
logo, MPLAB, PIC, PICmicro, PICSTART,
PIC
32
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2010, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-60932-175-8
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
®
MCUs and dsPIC
®
DSCs, K
EE
L
OQ
®
code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
DS41412B-page 2
Preliminary
2010 Microchip Technology Inc.
PIC18(L)F2X/4XK22
28/40/44-Pin, Low-Power, High-Performance
Microcontrollers with nanoWatt XLP Technology
High-Performance RISC CPU:
• C Compiler Optimized Architecture:
- Optional extended instruction set designed to
optimize re-entrant code
• Up to 1024 Bytes Data EEPROM
• Up to 64 Kbytes Linear Program Memory
Addressing
• Up to 3896 Bytes Linear Data Memory Address-
ing
• Up to 16 MIPS Operation
• 16-bit Wide Instructions, 8-bit Wide Data Path
• Priority Levels for Interrupts
• 31-Level, Software Accessible Hardware Stack
• 8 x 8 Single-Cycle Hardware Multiplier
Extreme Low-Power Management
with nanoWatt XLP:
•
•
•
•
Sleep mode: 20 nA, typical
Watchdog Timer: 300 nA, typical
Timer1 Oscillator: 800 nA @ 32 kHz
Peripheral Module Disable
Special Microcontroller Features:
•
•
•
•
Full 5.5V Operation – PIC18FXXK22 devices
1.8V to 3.6V Operation – PIC18LFXXK22 devices
Self-Programmable under Software Control
High/Low-Voltage Detection (HLVD) module:
- Programmable 16-Level
- Interrupt on High/Low-Voltage Detection
Programmable Brown-out Reset (BOR):
- With software enable option
- Configurable shutdown in Sleep
Extended Watchdog Timer (WDT):
- Programmable period from 4 ms to 131s
In-Circuit Serial Programming™ (ICSP™):
- Single-Supply 3V
In-Circuit Debug (ICD)
Flexible Oscillator Structure:
• Precision 16 MHz Internal Oscillator Block:
- Factory calibrated to ± 1%
- Selectable frequencies, 31 kHz to 16 MHz
- 64 MHz performance available using PLL –
no external components required
• Four Crystal modes up to 64 MHz
• Two External Clock modes up to 64 MHz
• 4X Phase Lock Loop (PLL)
• Secondary Oscillator using Timer1 @ 32 kHz
• Fail-Safe Clock Monitor:
- Allows for safe shutdown if peripheral clock
stops
- Two-Speed Oscillator Start-up
•
•
•
•
Peripheral Highlights:
• Up to 35 I/O Pins plus 1 Input-Only Pin:
- High-Current Sink/Source 25 mA/25 mA
- Three programmable external interrupts
- Four programmable interrupt-on-change
- Nine programmable weak pull-ups
- Programmable slew rate
• SR Latch:
- Multiple Set/Reset input options
• Two Capture/Compare/PWM (CCP) modules
• Three Enhanced CCP (ECCP) modules:
- One, two or four PWM outputs
- Selectable polarity
- Programmable dead time
- Auto-Shutdown and Auto-Restart
- PWM steering
• Two Master Synchronous Serial Port (MSSP)
modules:
- 3-wire SPI (supports all 4 modes)
- I
2
C™ Master and Slave modes with address
mask
Analog Features:
• Analog-to-Digital Converter (ADC) module:
- 10-bit resolution, up to 30 external channels
- Auto-acquisition capability
- Conversion available during Sleep
- Fixed Voltage Reference (FVR) channel
- Independent input multiplexing
• Analog Comparator module:
- Two rail-to-rail analog comparators
- Independent input multiplexing
• Digital-to-Analog Converter (DAC) 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
• Charge Time Measurement Unit (CTMU) module:
- Supports capacitive touch sensing for touch
screens and capacitive switches
2010 Microchip Technology Inc.
Preliminary
DS41412B-page 3
PIC18(L)F2X/4XK22
• Two Enhanced Universal Synchronous
Asynchronous Receiver Transmitter (EUSART)
modules:
- Supports RS-485, RS-232 and LIN
- RS-232 operation using internal oscillator
- Auto-Wake-up on Break
- Auto-Baud Detect
Program
Memory
# Single-Word
Instructions
Flash
(Bytes)
Device
10-bit
A/D Channels
(2)
Data Memory
I/O
(1)
EEPROM
(Bytes)
MSSP
ECCP
(Half-Bridge)
ECCP
(Full-Bridge)
16-bit Timer
4
4
4
4
4
4
4
4
Comparator
8-bit Timer
3
3
3
3
3
3
3
3
BOR/LVD
Y
Y
Y
Y
Y
Y
Y
Y
SR Latch
Y
Y
Y
Y
Y
Y
Y
Y
EUSART
CTMU
Y
Y
Y
Y
Y
Y
Y
Y
CCP
SRAM
(Bytes)
PIC18(L)F23K22
PIC18(L)F24K22
PIC18(L)F25K22
PIC18(L)F26K22
PIC18(L)F43K22
PIC18(L)F44K22
PIC18(L)F45K22
PIC18(L)F46K22
Note 1:
2:
8K
16K
32K
64k
8K
16K
32K
64k
4096
8192
16384
32768
4096
8192
16384
32768
512
768
1536
3896
512
768
1536
3896
256
256
256
1024
256
256
256
1024
25
25
25
25
36
36
36
36
19
19
19
19
30
30
30
30
2
2
2
2
2
2
2
2
1
1
1
1
2
2
2
2
2
2
2
2
1
1
1
1
2
2
2
2
2
2
2
2
I
2
C™
2
2
2
2
2
2
2
2
SPI
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
One pin is input only.
Channel count includes internal FVR and DAC channels.
DS41412B-page 4
Preliminary
2010 Microchip Technology Inc.
PIC18(L)F2X/4XK22
Pin Diagrams
28-pin PDIP, SOIC, SSOP
MCLR/V
PP
/RE3
RA0
RA1
RA2
RA3
RA4
RA5
V
SS
RA7
RA6
RC0
RC1
RC2
RC3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
28
27
26
25
24
23
22
21
20
19
18
17
16
15
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
V
DD
V
SS
RC7
RC6
RC5
RC4
RA2
RA3
RA4
RA5/
V
SS
RA7
RA6
28 27 26 25 24 23 22
1
2
3
4
PIC18(L)F2XK22
5
6
7
8 9 10 11 12 13 14
RA1
RA0
MCLR/V
PP
/RE3
RB7
RB6
RB5
RB4
21
20
19
18
17
16
15
28-pin QFN, UQFN
(1)
PIC18(L)F2XK22
RB3
RB2
RB1
RB0
V
DD
V
SS
RC7
Note
1:
The 28-pin UQFN package is available only for PIC18(L)F23K22 and PIC18(L)F24K22.
2010 Microchip Technology Inc.
RC0
RC1
RC2
RC3
RC4
RC5
RC6
Preliminary
DS41412B-page 5