PIC18(L)F2X/45K50
28/40/44-Pin, Low-Power, High-Performance
Microcontrollers with XLP Technology
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
• 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
• 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
Flexible Oscillator Structure:
• 3x and 4xPLL 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
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
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 interrupts-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 I
2
C™
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
2012 Microchip Technology Inc.
DS30684A-page 1
PIC18(L)F2X/45K50
Timers
8-bit/16-bit
2/2
2/2
2/2
10-Bit A/D
Channels
BOR/LVD
EUSART
USB 2.0
Yes
Yes
Yes
Program Memory
Device
Flash
(bytes)
Data Memory
Data
Pins
I/O
Comparators
CTMU
Yes
Yes
Yes
Single-Word
SRAM
EEPROM
Instructions
(bytes)
(bytes)
256
256
256
PIC18(L)F45K50
PIC18(L)F25K50
PIC18(L)F24K50
32K
32K
16K
16384
16384
8192
2048
2048
2048
40/44
28
28
36
25
25
25-ch
14-ch
14-ch
2
2
2
1/1
1/1
1/1
Yes
Yes
Yes
MSSP
1
1
1
CCP/
ECCP
1
1
1
Pin Diagram
28-PIN PDIP (300 MIL), SOIC, SSOP
MCLR/V
PP
/RE3
RA0
RA1
RA2
RA3
RA4
RA5
V
SS
RA7
RA6
RC0
RC1
RC2
V
USB
3
V
3
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
D+
D-
Pin Diagram
28-PIN QFN
RA1
RA0
MCLR/V
PP
/RE3
RB7
RB6
RB5
RB4
RA2
RA3
RA4
RA5
V
SS
RA7
RA6
RC0 8
RC1 9
RC2 10
V
USB
3
V
3
11
D- 12
D+ 13
RC6 14
1
21 RB3
2
20 RB2
3
19 RB1
4
PIC18(L)F2XK50
18 RB0
5
17 V
DD
6
16 V
SS
7
15 RC7
28
27
26
25
24
23
22
PIC18(L)F2XK50
DS30684A-page 2
2012 Microchip Technology Inc.
PIC18(L)F2X/45K50
Pin Diagram
40-PIN PDIP (600 MIL)
MCLR/V
PP
/RE3
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
V
DD
V
SS
RA7
RA6
RC0
RC1
RC2
V
USB
3
V
3
RD0
RD1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
RB7
RB6
RB5
RB4
RB3
RB2
RB1
RB0
V
DD
V
SS
RD7
RD6
RD5
RD4
RC7
RC6
D+
D-
RD3
RD2
Pin Diagram
40-PIN UQFN
RC6
D+
D-
RD3
RD2
RD1
RD0
V
USB
3
V
3
RC2
RC1
40
39
38
37
36
35
34
33
32
31
RC7
RD4
RD5
RD6
RD7
V
SS
V
DD
RB0
RB1
RB2
1
2
3
4
5
6
7
8
9
10
PIC18(L)F45K50
PIC18(L)F45K50
30 RC0
29 RA6
28 RA7
27 V
SS
26 V
DD
25 RE2
24 RE1
23 RE0
22 RA5
21 RA4
2012 Microchip Technology Inc.
RB3
RB4
RB5
RB6
RB7
MCLR/V
PP
/RE3
RA0
RA1
RA2
RA3
11
12
13
14
15
16
17
18
19
20
DS30684A-page 3
PIC18(L)F2X/45K50
Pin Diagram
44-PIN TQFP
RC6
D+
D-
RD3
RD2
RD1
RD0
V
USB
3
V
3
RC2
RC1
NC
44
43
42
41
40
39
38
37
36
35
34
Note 1:
Special ICPORT programming/debug port features available when ICPRT =
1
NC/ICCK
(1)
/ICPGC
(1)
NC/ICDT
(1)
/ICPGD
(1)
RB4
RB5
RB6
RB7
MCLR/V
PP
/RE3
RA0
RA1
RA2
RA3
12
13
14
15
16
17
18
19
20
21
22
RC7
RD4
RD5
RD6
RD7
V
SS
V
DD
RB0
RB1
RB2
RB3
1
2
3
4
5
6
7
8
9
10
11
PIC18(L)F45K50
33
32
31
30
29
28
27
26
25
24
23
NC/ICRST
(1)
/ICV
PP
(1)
RC0
RA6
RA7
V
SS
V
DD
RE2
RE1
RE0
RA5
RA4
DS30684A-page 4
2012 Microchip Technology Inc.
2012 Microchip Technology Inc.
DS30684A-page 5
TABLE 1:
28-PIn PDIP/SOIC/SSOP
PIC18(L)F2X/45K50 PIN SUMMARY
40-Pin UQFN
44-Pin TQFP
Comparator
40-Pin PDIP
28-Pin QFN
Reference
Interrupts
SR Latch
EUSART
(E)CCP
Pull-up
Analog
Timers
CTMU
MSSP
Basic
USB
RA0
RA1
RA2
RA3
RA4
RA5
RA6
RA7
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
Note 1:
2:
3:
4:
5:
6:
7:
2
3
4
5
6
7
10
9
21
22
23
24
25
26
27
28
27
28
1
2
3
4
7
6
18
19
20
21
22
23
24
25
2
3
4
5
6
7
14
13
33
34
35
36
37
38
39
40
17
18
19
20
21
22
29
28
8
9
10
11
12
13
14
15
19
20
21
22
23
24
31
30
8
9
10
11
14
15
16
17
AN0
AN1
AN2
AN3
AN4
C12IN0-
C12IN1- CTCMP
C2IN+
C1IN+
C1OUT
C2OUT
SRQ
SRNQ
HLVDIN
SS
OSC2
CLKO
OSC1
CLKI
V
REF
-
DACOUT
V
REF
+
T0CKI
AN12
AN10
AN8
AN9
AN11
AN13
C12IN2-
C12IN3-
CTED1
CTED2
SRI
FLT0
P1C
(5)
P1B
(5)
CCP2
(1)
P1D
(5)
SDI
SDA
SCK
SCL
SDO
INT0
INT1
INT2
IOCB4
T1G
IOCB5
T3CKI
(2)
IOCB6
IOCB7
Y
Y
Y
Y
Y
Y
Y
Y
PGC
PGD
ICD
I/O
PIC18(L)F2X/45K50
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 can be used for digital input only (no output functionality).