PIC18F2520-I/SO - 8-bit MCU, 32KB Flash, 40MHz, 28-SOIC | Microchip
MPN: PIC18F2520-I/SO ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $7.04 | $7.04 |
| 10 | $6.33 | $63.30 |
| 100 | $5.62 | $562.00 |
| 500 | $5.07 | $2,535.00 |
| 1,000 | $4.65 | $4,650.00 |
PIC18F2520-I/SO Overview
A microcontroller (MCU) is a single-chip computer that integrates a CPU, non-volatile program memory, working RAM, and a configurable set of digital and analog peripherals around a shared internal bus. The PIC18F family uses an enhanced RISC Harvard architecture with a C-compiler-optimized instruction set, sitting within the broader Microchip MCU taxonomy of PIC10/12/16/18/24/32 8-/16-/32-bit families, which themselves belong to the wider category of microcontrollers -> microprocessors -> semiconductors. By combining analog integration with the ADC, PWM, USART, MSSP (SPI/I2C) and nanoWatt sleep modes, PIC18F MCUs often eliminate external glue logic and analog front-end components in small-form-factor products.
Key features include 40 MHz (10 MIPS) CPU speed from a 4.2 V to 5.5 V supply, 25 digital I/O pins, an internal RC oscillator selectable from 31 kHz to 8 MHz, a Fail-Safe Clock Monitor that allows safe shutdown on clock failure, a separate RC-oscillator-backed Watchdog Timer, and CTMU / nanoWatt technology for ultra-low standby current. On-chip peripherals include an Enhanced CCP, two comparators, a 10-bit ADC with up to 10 channels, MSSP (SPI/I2C), and an Enhanced USART.
Typical applications include industrial control, sensor conditioning, automotive body electronics, low-cost data loggers, and USB/HID-less human-interface products. The wide 5 V supply range and rich analog integration make the device a common choice for 5V-tolerant legacy systems that need more performance than a PIC16F but want to stay inside the 8-bit toolchain ecosystem (MPLAB X IDE, XC8 compiler, MPLAB PICkit 5). When designing with this part, plan oscillator stability for low-power modes (use the internal 31 kHz LP oscillator for sleep), keep Vdd decoupling tight to the SOIC pins, and route the ADC reference pins with a low-impedance ground return to preserve ADC accuracy.
Drop-in alternatives for PIC18F2520-I/SO — 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/SO (same form factor and footprint) — differing in Package, Core Architecture, Operating Temperature, Program Memory Size, RoHS Status.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F2420-I/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F25K22-I/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F25K20-I/SO
✅ Drop-In ⚠️ Specs Unverified📋 Reference alternative (not in catalog)
PIC18F2520-E/SO
✅ Drop-In✓ In Stock
$4.6 / Unit
View Datasheet →PIC18LF2520-I/SO
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F2520-I/SO Maximum Ratings & Electrical Characteristics
| Family | PIC18F |
| Core | 8-bit PIC RISC |
| Program Memory Size | 32 KB (16K x 16) Flash |
| RAM Size | 1.5 KB (1536 bytes) |
| EEPROM Size | 256 bytes |
| Maximum CPU Speed | 40 MHz (10 MIPS) |
| Supply Voltage (Vcc/Vdd) | 4.2 V to 5.5 V |
| I/O Pins | 25 |
| ADC | 10-bit, 10 channels |
| Oscillator | Internal 31 kHz to 8 MHz + external crystal |
| Watchdog Timer | Yes, with dedicated RC oscillator |
| Fail-Safe Clock Monitor | Yes |
| Communication Peripherals | 1x MSSP (SPI/I2C), 1x Enhanced USART |
| Operating Temperature | -40 C to +85 C (Industrial) |
| Package | 28-pin SOIC (SO) wide-body, 7.50 mm |
| Mounting Type | Surface Mount |
| Lead-Free / RoHS | Lead-free, RoHS compliant |
| MSL | 1 (unlimited floor life) |
| Architecture | Harvard, C-compiler optimized RISC |
| Hardware Multiply | 8 x 8 single-cycle |
PIC18F2520-I/SO Pin Configuration
| Pin 1 | MCLR/VPP/RE3 — Master Clear (reset) input or programming voltage; also digital input RE3 |
| Pin 2 | RA0/AN0 — PORTA bit 0; analog input 0 |
| Pin 3 | RA1/AN1 — PORTA bit 1; analog input 1 |
| Pin 4 | RA2/AN2/Vref- — PORTA bit 2; analog input 2; ADC negative reference |
| Pin 5 | RA3/AN3/Vref+ — PORTA bit 3; analog input 3; ADC positive reference |
| Pin 6 | RA4/T0CKI/C1OUT — PORTA bit 4; Timer0 clock input; Comparator 1 output |
| Pin 7 | RA5/AN4/SS/HLVDIN/C2OUT — PORTA bit 5; analog input 4; SPI slave select; HLVD input; Comparator 2 output |
| Pin 8 | Vss — Ground reference |
| Pin 9 | OSC1/CLKI/RA7 — Crystal/clock input; PORTA bit 7 |
| Pin 10 | OSC2/CLKO/RA6 — Crystal/clock output; PORTA bit 6 |
| Pin 11 | RC0/T1OSO/T13CKI — PORTC bit 0; Timer1 oscillator output; Timer1/Timer3 clock input |
| Pin 12 | RC1/T1OSI/CCP2 — PORTC bit 1; Timer1 oscillator input; Capture/Compare/PWM 2 |
| Pin 13 | RC2/CCP1 — PORTC bit 2; Capture/Compare/PWM 1 |
| Pin 14 | RC3/SCK/SCL — PORTC bit 3; SPI clock; I2C clock |
| Pin 15 | RC4/SDI/SDA — PORTC bit 4; SPI data in; I2C data |
| Pin 16 | RC5/SDO — PORTC bit 5; SPI data out |
| Pin 17 | RC6/TX/CK — PORTC bit 6; USART async transmit; USART sync clock |
| Pin 18 | RC7/RX/DT — PORTC bit 7; USART async receive; USART sync data |
| Pin 19 | Vss — Ground reference |
| Pin 20 | VDD — Positive supply (4.2 V to 5.5 V) |
| Pin 21 | RB0/INT0/FLT0 — PORTB bit 0; external interrupt 0; ECCP fault input |
| Pin 22 | RB1/INT1 — PORTB bit 1; external interrupt 1 |
| Pin 23 | RB2/INT2 — PORTB bit 2; external interrupt 2 |
| Pin 24 | RB3/CCP2 — PORTB bit 3; Capture/Compare/PWM 2 |
| Pin 25 | RB4 — PORTB bit 4 (interrupt-on-change) |
| Pin 26 | RB5/PGM — PORTB bit 5; LVP programming (interrupt-on-change) |
| Pin 27 | RB6/PGC — PORTB bit 6; ICD clock (interrupt-on-change) |
| Pin 28 | RB7/PGD — PORTB bit 7; ICD data (interrupt-on-change) |
Typical Applications
PIC18F2520-I/SO is suitable for 6 applications: Industrial Process Control and Sensor Conditioning, Automotive Body Electronics and HVAC Modules, Low-Cost Data Loggers and Instrumentation, Consumer Appliance and Home Automation HMI, USB/HID-less Peripheral Controllers and HID Replacement, Educational and Hobby Projects (Arduino Replacement Class).
Industrial Process Control and Sensor Conditioning
The PIC18F2520-I/SO fits industrial process-control boards because its 10-bit, 10-channel ADC and 1.5 KB RAM let a single MCU scan up to ten 4-20 mA sensor inputs via signal-conditioning front-ends, while the 32 KB Flash holds Modbus RTU state machines and PID control loops. With a 5 V Vcc, the part interfaces directly to legacy 5V industrial sensor chains and opto-isolated digital I/O, removing the need for level shifters. The internal 31 kHz to 8 MHz oscillator with Fail-Safe Clock Monitor keeps the process safe if the external crystal is disturbed by vibration, and the hardware USART handles RS-485 comms at up to 5 Mbps for long-bus industrial networks. Recommended companion parts: MAX485 (RS-485 transceiver), XTR105 (4-20 mA loop driver), and TLP181 (opto-isolated digital input).
Recommended
Automotive Body Electronics and HVAC Modules
The PIC18F2520-I/SO suits automotive body modules such as HVAC blend-door controllers, seat-position controllers, and lighting drivers, where 5V-tolerant I/O is required and the 25 available pins handle multiple brushed-motor H-bridges and thermistor inputs. The PIC18F2520-E/SO variant extends the operating temperature to +125 C for under-hood or cabin-roof environments, while the same die keeps firmware reusable. The hardware MSSP driving SPI makes it straightforward to interface external CAN transceivers via the MCP2515, and the 10-bit ADC reads NTC thermistor networks with adequate resolution for climate-control feedback. Recommended companion parts: MCP2515 (standalone CAN), TLE7259 (LIN transceiver), and PIC18F2520-E/SO (extended-temp variant).
Recommended
Low-Cost Data Loggers and Instrumentation
The PIC18F2520-I/SO targets stand-alone data loggers because its 1.5 KB RAM and 32 KB Flash hold small RTOS-less scheduling loops, with the 256-byte EEPROM used for non-volatile configuration storage of calibration coefficients and time stamps. The 10-bit ADC with up to 10 channels handles thermocouple or strain-gauge inputs after a small front-end, while the hardware 8x8 single-cycle multiply accelerates simple FIR filtering without a DSP library. The MSSP port can interface SD cards via SPI for removable storage, and the Enhanced USART streams data over RS-232 to a host PC. With nanoWatt sleep currents dropping below 1 microampere, battery-powered loggers can sustain months of unattended acquisition. Recommended companion parts: 24LC256 (I2C EEPROM), MAX232 (RS-232 driver), and LM35 (analog temperature sensor).
Recommended
Consumer Appliance and Home Automation HMI
The PIC18F2520-I/SO drives appliance front-panel HMIs such as washing-machine displays, microwave keypads, and HVAC thermostat controls because the Enhanced CCP delivers PWM for backlight dimming while the 25 I/O scan matrix keypads up to 7x7 without external scan logic. Its 5 V supply eliminates level shifters to older LCD modules and seven-segment LED drivers, and the CTMU enables capacitive touch buttons without dedicated touch ICs. The internal oscillator plus Watchdog Timer with dedicated RC keeps the panel responsive and recoverable from brown-outs, which matters for unattended home appliances. Recommended companion parts: PIC18F25K22-I/SO (drop-in upgrade), MCP23S08 (I/O expander), and TM1637 (LED driver display controller).
Recommended
USB/HID-less Peripheral Controllers and HID Replacement
The PIC18F2520-I/SO is used in low-cost peripherals that talk to a host via serial, PS/2, or proprietary RF rather than USB, including legacy HID replacement devices, custom I/O panels, and EPOS terminals. The Enhanced USART in conjunction with the MSSP supports RS-232, RS-485, and SPI peripherals concurrently, while 32 KB of Flash comfortably hosts proprietary command parsers and small protocol stacks. The Fail-Safe Clock Monitor protects against system hangups if the external crystal is disturbed by ESD or mechanical shock, which is essential in exposed peripheral ports. Recommended companion parts: FT232RL (USB-to-UART bridge), MAX3100 (SPI UART), and PIC18F2520-E/SO (extended temperature variant).
Recommended
Educational and Hobby Projects (Arduino Replacement Class)
The PIC18F2520-I/SO is a classic choice for teaching embedded systems, used in university microcontroller labs, PICkit demo boards, and DIY maker projects where students learn assembly and C against a 5V PIC18 core. Its 32 KB Flash and 1.5 KB RAM support meaningful C projects without forcing jumps to 16-bit PIC24 devices, and the SOIC-28 wide-body package is breadboard-friendly with SOIC-to-DIP adapter boards. The MPLAB X IDE + XC8 + PICkit 5 toolchain is widely available and inexpensive, making the part a practical alternative to Arduino UNO for learners who want to understand register-level MCU programming. Recommended companion parts: PICkit 5 (programmer), MCP2200 (USB-UART bridge), and PIC18F2420-I/SO (smaller flash alternative for entry projects).
Recommended
Recommended Products Summary
Engineering reference data for PIC18F2520-I/SO — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F2420-I/SO | PIC18F25K22-I/SO | PIC18F25K20-I/SO | PIC18F2520-E/SO | PIC18LF2520-I/SO |
|---|---|---|---|---|---|---|
| Package | 28-pin SOIC (SO) wide-body | 28-pin SOIC (SO) wide-body - same | 28-pin SOIC (SO) wide-body - same | 28-pin SOIC (SO) wide-body - same | 28-pin SOIC (SO) wide-body - same | 28-pin SOIC (SO) wide-body - same |
| Brand | Microchip Technology | Microchip Technology - same | Microchip Technology - same | Microchip Technology - same | Microchip Technology - same | Microchip Technology - same |
| Flash Memory | 32 KB (16K x 16) | 16 KB (-50%) | 32 KB (same) | 32 KB (same) | 32 KB (same) | 32 KB (same) |
| RAM | 1.5 KB | 1.5 KB (same) | 1.5 KB (same) | 1.5 KB (same) | 1.5 KB (same) | 1.5 KB (same) |
| EEPROM | 256 B | 256 B (same) | 256 B (same) | 256 B (same) | 256 B (same) | 256 B (same) |
| Maximum CPU Speed | 40 MHz (10 MIPS) | 40 MHz (same) | 64 MHz (+60%) | 64 MHz (+60%) | 40 MHz (same) | 40 MHz (same) |
| Supply Voltage | 4.2 V to 5.5 V | 4.2 V to 5.5 V (same) | 2.3 V to 5.5 V (wider) | 1.8 V to 3.6 V (K20 low voltage) | 4.2 V to 5.5 V (same) | 2.0 V to 5.5 V (wider) |
| Operating Temperature | -40 C to +85 C (Industrial) | -40 C to +85 C (same) | -40 C to +85 C (same) | -40 C to +85 C (same) | -40 C to +125 C (extended) | -40 C to +85 C (same) |
| I/O Pins | 25 | 25 (same) | 25 (same) | 25 (same) | 25 (same) | 25 (same) |
| ADC | 10-bit, 10 channels | 10-bit, 10 channels (same) | 10-bit, 19 channels (more) | 10-bit, 11 channels | 10-bit, 10 channels (same) | 10-bit, 10 channels (same) |
| nanoWatt Sleep Current | nanoWatt (1st gen, ~1 uA sleep) | nanoWatt (1st gen, ~1 uA sleep) | nanoWatt XLP (~50 nA sleep, -95%) | nanoWatt XLP (~50 nA sleep, -95%) | nanoWatt (1st gen, ~1 uA sleep) | nanoWatt (1st gen, ~1 uA sleep) |
Key Differentiators
- 32 KB Flash in SOIC-28 with 25 I/O at industrial -40 C to +85 C (vs PIC18F2420-I/SO)
- 5V-only operation with mature nanoWatt power management (vs PIC18F25K22-I/SO)
- Internal oscillator from 31 kHz to 8 MHz with Fail-Safe Clock Monitor (vs PIC18LF2520-I/SO)
Design Notes
Estimated: at 40 MHz CPU and 5.0 V Vdd with all peripherals active, the PIC18F2520-I/SO draws about 16 mA active current and below 1 microampere in sleep mode (per the datasheet DC characteristics table). For battery-powered designs, switch the OSCCON register to the 31 kHz LF mode before executing the SLEEP instruction, and use the Watchdog Timer with its dedicated 31 kHz RC oscillator to wake the part periodically. Add a 100 nF ceramic decoupling capacitor as close as possible to each pair of VDD/VSS pins (pins 8/19 and pin 20 are Vss/Vdd on the 28-SOIC). A bulk 10 uF tantalum or ceramic on the 5V rail near the MCU improves transient response under ADC conversions.
Keep the analog and digital grounds on a single PCB and join them at one point under the MCU (star-ground topology at pin 8 or pin 19). Place AVdd/AVss and Vdd/Vss decoupling capacitors immediately next to their respective pins with wide, short traces to avoid ADC reference noise. The OSC1/OSC2 traces to the external crystal should be as short as possible and routed away from any high-current switching traces to prevent oscillator corruption. For the SOIC-28 wide-body footprint, allow at least 8 mm of clearance between the MCU and switching power inductors to keep radiated EMI from coupling into the analog inputs.
Common pitfalls when migrating to PIC18F2520-I/SO: (1) forgetting to disable the Watchdog Timer in configuration bits when debugging causes unexpected resets; (2) using the LVP (Low-Voltage Programming) mode without tying RB5/PGM high through a resistor, which can cause unintended entry into programming mode; (3) leaving the JTAGEN/ICPORTEN configuration bits active when the port pins are needed as GPIO - this disables RB6/RB7 as I/O; (4) failing to enable the BOR (Brown-Out Reset) in configuration bits leads to corrupted EEPROM during slow Vdd ramp. Always set CONFIG1H and CONFIG2L correctly for your oscillator choice before programming.
When using the 10-bit ADC at full 10 ksps throughput, route the analog inputs through small RC anti-alias filters (1 kohm + 100 pF gives ~16 kHz cutoff) to prevent out-of-band noise folding into the conversion bandwidth. Tie unused analog pins (AN5-AN9 not exposed on the SOIC-28 variant) to digital ground through a 10 kohm resistor to prevent shoot-through current and ADC channel crosstalk. For SPI clock rates above 4 MHz on the MSSP module, keep the SCK/SDO/SDI trace lengths matched to within 10 mm to avoid timing violations with daisy-chained peripherals.
Compliance Information
RoHS-compliant, lead-free SOIC package per Microchip product page (as of 2026-09-27). AEC-Q100 not formally qualified for automotive (PIC18F2520-I/SO is industrial-grade); automotive designs should reference the PIC18F2520-E/SO extended-temperature variant. Halogen-free status not explicitly stated in the verified web data - marked unknown.