PIC18F04Q40T-I/SL - 8-Bit MCU, 16KB Flash, 64MHz, 14-SOIC | Microchip
MPN: PIC18F04Q40T-I/SL ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $0.7 | $0.70 |
| 10 | $0.66 | $6.60 |
| 100 | $0.59 | $59.00 |
| 500 | $0.54 | $270.00 |
| 1,000 | $0.49 | $490.00 |
| 2,600 | $0.45 | $1,170.00 |
PIC18F04Q40T-I/SL Overview
An 8-bit microcontroller (MCU) is a programmable logic device that executes instructions from on-chip Flash memory using an 8-bit data path, peripherals, and interrupt logic. MCUs sit within the embedded-computing hierarchy as small, low-cost compute engines used for sensor interfaces, real-time control loops, and human-machine interface tasks. The PIC18 family specifically targets deterministic, low-power control applications where interrupt latency and instruction-set simplicity matter more than raw computational throughput. The PIC18F04Q40 introduces the Q40 generation with an analog-centric architecture aimed at sensor and real-time control.
Key features include a 12-bit Analog-to-Digital Converter with Computation (ADCC) that automates Capacitive Voltage Divider (CVD) techniques for advanced capacitive touch sensing, averaging, filtering, oversampling, and threshold comparison. Two 8-bit Digital-to-Analog Converter (DAC) modules, a 16-bit Pulse-Width Modulation (PWM) with complementary outputs, and Core Independent Peripherals (CIPs) reduce CPU overhead. The 64MHz internal oscillator and 12 I/O pins provide ample headroom for typical sensor-interface designs in a 14-pin footprint.
Architecture-wise, the PIC18F04Q40 uses an enhanced Harvard architecture with separate program and data buses, a 16-bit instruction word, and a deterministic interrupt controller. The ADCC peripheral performs analog math in hardware, freeing the CPU for application logic. Device programmers can use MPLAB X IDE with XC8 compiler and the MPLAB Code Configurator (MCC) to initialize peripherals graphically, accelerating development.
Typical applications include capacitive touch user interfaces, LED lighting control with 16-bit PWM dimming, battery-powered sensor nodes with sleep current in the nanoamp range, motor control loops leveraging the complementary PWM outputs, and small appliance control panels. The 12-bit ADCC and 8-bit DACs allow direct interfaces to analog sensors and analog actuators without external converters.
Designers should route the ICSP dedicated signals (PGD/PGC) directly to an in-circuit programming header and ensure VDDCORE decoupling is sized per the datasheet for reliable operation across the 1.8V to 5.5V VDD range. Brown-out Reset configuration is critical at the lower end of the voltage range to prevent Flash corruption during supply dips.
This page synthesizes Microchip datasheet specifications, distributor pricing, same-family drop-in alternatives, and design notes not collated in the manufacturer's datasheet, helping engineers select, source, and design with this MCU efficiently.
Drop-in alternatives for PIC18F04Q40T-I/SL — 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 PIC18F04Q40T-I/SL (same form factor and footprint) — differing in DAC, PWM, Package, ADC, Operating Temperature.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F04Q40-I/SL
✅ Drop-In✓ In Stock
$0.74 / Unit
View Datasheet →PIC18F04Q40-I/ST
✅ Drop-In✓ In Stock
$0.82 / Unit
View Datasheet →PIC18F05Q40-I/SL
✅ Drop-In✓ In Stock
$0.78 / Unit
View Datasheet →PIC18F05Q40T-I/SL
✅ Drop-In ⚠️ Specs Unverified✓ In Stock
$0.74 / Unit
View Datasheet →ATTINY84A-SSU
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F04Q40T-I/SL Maximum Ratings & Electrical Characteristics
| Manufacturer | Microchip Technology |
| Series | PIC 18F |
| Core Processor | PIC |
| Core Size | 8-bit |
| Program Memory Size | 16 KB (16K x 8) Flash |
| RAM Size | 1 KB |
| EEPROM Size | 512 bytes |
| Maximum CPU Frequency | 64 MHz |
| Number of I/O Pins | 12 |
| Supply Voltage (VDD) | 1.8 V to 5.5 V |
| ADC | 12-bit ADC with Computation (ADCC) |
| DAC | 2 x 8-bit DAC |
| PWM | 16-bit PWM with complementary outputs |
| Operating Temperature | -40C to +85C (Industrial) |
| Package | 14-SOIC |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
| Lead-Free | Yes |
| Standard Package Quantity | 2600 (Tape and Reel) |
PIC18F04Q40T-I/SL Pin Configuration
| Pin 1 | RA5/SS/VCAP — GPIO/SPI Slave Select/VDDCORE stabilization cap |
| Pin 2 | RA4/T0CLK/SOSCO — GPIO/Timer0 clock input/Sec osc output |
| Pin 3 | RA3/MCLR/VPP — GPIO/Master Clear reset (active low)/Programming voltage |
| Pin 4 | VSS — Ground reference |
| Pin 5 | VOUT3/VDD_PWR — Internal LDO output / Core voltage supply |
| Pin 6 | VDD — Positive supply voltage (1.8V to 5.5V) |
| Pin 7 | RA2/T1G/DAC1 — GPIO/Timer1 gate/DAC1 analog output |
| Pin 8 | RA1/DAC2 — GPIO/DAC2 analog output |
| Pin 9 | RA0/C1IN0+/DAC3/ICSPCLK — GPIO/Comparator input/DAC3/ICSP clock |
| Pin 10 | ICSPDAT/RB7/AN13 — ICSP data/GPIO/Analog input 13 |
| Pin 11 | TX/CK/RB6/AN11 — EUSART TX/CK/GPIO/Analog input 11 |
| Pin 12 | RX/DT/RB5/AN10 — EUSART RX/DT/GPIO/Analog input 10 |
| Pin 13 | SDA1/SDI1/RB4/AN8 — I2C1 SDA/SPI1 SDI/GPIO/Analog input 8 |
| Pin 14 | RB3/PGD1/AN9 — GPIO/ICSP data line/Analog input 9 |
Typical Applications
PIC18F04Q40T-I/SL is suitable for 6 applications: Capacitive Touch User Interface, LED Lighting Control with 16-bit PWM Dimming, Battery-Powered Sensor Node, Small Motor Control (Brushless DC or Stepper), Appliance Control Panel, IoT Edge Sensor Node.
Capacitive Touch User Interface
The PIC18F04Q40T-I/SL is purpose-built for capacitive touch user interfaces thanks to its 12-bit ADCC peripheral with built-in Capacitive Voltage Divider hardware. The ADCC automates charge-transfer measurement cycles, hardware averaging, threshold comparison, and baseline compensation without CPU involvement, freeing the core to handle human-machine-interface logic and communications.
Recommended
LED Lighting Control with 16-bit PWM Dimming
The PIC18F04Q40T-I/SL drives high-resolution dimming applications via its 16-bit PWM peripheral with complementary outputs. At 64MHz the PWM resolution supports 65536 brightness levels per channel - more granular than human eye perception - enabling flicker-free white-mixing and stage-lighting color crossfades in sub-$1 BOM designs.
Recommended
Battery-Powered Sensor Node
Wide VDD operation (1.8V to 5.5V) and the PIC18F04Q40T-I/SL's sub-microamp sleep current make it ideal for battery-powered sensor nodes powered by single-cell Li-ion or 2x AA chemistries. Core Independent Peripherals run sensor sampling and threshold checking while the CPU sleeps, only waking on flagged events. This design pattern extends coin-cell life from months to years.
Recommended
Small Motor Control (Brushless DC or Stepper)
The 16-bit PWM with complementary outputs and programmable dead-band makes PIC18F04Q40T-I/SL suitable for small brushed DC, BLDC, or stepper motor control loops. The 64MHz CPU handles space-vector modulation and current-feedback sampling, while the 12-bit ADCC provides high-resolution current sensing.
Recommended
Appliance Control Panel
A 14-pin SOIC with 12 I/O, dual 8-bit DACs for analog setpoint outputs, and capacitive touch front panels makes PIC18F04Q40T-I/SL a strong fit for compact appliance control panels (rice cookers, espresso machines, washing-machine HMI panels). The wide 1.8V to 5.5V operating range simplifies integration to universal-input SMPS rails.
Recommended
IoT Edge Sensor Node
Coupling the PIC18F04Q40T-I/SL with a low-power radio module enables standalone IoT edge sensor nodes that sense analog signals, apply Core Independent Peripheral preprocessing, and forward alarms over UART/SPI to a Wi-Fi/BLE module. The MCU's low sleep current preserves battery life in duty-cycled wake-and-transmit regimes typical of LoRa or Zigbee deployments.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F04Q40T-I/SL — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F04Q40-I/SL | PIC18F04Q40-I/ST | PIC18F05Q40-I/SL | PIC18F05Q40T-I/SL | ATTINY84A-SSU |
|---|---|---|---|---|---|---|
| Package | 14-SOIC (3.9 mm body) | 14-SOIC (same) | 14-SOIC (same) | 14-SOIC (same) | 14-SOIC (same) | 14-SOIC (same) |
| Brand | Microchip Technology | Microchip Technology (same) | Microchip Technology (same) | Microchip Technology (same) | Microchip Technology (same) | Microchip Technology (same) |
| Core Architecture | PIC 8-bit | PIC 8-bit (same) | PIC 8-bit (same) | PIC 8-bit (same) | PIC 8-bit (same) | AVR 8-bit (different instruction set) |
| Program Memory | 16 KB Flash | 16 KB Flash | 16 KB Flash | 32 KB Flash (+100%) | 32 KB Flash (+100%) | 8 KB Flash (-50%) |
| Maximum CPU Frequency | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 20 MHz (-69%) |
| Operating Voltage | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V | 1.8 V to 5.5 V |
| ADC Resolution | 12-bit (ADCC) | 12-bit (ADCC) | 12-bit (ADCC) | 12-bit (ADCC) | 12-bit (ADCC) | 10-bit SAR |
| Operating Temperature | -40C to +85C (Industrial) | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C | -40C to +85C |
Key Differentiators
- Larger Flash headroom in same package (vs ATTINY84A-SSU)
- 12-bit ADCC vs 10-bit SAR (vs ATTINY84A-SSU)
- Same-family code reuse (vs PIC18F05Q40-I/SL)
Design Notes
Estimated: at 64MHz active CPU, the PIC18F04Q40T-I/SL consumption is typically 4 mA to 6 mA from a 3.3V VDD. In sleep mode with peripherals off, expect sub-1 uA from the Microchip datasheet. Place a 100 nF decoupling capacitor within 5 mm of VDD (pin 6) and a 10 uF bulk capacitor nearby. Add a ferrite bead if the same rail feeds a switching regulator to keep digital noise out of analog references.
Route the ICSP dedicated signals PGD/PGC directly to a 6-pin programming header to retain debug access in production boards. According to the Microchip datasheet, PGD and PGC lines should be kept short (< 5 cm) and away from switching nodes to avoid programming issues from radiated noise. Place ground copper pour under the IC and stitch the SOIC pads to it for thermal dissipation.
A common pitfall is failing to configure the Brown-Out Reset voltage to match the chosen VDD range. Below 1.8V, unprogrammed BOR can corrupt Flash during supply collapse. Verify the factory default BOR setting in CONFIG1 register matches your operating voltage and adjust via code or ICSP before locking the part. Also, the VOUT3/VDD_CORE pin (pin 5) needs its own 0.1 uF bypass - omitting this causes intermittent reset behavior under temperature swings.
Compliance Information
RoHS compliance per FindMyChip listing. Not AEC-Q100 qualified - choose automotive-grade PIC18Fxx-Q40 -E variants for automotive applications.