PIC18(L)F2X/45K50
PIC18(L)F2X/45K50 USB Flash MCU Product Brief
Universal Serial Bus Features:
• USB V2.0 Compliant
• Crystal-less Full Speed (12 Mb/s) and Low-Speed
Operation (1.5 Mb/s)
• Supports Control, Interrupt, Isochronous and Bulk
Transfers
• Supports up to 32 Endpoints (16 Bidirectional)
• 1 Kbyte Dual Access RAM for USB
• On-Chip USB Transceiver
Flexible Oscillator Structure:
• 3x and 4x PLL Clock Multipliers
• Two External Clock modes, Up to 48 MHz (12
MIPS)
• Internal 31 kHz Oscillator
• Internal Oscillator, 31 kHz to 16 MHz
- Factory calibrated to ± 1%
- Self-tune to ± 0.20% max. from USB or
secondary oscillator
• Secondary Oscillator using Timer1 @ 32 kHz
• Fail-Safe Clock Monitor:
- Allows for safe shutdown if any clock stops
Peripheral Highlights:
• Up to 33 I/O Pins plus 3 Input-Only Pins:
- High-current Sink/Source 25 mA/25 mA
- Three programmable external interrupts
- 11 programmable Interrupt-on-Change
- 9 programmable weak pull-ups
- Programmable slew rate
• SR Latch
• Enhanced Capture/Compare/PWM (ECCP)
module:
- One, two or four PWM outputs
- Selectable polarity
- Programmable dead time
- Auto-shutdown and auto-restart
- Pulse steering control
• Capture/Compare/PWM (CCP) module
• Master Synchronous Serial Port (MSSP) module
Supporting 3-Wire SPI (all 4 modes) and I2C™
Master and Slave modes
• Two Analog Comparators with Input Multiplexing
• 10-Bit Analog-to-Digital (A/D) Converter module:
- Up to 25 input channels
- Auto-acquisition capability
- Conversion available during Sleep
• 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
2012 Microchip Technology Inc.
• High/Low-Voltage Detect module
• Charge Time Measurement Unit (CTMU):
- Supports capacitive touch sensing for touch
screens and capacitive switches
• Enhanced USART module:
- Supports RS-485, RS-232 and LIN/J2602
- Auto-wake-up on Start bit
- Auto-Baud Detect
Extreme Low-Power Management with
XLP:
•
•
•
•
Sleep mode: 20 nA, typical
Watchdog Timer: 300 nA, typical
Timer1 Oscillator: 800 nA @ 32 kHz
Peripheral Module Disable
Special Microcontroller Features:
• Low-Power, High-Speed CMOS Flash Technology
• C Compiler Optimized Architecture for Re-Entrant
Code
• Power Management Features:
- Run: CPU on, peripherals on, SRAM on
- Idle: CPU off, peripherals on, SRAM on
- Sleep: CPU off, peripherals off, SRAM on
• Priority Levels for Interrupts
• Self-Programmable under Software Control
• 8 x 8 Single-Cycle Hardware Multiplier
• Extended Watchdog Timer (WDT):
- Programmable period from 4 ms to 131s
• Single-Supply In-Circuit Serial Programming™
(ICSP™) via Two Pins
• In-Circuit Debug (ICD) with Three Breakpoints via
Two Pins
• Optional dedicated ICD/ICSP Port (44-Pin TQFP
Package Only)
• Wide Operating Voltage Range:
- F devices: 2.3V to 5.5V
- LF devices: 1.8V to 3.6V
• Flash Program Memory of 10,000 Erase/Write
Cycles Minimum and 20-year Data Retention
Advance Information
DS30025A-page 1
PIC18(L)F2X/45K50
10-bit A/D
channels
Comparators
CCP/
ECCP
BOR/LVD
CTMU
MSSP
EUSART
Timers
8-bit/16-bit
USB 2.0
PIC18(L)F2X/45K50 Family Types
PIC18(L)F45K50
32K
16384
2048
256
40/44
36
25-ch
2
1/1
Yes
Yes
1
1
2/2
Yes
PIC18(L)F25K50
32K
16384
2048
256
28
25
14-ch
2
1/1
Yes
Yes
1
1
2/2
Yes
PIC18(L)F24K50
16K
8192
2048
256
28
25
14-ch
2
1/1
Yes
Yes
1
1
2/2
Yes
Program Memory
Device
Flash
(bytes)
FIGURE 1:
Data Memory
Data
Single Word SRAM
EEPROM
Instructions (bytes)
Pins
I/O
(bytes)
28-PIN PDIP, SOIC, SSOP DIAGRAM FOR PIC18(L)F2XK50
MCLR/VPP/RE3
RA0
RA1
RA2
RA3
RA4
RA5
VSS
RA7
RA6
RC0
RC1
RC2
VUSB3V3
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
VDD
VSS
RC7
RC6
RC5/D+
RC4/D-
28
27
26
25
24
23
22
21
20
19
18
17
16
15
28-PIN QFN DIAGRAM FOR PIC18(L)F2XK50
RA1
RA0
MCLR/VPP/RE3
RB7
RB6
RB5
RB4
FIGURE 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PIC18(L)F2XK50
28-PIN PDIP (300 MIL), SOIC, SSOP
28
27
26
25
24
23
22
28-PIN QFN
1
21
2
20
3
19
PIC18(L)F2XK50
4
18
5
17
6
16
7
15
DS30025A-page 2
RB3
RB2
RB1
RB0
VDD
VSS
RC7
VUSB3V3
D-/RC4
D+/RC5
RC6
RC0
RC1
RC2
8
9
10
11
12
13
14
RA2
RA3
RA4
RA5
VSS
RA7
RA6
Advance Information
2012 Microchip Technology Inc.
PIC18(L)F2X/45K50
FIGURE 3:
40-PIN PDIP DIAGRAM FOR PIC18(L)F45K50
MCLR/VPP/RE3
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VDD
VSS
RA7
RA6
RC0
RC1
RC2
VUSB3V3
RD0
RD1
FIGURE 4:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PIC18(L)F45K50
40-PIN PDIP (600 MIL)
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
VDD
VSS
RD7
RD6
RD5
RD4
RC7
RC6
RC5/D+
RC4/DRD3
RD2
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
40-PIN UQFN DIAGRAM FOR PIC18(L)F45K50
40
39
38
37
36
35
34
33
32
31
RC6
RC5/D+
RC4/DRD3
RD2
RD1
RD0
VUSB3V3
RC2
RC1
40-PIN UQFN
1
2
3
4
5
6
7
8
9
10
PIC18(L)F45K50
30
29
28
27
26
25
24
23
22
21
RC0
RA6
RA7
VSS
VDD
RE2
RE1
RE0
RA5
RA4
RB3
RB4
RB5
RB6
RB7
MCLR/VPP/RE3
RA0
RA1
RA2
RA3
11
12
13
14
15
16
17
18
19
20
RC7
RD4
RD5
RD6
RD7
VSS
VDD
RB0
RB1
RB2
2012 Microchip Technology Inc.
Advance Information
DS30025A-page 3
PIC18(L)F2X/45K50
FIGURE 5:
44-PIN TQFP DIAGRAM FOR PIC18(L)F45K50
44
43
42
41
40
39
38
37
36
35
34
RC6
RC5/D+
RC4/DRD3
RD2
RD1
RD0
VUSB3V3
RC2
RC1
NC
44-PIN TQFP
PIC18(L)F45K50
33
32
31
30
29
28
27
26
25
24
23
12
13
14
15
16
17
18
19
20
21
22
1
2
3
4
5
6
7
8
9
10
11
NC/ICRST(1)/ICVPP(1)
RC0
RA6
RA7
VSS
VDD
RE2
RE1
RE0
RA5
RA4
NC/ICCK(1)/ICPGC(1)
NC/ICDT(1)/ICPGD(1)
RB4
RB5
RB6
RB7
MCLR/VPP/RE3
RA0
RA1
RA2
RA3
RC7
RD4
RD5
RD6
RD7
VSS
VDD
RB0
RB1
RB2
RB3
Note 1:
Special ICPORT programming/debug port features available when ICPRT = 1
DS30025A-page 4
Advance Information
2012 Microchip Technology Inc.
5
20
22
AN3
3
6
21
23
RA5
7
4
7
22
24
RA6
10
7
14
29
31
OSC2
CLKO
RA7
9
6
13
28
30
OSC1
CLKI
RB0
21
18
33
8
8
AN12
RB1
22
19
34
9
9
AN10
RB2
23
20
35
10
10
AN8
RB3
24
21
36
11
11
AN9
RB4
25
22
37
12
14
AN11
RB5
26
23
38
13
15
AN13
RB6
27
24
39
14
RB7
28
25
40
15
DS30025A-page 5
Note 1:
2:
3:
4:
5:
6:
7:
AN4
CTMU
C2IN+
VREFDACOUT
C1IN+
VREF+
C1OUT
SRQ
C2OUT
SRNQ
SRI
C12IN3-
C12IN2-
ICD
2
6
C12IN1- CTCMP
Basic
5
RA4
AN1
AN2
Pull-up
RA3
20
21
Interrupts
19
Timers
18
4
MSSP
3
1
EUSART
28
4
C12IN0-
(E)CCP
3
RA2
AN0
USB
RA1
19
Reference
17
SR Latch
2
Comparator
40-Pin UQFN
27
Analog
40-Pin PDIP
2
44-Pin TQFP
28-Pin QFN
RA0
T0CKI
LVDIN
SS
FLT0
SDI
SDA
INT0
Y
P1C(5)
SCK
SCL
INT1
Y
CTED1
P1B(5)
CTED2
CCP2(1)
P1D(5)
INT2
SDO
Y
Y
IOCB4
Y
T1G
IOCB5
T3CKI(2)
Y
16
IOCB6
Y
PGC
17
IOCB7
Y
PGD
Alternate CCP2 pin location based on Configuration bit.
Alternate T3CKI pin location based on Configuration bits.
Pins are enabled when ICPRT = 1, otherwise, they are disabled.
Location on 40/44-Pin parts (PIC18(L)F45K50). Function not on this pin on 28-Pin parts (PIC18(L)F2XK50).
Location on 28-Pin parts (PIC18(L)F2XK50). Function not on this pin on 40/44-Pin parts (PIC18(L)F45K50).
Alternate SDO pin location based on Configuration bits.
RE3, RC4 and RC5 can be used for digital input only (no output functionality).
PIC18(L)F2X/45K50
Advance Information
28-PIn PDIP/SOIC/SSOP
PIC18(L)F2X/45K50 PIN SUMMARY
I/O
2012 Microchip Technology Inc.
TABLE 1:
Advance Information
12
9
16
31
35
RC2
13
10
17
32
36
CCP2
—
14
11
18
33
37
—
VUSB3V3
RC4(7)
15
12
23
38
42
—
DD+
AN14
CTPLS
SOSCI
CCP1
P1A
IOCC1
IOCC2
VDDCORE
IOCC4
RC5(7)
16
13
24
39
43
—
RC6
17
14
25
40
44
AN18
TX
CK
RC7
18
15
26
1
1
AN19
RX
DT
RD0
—
—
19
34
38
AN20
RD1
—
—
20
35
39
AN21
RD2
—
—
21
36
40
AN22
IOCC5
2012 Microchip Technology Inc.
RD3
—
—
22
37
41
AN23
RD4
—
—
27
2
2
AN24
RD5
—
—
28
3
3
AN25
P1B(4)
RD6
—
—
29
4
4
AN26
P1C(4)
RD7
—
—
30
5
5
AN27
P1D(4)
RE0
—
—
8
23
25
AN5
Alternate CCP2 pin location based on Configuration bit.
Alternate T3CKI pin location based on Configuration bits.
Pins are enabled when ICPRT = 1, otherwise, they are disabled.
Location on 40/44-Pin parts (PIC18(L)F45K50). Function not on this pin on 28-Pin parts (PIC18(L)F2XK50).
Location on 28-Pin parts (PIC18(L)F2XK50). Function not on this pin on 40/44-Pin parts (PIC18(L)F45K50).
Alternate SDO pin location based on Configuration bits.
RE3, RC4 and RC5 can be used for digital input only (no output functionality).
IOCC6
SDO(6)
IOCC7
ICD
Basic
Pull-up
Interrupts
Timers
SOSCO IOCC0
T1CKI
T3CKI
T3G
RC1
Note 1:
2:
3:
4:
5:
6:
7:
MSSP
EUSART
(E)CCP
32
USB
44-Pin TQFP
30
Reference
40-Pin UQFN
15
SR Latch
40-Pin PDIP
8
CTMU
28-Pin QFN
11
Comparator
28-PIn PDIP/SOIC/SSOP
RC0
Analog
I/O
PIC18(L)F2X/45K50 PIN SUMMARY
PIC18(L)F2X/45K50
DS30025A-page 6
TABLE 1:
AN7
1
16
18
—
20
17
11,
32
7,
26
7,
28
VDD
8,
19
5,
16
12,
31
6,
27
6,
29
VSS
–
–-
12(3)
ICPGC(3)
ICCK(3)
–
–-
13(3)
ICPGD(3)
ICDT(3)
–-
33(3)
(3)
–Note 1:
2:
3:
4:
5:
6:
7:
Alternate CCP2 pin location based on Configuration bit.
Alternate T3CKI pin location based on Configuration bits.
Pins are enabled when ICPRT = 1, otherwise, they are disabled.
Location on 40/44-Pin parts (PIC18(L)F45K50). Function not on this pin on 28-Pin parts (PIC18(L)F2XK50).
Location on 28-Pin parts (PIC18(L)F2XK50). Function not on this pin on 40/44-Pin parts (PIC18(L)F45K50).
Alternate SDO pin location based on Configuration bits.
RE3, RC4 and RC5 can be used for digital input only (no output functionality).
Y
MCLR
VPP
ICVPP
ICD
Basic
27
Pull-up
25
Interrupts
10
26
Timers
—
1
MSSP
—
EUSART
AN6
(E)CCP
26
USB
24
Reference
Analog
9
SR Latch
44-Pin TQFP
—
CTMU
40-Pin UQFN
—
Comparator
40-Pin PDIP
Advance Information
28-Pin QFN
RE2
RE3(7)
28-PIn PDIP/SOIC/SSOP
I/O
RE1
PIC18(L)F2X/45K50 PIN SUMMARY
ICRST(3)
PIC18(L)F2X/45K50
DS30025A-page 7
TABLE 1:
2012 Microchip Technology Inc.
PIC18(L)F2X/45K50
NOTES:
DS30025A-page 8
Advance Information
2012 Microchip Technology Inc.
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,
KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
PIC32 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, chipKIT,
chipKIT logo, 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, 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.
© 2012, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 9781620762592
QUALITY MANAGEMENT SYSTEM
CERTIFIED BY DNV
== ISO/TS 16949 ==
2012 Microchip Technology Inc.
Microchip received ISO/TS-16949:2009 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, KEELOQ® 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.
Advance Information
DS30025A-page 9
Worldwide Sales and Service
AMERICAS
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://www.microchip.com/
support
Web Address:
www.microchip.com
Asia Pacific Office
Suites 3707-14, 37th Floor
Tower 6, The Gateway
Harbour City, Kowloon
Hong Kong
Tel: 852-2401-1200
Fax: 852-2401-3431
India - Bangalore
Tel: 91-80-3090-4444
Fax: 91-80-3090-4123
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
India - Pune
Tel: 91-20-2566-1512
Fax: 91-20-2566-1513
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Japan - Osaka
Tel: 81-66-152-7160
Fax: 81-66-152-9310
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Cleveland
Independence, OH
Tel: 216-447-0464
Fax: 216-447-0643
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Indianapolis
Noblesville, IN
Tel: 317-773-8323
Fax: 317-773-5453
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Santa Clara
Santa Clara, CA
Tel: 408-961-6444
Fax: 408-961-6445
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8569-7000
Fax: 86-10-8528-2104
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
China - Chongqing
Tel: 86-23-8980-9588
Fax: 86-23-8980-9500
Japan - Yokohama
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
Korea - Daegu
Tel: 82-53-744-4301
Fax: 82-53-744-4302
China - Hangzhou
Tel: 86-571-2819-3187
Fax: 86-571-2819-3189
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
China - Hong Kong SAR
Tel: 852-2401-1200
Fax: 852-2401-3431
Malaysia - Kuala Lumpur
Tel: 60-3-6201-9857
Fax: 60-3-6201-9859
China - Nanjing
Tel: 86-25-8473-2460
Fax: 86-25-8473-2470
Malaysia - Penang
Tel: 60-4-227-8870
Fax: 60-4-227-4068
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
Taiwan - Hsin Chu
Tel: 886-3-5778-366
Fax: 886-3-5770-955
China - Shenzhen
Tel: 86-755-8203-2660
Fax: 86-755-8203-1760
Taiwan - Kaohsiung
Tel: 886-7-536-4818
Fax: 886-7-330-9305
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
China - Xian
Tel: 86-29-8833-7252
Fax: 86-29-8833-7256
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
UK - Wokingham
Tel: 44-118-921-5869
Fax: 44-118-921-5820
China - Xiamen
Tel: 86-592-2388138
Fax: 86-592-2388130
China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049
DS30025A-page 10
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Advance Information
11/29/11
2012 Microchip Technology Inc.