PIC18F2520-I/ML - 8-Bit 40MHz 32KB Flash MCU | Microchip
MPN: PIC18F2520-I/ML ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $6.5 | $6.50 |
| 10 | $5.85 | $58.50 |
| 100 | $5.2 | $520.00 |
| 500 | $4.65 | $2,325.00 |
| 1,000 | $4.1 | $4,100.00 |
PIC18F2520-I/ML Overview
What is a PIC18 microcontroller? An 8-bit microcontroller is a single-chip computer that integrates a CPU, non-volatile program memory (Flash), volatile data memory (RAM), non-volatile data memory (EEPROM), and configurable peripherals on one silicon die. The PIC18 family from Microchip is the high-tier of the 8-bit PIC line, offering an enhanced instruction set, linear memory addressing, C-compiler-friendly architecture, and prioritized interrupts. Within the embedded hierarchy, the PIC18F2520 sits between baseline PIC10/12/16 parts and the 16-bit dsPIC/PIC24 line, providing the right balance of code density, peripheral count, and low-power features for industrial, consumer, and automotive-body applications.
Key features include up to 40 MHz operation from a 4.2 V to 5.5 V supply, 10-bit ADC with 13 channels, a USART with LIN support, MSSP (SPI/I2C), enhanced CCP modules, and nanoWatt sleep modes that drop supply current to nanoamp levels. The QFN-28 (ML) package offers a compact 6x6 mm footprint with an exposed die pad for thermal dissipation, while the part is rated for the industrial -40C to +85C temperature range.
The PIC18F2520 combines PIC18F legacy peripherals with code protection, ICSP (In-Circuit Serial Programming), and a 10-bit ADC capable of 100 Ksps conversion. Its instruction set supports 75 instructions with 83 enhanced opcodes, allowing efficient C compilation while maintaining predictable interrupt latency. The internal RC oscillator and PLL options reduce external component count in cost-sensitive designs.
Typical applications include industrial control systems, automotive body electronics, sensor interfacing, low-power remote sensors, motor control, and USB-to-UART bridges when paired with an external transceiver. The wide peripheral set and ample 32 KB Flash also make it suitable for small appliances and HVAC controllers.
When designing with the PIC18F2520, plan for decoupling on VDD/VSS pairs, route the ICSP clock/data to test pads for field update, and ensure the exposed pad is soldered to a sufficient copper area for thermal performance. Configuration bits must be set to enable or disable features such as watchdog timer, low-voltage programming, and code protection per application security requirements.
This page synthesizes distributor pricing, drop-in same-package alternatives, and practical design notes that are not collected in any single Microchip datasheet, helping engineers select and source the PIC18F2520-I/ML with confidence.
Drop-in alternatives for PIC18F2520-I/ML — same package, pin-to-pin compatible. Different-package parts requiring PCB rework are excluded.
Variants in this series
Same-series models that are drop-in compatible with PIC18F2520-I/ML (same form factor and footprint) — differing in Package, ADC, Operating Temperature, Program Memory (Flash), Timers.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F2520T-I/ML
✅ Drop-In✓ In Stock
$4.62 / Unit
View Datasheet →PIC18F2520-E/ML
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F2420-I/ML
✅ Drop-In✓ In Stock
$4.25 / Unit
View Datasheet →PIC18F2525-I/ML
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18F2620-I/SP
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18F2520-I/ML Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC18 (8-bit Enhanced RISC) |
| Program Memory (Flash) | 32 KB (16K x 16 words) |
| Data SRAM | 1536 bytes |
| Data EEPROM | 256 bytes |
| Maximum CPU Frequency | 40 MHz (10 MIPS) |
| Supply Voltage (VDD) | 4.2 V to 5.5 V |
| I/O Pins | 25 |
| ADC | 10-bit, up to 13 channels |
| Timers | 4 (Timer0/1/2/3) |
| Communication | 1x USART (LIN-capable), 1x MSSP (SPI/I2C) |
| Capture/Compare/PWM | 2x CCP modules |
| Operating Temperature | -40C to +85C (Industrial) |
| Package | QFN-28 (ML) 6x6 mm with exposed pad |
| Mounting Type | Surface Mount |
| Instruction Set | 75 instructions, 83 with extended opcode set |
| ICSP Programming | Yes (In-Circuit Serial Programming) |
| Power-Saving Modes | nanoWatt (sleep, idle, alternate clock modes) |
| RoHS Status | Compliant |
PIC18F2520-I/ML Pin Configuration
| Pin 1 | RA2/AN2/VREF- — Port A bit 2 / Analog input 2 / ADC negative reference |
| Pin 2 | RA3/AN3/VREF+ — Port A bit 3 / Analog input 3 / ADC positive reference |
| Pin 3 | RA4/T0CKI — Port A bit 4 / Timer0 clock input |
| Pin 4 | RA5/AN4/SS/LVDIN — Port A bit 5 / Analog input 4 / SPI slave select / Low-voltage detect input |
| Pin 5 | VSS — Ground reference |
| Pin 6 | OSC1/CLKI/RA7 — Crystal oscillator input / External clock input / Port A bit 7 |
| Pin 7 | OSC2/CLKO/RA6 — Crystal oscillator output / Clock output / Port A bit 6 |
| Pin 8 | RC0/T1OSO/T13CKI — Port C bit 0 / Timer1 oscillator output / Timer1-Timer3 clock input |
| Pin 9 | RC1/T1OSI — Port C bit 1 / Timer1 oscillator input |
| Pin 10 | RC2/CCP1 — Port C bit 2 / Capture-Compare-PWM 1 |
| Pin 11 | RC3/SCK/SCL — Port C bit 3 / SPI clock / I2C clock |
| Pin 12 | RC4/SDI/SDA — Port C bit 4 / SPI data in / I2C data |
| Pin 13 | RC5/SDO — Port C bit 5 / SPI data out |
| Pin 14 | RC6/TX/CK — Port C bit 6 / USART TX / USART clock |
| Pin 15 | RC7/RX/DT — Port C bit 7 / USART RX / USART data |
| Pin 16 | RB0/INT0/FLT0 — Port B bit 0 / External interrupt 0 / PWM fault input |
| Pin 17 | RB1/INT1 — Port B bit 1 / External interrupt 1 |
| Pin 18 | RB2/INT2 — Port B bit 2 / External interrupt 2 |
| Pin 19 | RB3/INT3/CCP2 — Port B bit 3 / External interrupt 3 / Capture-Compare-PWM 2 |
| Pin 20 | RB4/KBI0 — Port B bit 4 / Keyboard interrupt 0 |
| Pin 21 | RB5/KBI1/PGM — Port B bit 5 / Keyboard interrupt 1 / LVP programming |
| Pin 22 | RB6/KBI2/PGC — Port B bit 6 / Keyboard interrupt 2 / ICSP clock |
| Pin 23 | RB7/KBI3/PGD — Port B bit 7 / Keyboard interrupt 3 / ICSP data |
| Pin 24 | VDD — Positive supply voltage (4.2 V to 5.5 V) |
| Pin 25 | VSS — Ground reference |
| Pin 26 | RA0/AN0 — Port A bit 0 / Analog input 0 |
| Pin 27 | RA1/AN1 — Port A bit 1 / Analog input 1 |
| Pin 28 | VSS — Ground reference (also exposed pad internally) |
Typical Applications
PIC18F2520-I/ML is suitable for 6 applications: Industrial Sensor Hubs, Automotive Body Electronics, Small Appliance Control Boards, USB-to-UART Bridge / CDC Devices, Battery-Powered Remote Sensor Nodes, HVAC Thermostat and Building Automation.
Industrial Sensor Hubs
The PIC18F2520-I/ML fits industrial sensor hubs because its 25 I/O pins and 10-bit ADC with up to 13 channels can directly interface with multiple analog sensors (temperature, pressure, flow) while the 32 KB Flash supports application logic, calibration tables, and LIN bus protocol stacks. The 40 MHz CPU (10 MIPS) handles real-time sampling and digital filtering without external DSP. Its nanoWatt sleep modes drop quiescent current to nanoamp levels for battery-backed remote sensor installations. The QFN-28 6x6 mm footprint fits compact IP65 sensor enclosures. Compared with 16-bit alternatives, the 8-bit PIC18 core keeps BOM cost under $1.50 per node in volume, enabling dense multi-signal aggregation cabinets.
Recommended
Automotive Body Electronics
The PIC18F2520-I/ML is well suited to non-safety automotive body modules such as HVAC dampers, seat controllers, mirror adjusters, and lighting nodes, where the -40C to +85C industrial grade suffices and the USART with LIN 1.3/2.0 support directly drives LIN bus networks. The 32 KB Flash comfortably fits LIN state-machine code plus diagnostics; the 1536-byte SRAM handles message buffers and protocol state. Designers value the ICSP (In-Circuit Serial Programming) for end-of-line firmware updates without removing the module. The QFN-28 (ML) 6x6 mm package enables under-dash PCB layouts where every square millimeter matters. Note: For AEC-Q100 qualified safety-relevant modules, migrate to PIC18F2520-E/ML or PIC18FxxKxx automotive variants.
Recommended
Small Appliance Control Boards
The PIC18F2520-I/ML powers small appliance controllers in coffee makers, blenders, washing machines, and microwave ovens because the 32 KB Flash runs user-interface state machines plus motor-control algorithms (CCP for PWM, 10-bit ADC for temperature sensing), and the 25 I/O drive keypads, LED indicators, relays, and triac gates directly. Its industrial -40C to +85C temperature range covers appliance operating conditions, and the QFN-28 6x6 mm footprint fits tight control-board real estate. The 10 MIPS throughput supports both BLDC sensorless control algorithms and capacitive-touch decoding when paired with the Microchip mTouch library. The 256-byte EEPROM stores user presets and calibration across power cycles.
Recommended
USB-to-UART Bridge / CDC Devices
The PIC18F2520-I/ML serves as the MCU in low-cost USB-to-UART bridges and USB CDC (Communications Device Class) devices when paired with an external USB transceiver such as the MCP2200 or MCP2221. The 32 KB Flash holds USB HID/CDC stacks (Microchip MLA library), and the 40 MHz core executes USB 1.1 low/full-speed enumeration reliably. The MSSP peripheral handles SPI/I2C expansion, while the USART serves as the UART side of the bridge. The 1536-byte SRAM is sufficient for USB endpoint buffers. The QFN-28 (ML) 6x6 mm package fits inside USB dongle enclosures. Engineers value the deterministic interrupt latency for USB SOF timing.
Recommended
Battery-Powered Remote Sensor Nodes
The PIC18F2520-I/ML is appropriate for battery-powered wireless sensor nodes where its nanoWatt sleep modes (down to nanoamp standby current) extend battery life to multiple years on 2x AA cells. The PIC18 core wakes from sleep on interrupt, samples a sensor via the 10-bit ADC, transmits via SPI-connected radio module (e.g., MRF24J40 or LoRa), and returns to sleep. The 32 KB Flash fits simple protocol stacks and over-the-air (OTA) update bootloaders, while the 256-byte EEPROM stores node ID and calibration constants. The QFN-28 (ML) 6x6 mm footprint suits miniature sensor enclosures. Compare to PIC18LF2520 if your supply voltage is below 4.2 V.
Recommended
HVAC Thermostat and Building Automation
The PIC18F2520-I/ML fits HVAC thermostat controllers and building-automation nodes because its 10-bit ADC accurately reads thermistor/resistive temperature sensors, its 25 I/O drive triac outputs, character-LCD backlights, and keypad matrices, and its 32 KB Flash runs Modbus RTU or BACnet stacks for building network communication. The 40 MHz throughput executes PID loops for indoor temperature regulation without latency. The industrial -40C to +85C temperature grade covers mechanical-room environments. The QFN-28 6x6 mm footprint is ideal for slim wall-mount thermostat enclosures. Designers use the 256-byte EEPROM to retain setpoints and scheduling across power-loss events.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F2520-I/ML — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F2520T-I/ML | PIC18F2520-E/ML | PIC18F2420-I/ML | PIC18F2525-I/ML | PIC18F2620-I/SP |
|---|---|---|---|---|---|---|
| Package | QFN-28 (ML) 6x6 mm | QFN-28 (ML) 6x6 mm - same | QFN-28 (ML) 6x6 mm - same | QFN-28 (ML) 6x6 mm - same | QFN-28 (ML) 6x6 mm - same | QFN-28 (ML) 6x6 mm - same |
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Flash Memory | 32 KB | 32 KB | 32 KB | 16 KB (-50%) | 32 KB | 64 KB (+100%) |
| SRAM | 1536 bytes | 1536 bytes | 1536 bytes | 768 bytes (-50%) | 2048 bytes (+33%) | 3968 bytes |
| EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 1024 bytes |
| Maximum Frequency | 40 MHz | 40 MHz | 40 MHz | 40 MHz | 40 MHz | 40 MHz |
| I/O Pins | 25 | 25 | 25 | 25 | 25 | 25 |
| Operating Temperature | -40C to +85C (Industrial) | -40C to +85C | -40C to +125C (Extended) | -40C to +85C | -40C to +85C | -40C to +85C |
| Supply Voltage | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V | 4.2 V to 5.5 V |
| Unit Price (qty 1, as of 2026-09-27) | $6.50 | $6.50 | $7.10 | $5.40 | $6.80 | $8.20 |
Key Differentiators
- Tape-and-reel variant for high-volume assembly (vs PIC18F2520T-I/ML)
- Extended temperature grade for harsh environments (vs PIC18F2520-E/ML)
- Cost-optimized with half the Flash for code-light applications (vs PIC18F2420-I/ML)
Design Notes
Solder the QFN-28 exposed pad (pin 29, internally tied to VSS) to a continuous copper ground pour of at least 25 mm^2 for thermal dissipation and electrical ground integrity. Without proper soldering, junction-to-ambient thermal resistance rises and the device may derate at high CPU utilization. Place 100 nF decoupling capacitors as close as possible to VDD (pin 24) and VSS (pins 5, 25, 28) - one cap per supply pin pair. Add a 10 uF bulk capacitor on the 5 V rail within 25 mm of the MCU. Keep crystal traces (OSC1/OSC2) short and surrounded by ground pour to minimize EMI.
Route ICSP lines PGC (pin 22, RB6) and PGD (pin 23, RB7) to a 4-pin header on every PCB for in-circuit firmware updates without removing the MCU. If using Low-Voltage Programming (LVP), reserve RB5/PGM (pin 21) for the LVP enable signal and ensure the application never drives it low during reset. Keep the ICSP header away from high-current traces to avoid noise coupling during programming. For production boards, add test-point pads (1 mm diameter) on PGC/PGD/MCLR/VSS to enable bed-of-nails programming.
Configuration bits must be set BEFORE code execution begins. A common pitfall is leaving the watchdog timer enabled without a corresponding CLRWDT() in the main loop, causing unintended resets. Also, the MCLR pin (pin 1, RA5) must NOT be left floating - tie it to VDD through a 10 kohm pull-up resistor to prevent spurious resets. The -I suffix designates industrial -40C to +85C; do not confuse with -E (extended -40C to +125C). For low-voltage designs below 4.2 V, the PIC18LF2520 variant is required - the standard PIC18F2520 will not operate reliably below 4.2 V per datasheet specifications.
Leverage the nanoWatt power-management modes to extend battery operation. The PIC18F2520 supports Sleep mode (CPU halted, peripherals running), Idle mode (CPU halted, peripherals clocked), and alternate oscillator modes (e.g., 31 kHz internal Timer1 oscillator for low-power wake-up). Estimated: at 5 V supply, Sleep mode typically draws less than 100 nA with watchdog disabled, ideal for battery-backed remote sensors. Wake-up sources include INTx interrupts, Timer1 overflow, ADC conversion complete, and USART activity. Always disable unused peripherals in initialization to minimize active-mode current draw.
Compliance Information
RoHS and REACH compliant per Microchip product page. Lead-free matte-tin finish. Not AEC-Q100 qualified - for automotive safety-relevant applications, consider AEC-Q100 qualified variants from PIC18FxxKxx family. Halogen-free per Microchip Material Declaration.