PIC18F04Q40-I/ST - 16KB Flash, 12b ADC2 8-bit MCU | Microchip
MPN: PIC18F04Q40-I/ST ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $1.36 | $1.36 |
| 10 | $1.22 | $12.20 |
| 100 | $1.08 | $108.00 |
| 500 | $0.94 | $470.00 |
| 1,000 | $0.82 | $820.00 |
PIC18F04Q40-I/ST Overview
A microcontroller (MCU) is a single-chip computer containing a CPU, memory, and peripherals designed to execute embedded control tasks. PIC18 microcontrollers sit in the 8-bit RISC family hierarchy (PIC10/12/16/18), under the broader microcontroller taxonomy (microcontroller -> embedded controller -> semiconductor IC). The Q40 sub-family emphasizes analog-rich real-time control with hardware-accelerated touch, mixed-signal conditioning, and Core Independent Peripherals (CIPs) that offload tasks from the CPU.
Key features include 16 KB self-programmable Flash with block code access (Ind code access, the 16 KB Flash and 1 KB SRAM are accessible via a single linear address space; no paging is required for typical C applications, simplifying code development. The 12-bit ADCC delivers up to 130 ksps conversion rate with automated averaging, oversampling, and threshold comparison, reducing firmware overhead for sensor processing. A 16-bit PWM with multiple complementary outputs supports motor drive and power-conversion topologies. The 14-pin TSSOP package offers small board footprint with 12 available I/O pins, while the industrial -40 °C to +85 °C operating range suits harsh environments.
Technical depth: the ADCC integrates a 12-bit differential SAR converter with computation features for hardware averaging and threshold detection, allowing touch and sensor signal chains to run autonomously. Configurable Logic Cells (CLC) and the 16-bit PWM complement the timer/Capture/Compare/PWM modules, providing flexible waveform generation. The device supports MPLAB X IDE programming with the XC8 compiler.
Typical applications include capacitive touch user interfaces, low-cost sensor signal conditioning, small motor or fan control, LED lighting control with dimming, and battery-powered IoT endpoints where low power and integrated peripherals reduce BOM.
When designing, allocate adequate decoupling (100 nF plus bulk) near VDD pins and follow Microchip's recommended PCB layout for mixed-signal grounding to preserve ADC accuracy. The TSSOP's exposed thermal behavior allows continuous 64 MHz operation without heatsinking at typical industrial loads.
This page synthesizes distributor pricing, drop-in same-package alternatives, and practical design notes not consolidated on any single distributor page, providing a faster procurement and engineering reference for the PIC18F04Q40 family.
Drop-in alternatives for PIC18F04Q40-I/ST — 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 PIC18F04Q40-I/ST (same form factor and footprint) — differing in ADC, PWM, Package, Operating Temperature, Program Memory (Flash).
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC18F04Q40T-I/ST
✅ Drop-In✓ In Stock
$0.75 / Unit
View Datasheet →PIC18F04Q40-E/ST
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F05Q40-I/ST
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F04Q40-I/SL
✅ Drop-In✓ In Stock
$0.74 / Unit
View Datasheet →PIC18F14Q40-I/ST
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F15Q40-I/ST
✅ Drop-In📋 Reference alternative (not in catalog)
PIC18F04Q40-I/ST Maximum Ratings & Electrical Characteristics
| Device Family | PIC18-Q40 |
| Core Architecture | PIC18 8-bit RISC |
| Program Memory (Flash) | 16 KB |
| SRAM | 1 KB |
| EEPROM | 512 bytes |
| Maximum CPU Frequency | 64 MHz |
| Supply Voltage (VDD) | 1.8 V to 5.5 V |
| ADC | 12-bit ADC with Computation (ADCC) |
| DAC | Two 8-bit DAC modules |
| PWM | 16-bit PWM (complementary outputs) |
| I/O Pins | 12 (on 14-pin package) |
| Package | 14-pin TSSOP (ST) |
| Operating Temperature | -40 °C to +85 °C (Industrial) |
| Mounting Type | Surface Mount |
| RoHS Status | Compliant |
PIC18F04Q40-I/ST Pin Configuration
| Pin 1 | VDD — Positive supply voltage |
| Pin 2 | RA5 — I/O pin |
| Pin 3 | RA4 — I/O pin |
| Pin 4 | RA3 — I/O pin |
| Pin 5 | RC5 — I/O pin |
| Pin 6 | RC4 — I/O pin |
| Pin 7 | RC3 — I/O pin |
| Pin 8 | RC2 — I/O pin |
| Pin 9 | RC1 — I/O pin |
| Pin 10 | RC0 — I/O pin |
| Pin 11 | RA2 — I/O pin |
| Pin 12 | RA1 — I/O pin / DAC reference |
| Pin 13 | RA0 — I/O pin |
| Pin 14 | VSS — Ground reference |
Typical Applications
PIC18F04Q40-I/ST is suitable for 6 applications: Capacitive Touch User Interface, Sensor Signal Conditioning, Small Motor / Fan Speed Control, LED Lighting with Dimming Control, Battery-Powered IoT Sensor Node, Automotive Body Electronics (Non-Safety).
Capacitive Touch User Interface
The PIC18F04Q40-I/ST is well-suited for capacitive touch keypads and slider controls in consumer and appliance products. The integrated 12-bit ADCC with Capacitive Voltage Divider (CVD) mode automates touch acquisition, hardware averaging, and threshold comparison, allowing up to 12 touch channels on the 14-pin TSSOP's 12 I/O pins. Hardware CVD offloads firmware, enabling faster scan rates with lower CPU utilization. Compared to external touch ICs, the integrated ADCC reduces BOM while maintaining mTouch compliance. Pair with a PIC18F14Q40 for designs needing more program memory.
Recommended
Sensor Signal Conditioning
The PIC18F04Q40-I/ST excels in low-cost analog sensor interfaces for temperature, pressure, and humidity sensing. The 12-bit ADCC with 130 ksps throughput and hardware oversampling delivers accurate conversions directly from bridge sensors and thermistors, while the two 8-bit DACs provide excitation or bias voltages. Internal op-amp and reference options further simplify analog front-ends. Engineers can implement linearization and compensation in firmware using the 16 KB Flash, while the 1 KB SRAM handles sample buffering. The 14-pin TSSOP footprint fits compact PCB layouts.
Recommended
Small Motor / Fan Speed Control
The PIC18F04Q40-I/ST provides a complete solution for small DC motor, brushless fan, or stepper driver control. The 16-bit PWM with complementary outputs generates precise switching waveforms with programmable dead-band, while the ADCC monitors back-EMF or current sensing for closed-loop control. The 64 MHz core executes speed PI loops without timing overhead, and the two 8-bit DACs can set reference currents or voltage thresholds. With 12 I/O pins on the 14-pin TSSOP, the device supports direction, enable, tachometer, and fault inputs in compact form factors.
Recommended
LED Lighting with Dimming Control
The PIC18F04Q40-I/ST drives multi-channel LED strings and panels with smooth dimming via the 16-bit PWM's high resolution. Each PWM channel delivers 16-bit duty control, allowing logarithmic dimming curves and color mixing in RGBW luminaires. The ADCC reads ambient light sensors and potentiometers for adaptive brightness, while the 8-bit DACs can set LED current references in external driver stages. Operating from 1.8 V to 5.5 V, the part supports both 3.3 V and 5 V LED driver architectures from a single rail, simplifying power design.
Recommended
Battery-Powered IoT Sensor Node
The PIC18F04Q40-I/ST serves as the central controller in battery-powered wireless sensor nodes for IoT deployments. Its wide 1.8 V to 5.5 V supply range accepts direct battery connection from single-cell Li-Ion or 2xAA alkaline stacks. Core Independent Peripherals (CIPs) like CLC and the ADCC's autonomous threshold comparison allow the CPU to sleep, waking only on sensor threshold events, extending battery life. The 16 KB Flash accommodates BLE/Zigbee stack profiles when paired with a discrete radio module, while the TSSOP-14 footprint maintains a small BOM area for wearable form factors.
Recommended
Automotive Body Electronics (Non-Safety)
The PIC18F04Q40-E/ST (extended temperature variant) supports non-safety automotive body applications such as seat controllers, mirror adjusters, or interior lighting. With operation from -40 °C to +125 °C and 12-bit ADCC for sensor reads, the part handles LIN slave communication and PWM-driven actuator control. The 16-bit PWM enables smooth motor actuation for window lift or seat positioning. The 14-pin TSSOP package integrates easily into space-constrained automotive modules, reducing PCB size versus larger QFP MCU packages. AEC-Q100 qualification is not held; safety-critical systems require dedicated automotive MCUs.
Recommended
Recommended Products Summary
Engineering reference data for PIC18F04Q40-I/ST — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC18F04Q40T-I/ST | PIC18F04Q40-E/ST | PIC18F05Q40-I/ST | PIC18F14Q40-I/ST |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 14-pin TSSOP (ST) | 14-pin TSSOP (ST) | 14-pin TSSOP (ST) | 14-pin TSSOP (ST) | 14-pin TSSOP (ST) |
| Program Memory | 16 KB Flash | 16 KB Flash | 16 KB Flash | 32 KB Flash | 16 KB Flash |
| SRAM | 1 KB | 1 KB | 1 KB | 2 KB | 1 KB |
| Operating Temperature | -40C to +85C | -40C to +85C | -40C to +125C | -40C to +85C | -40C to +85C |
| Maximum CPU Frequency | 64 MHz | 64 MHz | 64 MHz | 64 MHz | 64 MHz |
| ADC Type | 12-bit ADCC | 12-bit ADCC | 12-bit ADCC | 12-bit ADCC | 12-bit ADCC |
| DAC Modules | Two 8-bit | Two 8-bit | Two 8-bit | Two 8-bit | Two 8-bit |
| PWM Resolution | 16-bit | 16-bit | 16-bit | 16-bit | 16-bit |
Key Differentiators
- Integrated 12-bit ADCC with CVD for capacitive touch (vs PIC18F04Q40T-I/ST)
- Tape and reel packaging for high-volume assembly (vs PIC18F04Q40T-I/ST)
- Larger memory within same TSSOP-14 footprint (vs PIC18F05Q40-I/ST)
Design Notes
Place a 100 nF ceramic decoupling capacitor as close as possible to each VDD pin (pin 1) and a 10 uF bulk capacitor near the VSS pin (pin 14). The PIC18F04Q40-I/ST requires an external 1 uF to 10 uF capacitor on the VCAP pin for the internal core voltage regulator. Brown-out Reset (BOR) is enabled by default and must be configured in configuration words for reliable operation below 1.8 V.
Route analog signals (ADC inputs, DAC outputs, VREF+) away from high-current digital traces and PWM outputs to minimize coupling. Use a ground plane with separate analog and digital sections joined at a single point near the VSS pin. The 14-pin TSSOP's small footprint allows dense layouts; reserve at least 0.5 mm clearance between analog and digital traces for noise isolation.
Do not exceed 5.5 V on VDD or apply voltage to any pin before VDD is stable; this can latch-up the part. Ensure the ICSPCLK/ICSPDAT pins (shared with RA1/RA0) are not driven externally during programming. The 12-bit ADCC requires acquisition time configured in firmware based on source impedance - typical 1-2 us for high-impedance sensors above 10 kOhm.
The PIC18F04Q40-I/ST is rated for -40C to +85C industrial operation at full 64 MHz. Estimated: at typical 5 V supply with 20 mA active current, power dissipation is approximately 100 mW, well within TSSOP-14 thermal limits. For extended temperature variants (PIC18F04Q40-E/ST to +125C), verify ambient airflow matches junction temperature derating.
Compliance Information
RoHS compliant per Microchip product page. Not AEC-Q100 qualified; do not use in safety-critical automotive applications. Industrial temperature range -40C to +85C standard.