PIC18F45K20-I/P - 8-Bit 64MHz 32KB Flash XLP MCU | Microchip
N.º de pieza: PIC18F45K20-I/P ✓ Activo| Cant. | Precio unitario | Total |
|---|---|---|
| 1 | $4.21 | $4,21 |
| 10 | $3.78 | $37,80 |
| 100 | $3.16 | $316,00 |
| 500 | $2.74 | $1.370,00 |
| 1.000 | $2.45 | $2.450,00 |
PIC18F45K20-I/P Descripción general
An 8-bit microcontroller (MCU) is a single-chip processor that combines a CPU, non-volatile program memory (typically Flash), volatile data memory (RAM), small EEPROM/FRAM, and a rich set of peripherals on one die. PIC18F-family parts sit between Microchip's PIC16 baseline and the PIC24/dsPIC 16-bit families, balancing code density, low power (the XLP nanoWatt feature family) and rich peripheral integration. The PIC18F45K20 specifically belongs to the "K20" sub-family that emphasizes extreme-low-power (XLP) operation, wider voltage tolerance (1.8 V - 3.6 V for the LF variants, up to 5.5 V for the F version) and nanoWatt sleep modes with sub-microamp standby currents.
Key features include 64 MHz operation from a 16 MIPS instruction pipeline, hardware multiplier, C-optimized 16-bit instruction word architecture, an enhanced addressable USART, self-programming Flash, in-circuit debug (ICD) and 10-bit ADC with up to 14 channels. According to the manufacturer datasheet, the device includes nanoWatt XLP technology with typical sleep currents below 50 nA in real-time-clock mode, making it well suited to battery-powered sensor nodes.
Typical applications include industrial control panels, low-power sensor hubs, USB-less HID peripherals, automotive body electronics, white-goods motor control, and education/hobby platforms. The 40-pin PDIP is breadboard-friendly, lowering the barrier for prototyping and repair-friendly production runs where through-hole replacement matters.
When designing with this part, verify that the Vdd rail falls within 1.8 V to 3.6 V for the F-version and that decoupling capacitors (100 nF plus bulk) are placed within 5 mm of the supply pins. Program via ICSP using PGD/PGC, leaving adequate guard traces around the high-impedance analog inputs to avoid ADC noise pickup.
Alternativas directas para PIC18F45K20-I/P — mismo encapsulado, compatible pin a pin. Se excluyen las piezas de otro encapsulado que requieren retrabajo de la PCB.
Variantes de esta serie
Modelos de la misma serie compatibles directamente con PIC18F45K20-I/P (mismo factor de forma y huella) — difiere en ADC, Operating Temperature, Package, RoHS Status, Mounting Type.
Herramienta de comparación rápida — seleccione piezas alternativas para compararlas lado a lado:
PIC18F44K20-I/PT
✅ Sustitución directa✓ En stock
$2.62 / unidad
Ver hoja de datos →PIC18F45K22-I/P
✅ Sustitución directa✓ En stock
$2.1 / unidad
Ver hoja de datos →PIC18F43K20-I/P
✅ Sustitución directa✓ En stock
$1.95 / unidad
Ver hoja de datos →PIC18F4520-I/P
✅ Sustitución directa✓ En stock
$5.35 / unidad
Ver hoja de datos →PIC18F45K20-I/P Valores máximos y características eléctricas
| Product Family | PIC18F XLP 18K |
| Core Architecture | PIC18 (8-bit) Enhanced RISC |
| Program Memory | 32 KB Flash |
| Data Memory (SRAM) | 1536 bytes |
| Data EEPROM | 256 bytes |
| Maximum CPU Speed | 64 MHz (16 MIPS) |
| Operating Voltage | 1.8 V to 3.6 V (F variant) / up to 5.5 V (other variants) |
| I/O Pins | 36 |
| ADC | 10-bit, 14 channels |
| Timers | 3 (Timer0/1/2) plus watchdog |
| PWM Modules | 2 (CCP + enhanced CCP) |
| Capture/Compare | 2 |
| Communication | EUSART, MSSP (I2C/SPI), PSP |
| Encapsulado | 40-pin PDIP (600 mil) |
| Tipo de montaje | Through-hole (DIP) |
| Temperatura de funcionamiento | -40C to +85C (Industrial, -I grade) |
| Estado RoHS | Compliant |
| Lead-Free | Yes |
Configuración de pines de PIC18F45K20-I/P
| Pin 1 | RA0/AN0 — Analog input 0 / digital I/O |
| Pin 2 | RA1/AN1 — Analog input 1 / digital I/O |
| Pin 3 | RA2/AN2 — Analog input 2 / digital I/O |
| Pin 4 | RA3/AN3/VREF+ — Analog input 3 / VREF+ |
| Pin 5 | RA4/T0CKI — Timer0 clock / digital I/O |
| Pin 6 | RA5/AN4/SS — Analog input 4 / SPI SS |
| Pin 7 | RA6/OSC2 — Oscillator output / digital I/O |
| Pin 8 | RA7/OSC1 — Oscillator input / digital I/O |
| Pin 9 | RB0/INT0 — External interrupt 0 / digital I/O |
| Pin 10 | RB1/INT1 — External interrupt 1 / digital I/O |
| Pin 11 | VDD — Positive supply |
| Pin 12 | VSS — Ground |
| Pin 13 | OSC1/CLKI — External clock input |
| Pin 14 | OSC2/CLKO — Oscillator output |
| Pin 15 | RC0 — Digital I/O |
| Pin 16 | RC1 — Digital I/O |
| Pin 17 | RC2 — Digital I/O |
| Pin 18 | RC3 — Digital I/O |
| Pin 19 | RD0 — Digital I/O / PSP |
| Pin 20 | RD1 — Digital I/O / PSP |
| Pin 21 | RD2 — Digital I/O / PSP |
| Pin 22 | RD3 — Digital I/O / PSP |
| Pin 23 | RC4 — Digital I/O |
| Pin 24 | RC5 — Digital I/O |
| Pin 25 | RC6 — Digital I/O |
| Pin 26 | RC7 — Digital I/O |
| Pin 27 | RD4 — Digital I/O / PSP |
| Pin 28 | RD5 — Digital I/O / PSP |
| Pin 29 | RD6 — Digital I/O / PSP |
| Pin 30 | RD7 — Digital I/O / PSP |
| Pin 31 | VSS — Ground |
| Pin 32 | VDD — Positive supply |
| Pin 33 | RB2 — Digital I/O |
| Pin 34 | RB3 — Digital I/O |
| Pin 35 | RB4 — Digital I/O |
| Pin 36 | RB5 — Digital I/O |
| Pin 37 | RB6/PGC — ICSP clock / digital I/O |
| Pin 38 | RB7/PGD — ICSP data / digital I/O |
| Pin 39 | RE0/RD — Parallel slave port read |
| Pin 40 | RE1/WR — Parallel slave port write |
Aplicaciones típicas
PIC18F45K20-I/P es adecuado para 7 aplicacións: Industrial Control Panels, Battery-Powered Sensor Hubs, Automotive Body Electronics, White Goods and Appliance Control, Education and Hobby Prototyping, USB-less HID Peripherals, Low-Cost Data Acquisition Modules.
Industrial Control Panels
The PIC18F45K20-I/P is a strong fit for industrial control panels because of its 36 GPIO, 14-channel 10-bit ADC, and EUSART/MSSP serial interfaces that connect to sensors, keypads and HMI displays. The 64 MHz/16 MIPS core handles multi-tasking control loops while XLP nanoWatt modes keep idle panels below 100 uA standby. The 40-pin PDIP package simplifies field replacement in legacy equipment. Pair the MCU with opto-isolated inputs and an RS-485 transceiver for robust industrial networking in PLC-style designs.
Recomendado
Battery-Powered Sensor Hubs
With nanoWatt XLP technology and sub-100 nA sleep currents, the PIC18F45K20-I/P is well suited to battery-powered sensor hubs that spend most of their life in standby and wake on interrupt. The internal 10-bit ADC reads temperature, light or battery voltage without external components, while the EUSART and MSSP carry sensor data to a host radio. A 32 kHz crystal driving RTCC provides time-stamped logging at multi-year coin-cell lifetimes. Pair it with a low-power RF module for wireless sensor networks.
Recomendado
Automotive Body Electronics
Automotive body controllers benefit from the PIC18F45K20-I/P's wide voltage tolerance, 36 GPIO for switches and lamps, and PWM channels for LED dimming or motor drive. The -I grade part covers the -40C to +85C automotive cabin environment, while the capture/compare modules handle encoder feedback for mirror or seat actuators. CAN networking is added via an external MCP2515 controller bridged to the MSSP SPI port. The DIP-40 package suits aftermarket accessory modules and repair-friendly installations.
Recomendado
White Goods and Appliance Control
Washing machines, dishwashers and refrigerators use the PIC18F45K20-I/P for motor and valve sequencing, front-panel key scanning and LCD driving. The 10-bit ADC reads motor current, NTC temperature sensors and water level probes, while the PWM outputs switch triac drivers or variable-frequency motor bridges. XLP standby currents help meet energy-star idle targets when appliances are off but still listening for user input. The robust PIC18 instruction set simplifies IEC 60730 safety-class software development.
Recomendado
Education and Hobby Prototyping
The 40-pin PDIP footprint of the PIC18F45K20-I/P plugs directly into breadboards, making it a popular choice for university courses and hobbyists learning embedded systems. The PIC18 instruction set, MPLAB X IDE and free XC8 compiler form a complete learning environment, and the 32 KB Flash accommodates non-trivial student projects. ICSP via PGD/PGC avoids bootloader complexity. The same pinout family covers 18F4620 and 18F46K22 upgrades so students can scale without rewiring.
Recomendado
USB-less HID Peripherals
Keyboards, mice, gaming pads and custom HID peripherals that already include a dedicated USB controller can use the PIC18F45K20-I/P for button scanning, LED driving and macro logic. The MSSP SPI port talks to the USB controller while the EUSART provides debug output. XLP nanoWatt sleep keeps wireless peripherals at multi-month battery life. The 32 KB Flash holds USB descriptor tables and device firmware, plus room for future feature expansion. Pair with a Nordic nRF24 or Microchip RN4870 BLE module.
Recomendado
Low-Cost Data Acquisition Modules
Standalone data-acquisition front-ends for vibration, strain-gauge or thermocouple monitoring use the PIC18F45K20-I/P's 14-channel ADC, MSSP for SPI ADCs and EUSART for host logging. The 10-bit ADC at 100 ksps covers most mechanical-monitoring bandwidths; an external 16-bit ADC upgrades resolution via SPI. The 40-pin DIP package fits standard carrier boards. Flash and EEPROM provide ample local storage for time-stamped logs before offload to a host PC.
Recomendado
Resumen de productos recomendados
Datos de referencia de ingeniería para PIC18F45K20-I/P — comparación, orientación de diseño e información de cumplimiento.
Guía de selección
Comparación con alternativas
| Parámetro | Este producto | PIC18F44K20-I/P | PIC18F45K22-I/P | PIC18F43K20-I/P | PIC18F4520-I/P |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 40-pin PDIP (DIP-40) | 40-pin PDIP - same | 40-pin PDIP - same | 40-pin PDIP - same | 40-pin PDIP - same |
| Program Memory | 32 KB Flash | 16 KB Flash | 32 KB Flash | 8 KB Flash | 32 KB Flash |
| Data SRAM | 1536 bytes | 768 bytes | 1536 bytes | 512 bytes | 1536 bytes |
| Maximum CPU Speed | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 64 MHz (16 MIPS) | 40 MHz (10 MIPS) |
| XLP nanoWatt | Yes | Yes | Yes | Yes | No (legacy) |
| ADC | 10-bit, 14 ch | 10-bit, 14 ch | 10-bit, 17 ch | 10-bit, 14 ch | 10-bit, 13 ch |
| PWM Outputs | 2 | 2 | Up to 7 | 2 | 2 |
| Operating Voltage | 1.8 V to 3.6 V (F variant) | 1.8 V to 3.6 V (F) | 1.8 V to 3.6 V (F) | 1.8 V to 3.6 V (F) | 2.0 V to 5.5 V |
Diferenciadores clave
- Higher Flash density in same DIP-40 footprint (frente a PIC18F44K20-I/P)
- XLP nanoWatt technology (frente a PIC18F4520-I/P)
- Newer PWM and timer peripherals (frente a PIC18F45K22-I/P)
Notas de diseño
Decouple each VDD/VSS pair with a 100 nF ceramic placed within 5 mm of the pins. For battery applications, the F-variant voltage range of 1.8 V to 3.6 V requires careful brown-out-reset threshold selection to avoid mid-voltage corruption; configure BOR in CONFIG2H for low-voltage operation. For noise-sensitive analog designs, route the analog VREF+ through a ferrite bead from VDD and add a 10 uF tantalum bulk capacitor at the MCU supply pin.
Keep the 32.768 kHz crystal traces short and symmetric, with a ground guard ring around the oscillator pins to reduce capacitive coupling from switching signals. Place ICSP header connections for PGD (RB7) and PGC (RB6) on board-test points that are accessible without removing the MCU. Analog inputs (AN0-AN13) should be guarded by a ground pour to suppress digital switching noise coupling into the ADC conversion.
The PIC18F45K20's HF oscillator requires proper configuration of the OSCCON and OSCTUNE registers to avoid clock drift after a WDT wakeup. Watchdog timer periods must be tuned to the longest expected sleep interval, and the SWDTEN bit cleared before sleep if unused. Common firmware bugs include failing to clear interrupt flags before re-enabling interrupts; this can cause the part to wake immediately from sleep and drain the battery. Always read-modify-write interrupt flag registers using the supplied bit-clear macros.
Estimated: when driving long cables or LED strings, configure the I/O pins as TTL input mode (INTCON2bits.RBPU = I) and enable slew-rate control on PORTB to limit EMI. Place 33 ohm series resistors on PWM outputs to dampen transmission-line reflections. When using the MSSP SPI bus above 4 MHz, add a 4.7 kohm pull-up on the SDA line and ensure the SCK trace length matches the MISO/MOSI traces within 5 mm to avoid skew-related framing errors.
Información de cumplimiento
RoHS/REACH compliance declared by Microchip. AEC-Q100 not qualified - use PIC18F45K22-E/P extended-grade part for automotive. Halogen-free status not stated in retrieved distributor data.