Microchip Technology

PIC18F04Q40T-I/SL - 8-Bit MCU, 16KB Flash, 64MHz, 14-SOIC | Microchip

MPN: PIC18F04Q40T-I/SL ✓ Active
In Stock Ships in 1-3 business days
1.8 V to 5.5 V Vdss 14-SOIC Package 64 MHz Speed 16 KB (16K x 8) Flash Memory
From $0.45 USD / Unit
MOQ: 1 |
Price updated: 2026-09-26
Volume Pricing
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
ℹ️ All prices are in USD

PIC18F04Q40T-I/SL Overview

The Microchip Technology PIC18F04Q40T-I/SL is an 8-bit PIC18 microcontroller with 16KB Flash, 1KB RAM, 512 bytes EEPROM, 12-bit ADC with Computation (ADCC), two 8-bit DACs, and 16-bit PWM, housed in a 14-pin SOIC package. It operates up to 64MHz from 1.8V to 5.5V across the -40C to +85C industrial range.

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.

Microchip Technology
DAC: Two 8-bit DAC modules
PWM: 16-bit PWM (complementary outputs)
Package: 14-pin TSSOP (ST)
Microchip Technology
DAC: 8-bit DAC, two instances
PWM: 16-bit PWM, 4 channels
Package: 14-SOIC (SL) 150-mil
Microchip Technology
DAC: 2 x 8-bit
PWM: 16-bit with complementary outputs
Package: 14-SOIC (3.9 mm body width)

Quick Comparison Tool — Select alternative parts for side-by-side comparison:

PIC18F04Q40-I/SL

✅ Drop-In
Microchip Technology
📦 14-SOIC
PIC18 8-bit RISC Harvard · PIC® 18F (PIC18-Q40 sub-family) · 64 MHz · 16 KB (16K x 8) · 1 KB · 512 bytes · 12-bit ADC with Computation (ADCC) · 2 x 8-bit DAC

✓ In Stock

$0.74 / Unit

View Datasheet →

PIC18F04Q40-I/ST

✅ Drop-In
Microchip Technology
📦 14-SOIC
PIC18-Q40 · PIC18 8-bit RISC · 16 KB · 1 KB · 512 bytes · 64 MHz · 1.8 V to 5.5 V · 12-bit ADC with Computation (ADCC)

✓ In Stock

$0.82 / Unit

View Datasheet →

PIC18F05Q40-I/SL

✅ Drop-In
Microchip Technology
📦 14-SOIC
PIC18 8-bit RISC (modified Harvard) · 32 KB · 2 KB · 512 bytes · 64 MHz (16 MIPS) · 1.8 V to 5.5 V · 12-bit ADC2 with Computation, up to 20 channels · 8-bit DAC, two instances

✓ In Stock

$0.78 / Unit

View Datasheet →

PIC18F05Q40T-I/SL

✅ Drop-In ⚠️ Specs Unverified
Microchip Technology
📦 14-SOIC
PIC18 8-bit RISC · 32 KB (32K x 8) · 2 KB · 512 bytes · 64 MHz · 1.8 V to 5.5 V · 12-bit with Computation (ADC2) · 2 x 8-bit

✓ In Stock

$0.74 / Unit

View Datasheet →

ATTINY84A-SSU

✅ Drop-In
📦 14-SOIC
AVR core (not PIC), 8KB Flash vs 16KB (-50%), pin-to-pin compatible in 14-SOIC

📋 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

SOIC-14 (3.9mm) Package Pinout Diagram SOIC-14 14-pin small outline IC, 3.9x8.7mm, P1.27mm, JEDEC MS-012. Pin 1 by chamfer. 1 14 2 13 3 12 4 11 5 10 6 9 7 8 SOIC-14 (3.9mm)
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.

💡

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.

📱

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.

🏭

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.

🏭

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.

🌐

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 Products Summary

PIC18F14Q40-I/P Microchip Technology Used in: Capacitive Touch User Interface ATTINY84A-SSU Cross-brand AVR alternative (different firmware base) Used in: Capacitive Touch User Interface PIC18F05Q40T-I/SL Microchip Technology Used in: LED Lighting Control with 16-bit PWM Dimming MIC4604 External half-bridge MOSFET driver for high-current LED strings Used in: LED Lighting Control with 16-bit PWM Dimming, Small Motor Control (Brushless DC or Stepper) MCP1700-3302E Low-Iq LDO regulator for sensor node supply rails Used in: Battery-Powered Sensor Node MCP9808 I2C temperature sensor for monitoring applications Used in: Battery-Powered Sensor Node MCP8024 Three-phase motor driver pre-driver companion IC Used in: Small Motor Control (Brushless DC or Stepper) MCP2200 USB-to-UART bridge for factory programming and diagnostics Used in: Appliance Control Panel AT24C256 I2C EEPROM for storing user settings and calibration data Used in: Appliance Control Panel RN2483 Microchip LoRa transceiver module for long-range uplinks Used in: IoT Edge Sensor Node ATECC608B Crypto authentication IC for secure edge devices Used in: IoT Edge Sensor Node
What is the program memory size of PIC18F04Q40T-I/SL?
The PIC18F04Q40T-I/SL has 16KB (16384 bytes) of on-chip Flash program memory organized as 16K x 8. According to the Microchip datasheet, the Flash supports self-programmability and is split into a boot region and an application region for safe firmware updates. Together with 1KB SRAM and 512 bytes EEPROM, the device targets compact sensor and control firmware.
What is the maximum operating frequency of PIC18F04Q40T-I/SL?
The PIC18F04Q40T-I/SL supports a maximum CPU clock of 64MHz, yielding an instruction cycle of 62.5ns (FOSC/4 architecture). The high-frequency internal oscillator (HFINTOSC) provides a factory-trimmed 64MHz source without an external crystal, reducing BOM cost. Verified from the Microchip datasheet for the PIC18F04/05/14/15Q40 family.
Does PIC18F04Q40T-I/SL support capacitive touch sensing?
Yes, the PIC18F04Q40T-I/SL integrates a 12-bit ADC with Computation (ADCC) that automates Capacitive Voltage Divider (CVD) techniques for capacitive touch sensing. Hardware-accelerated averaging, filtering, oversampling, and threshold comparison run without CPU intervention. This enables robust touch-button and slider implementations in white goods and consumer interfaces.
How many PWM channels does PIC18F04Q40T-I/SL have?
The PIC18F04Q40T-I/SL provides a 16-bit PWM module with complementary outputs suitable for driving half-bridges in motor and lighting control. The PWM supports edge-aligned, center-aligned, and variable-phase modes. Verified in the PIC18F04/05/14/15Q40 datasheet section covering the PWM peripheral.
What is the operating voltage range of PIC18F04Q40T-I/SL?
The PIC18F04Q40T-I/SL operates from 1.8V to 5.5V VDD, supporting both 3.3V and 5V rails. According to the Microchip datasheet, Brown-Out Reset (BOR) and Low-Voltage Programming (LVP) thresholds are configurable across this range. Wide-voltage operation simplifies direct connection to single-cell Li-ion or 5V regulated supplies.
Where can I download the PIC18F04Q40T-I/SL datasheet PDF?
The official Microchip datasheet is available at https://ww1.microchip.com/downloads/en/DeviceDoc/PIC18F04-05-14-15Q40-Data-Sheet-40002236C.pdf. The document covers the entire PIC18F04/05/14/15Q40 family in a combined 14/20-pin datasheet. For errata, refer to the same Microchip product page at microchip.com/en-us/product/PIC18F04Q40.
What is the pinout of PIC18F04Q40T-I/SL?
The PIC18F04Q40T-I/SL has 12 general-purpose I/O pins distributed across the 14-pin SOIC package, plus VDD, VSS, and dedicated ICSP pins (PGD/PGC). The exact pin assignments including analog channel mapping and peripheral routing are detailed in the datasheet pin allocation tables. The package_svg_key chosen for the diagram corresponds to soic-14 with 14 pins.
What is the price of PIC18F04Q40T-I/SL in 100-piece quantity?
As of 2026-09-26, the PIC18F04Q40T-I/SL is priced around $0.59 per unit at 100 pieces, with price breaks at 1, 10, 100, 500, 1000, and 2600 (full reel). According to FindMyChip distributor data, MOQ-1 pricing starts at $0.70. Volume pricing fluctuates with lead time and stock; check DigiKey, Mouser, and Microchip Direct for live quotes.
Is PIC18F04Q40T-I/SL in stock at major distributors?
According to recent distributor listings, PIC18F04Q40T-I/SL is actively stocked at DigiKey, Mouser, JLCPCB, and Microchip Direct. Standard lead time is 3-7 business days. Due to high demand for the PIC18F04/05/14/15Q40 family, occasional stock tension can occur on industrial temperature variants - confirm availability through distributor APIs before placing production orders.
What is the best drop-in replacement for PIC18F04Q40T-I/SL?
The PIC18F04Q40T-I/SL's closest drop-in alternative within the same Microchip family is PIC18F04Q40-I/SL (non-T&R packaging variant in 14-SOIC). For cross-brand drop-in equivalents, evaluate 8-bit MCUs from Atmel/Microchip (AVR ATtiny series in 14-SOIC footprint) - confirm peripheral register compatibility before substituting. Cross-reference tools at DigiKey and Microchip Direct streamline this analysis.
How does PIC18F04Q40T-I/SL compare to PIC18F05Q40?
The PIC18F05Q40 has 32KB Flash (vs 16KB on PIC18F04Q40) in the same PIC18-Q40 architecture and 14/20-pin SOIC packages. Both share identical ADCC, dual 8-bit DACs, 16-bit PWM, and Core Independent Peripherals. Choose PIC18F05Q40 when firmware needs additional Flash headroom; the PIC18F04Q40T-I/SL is the lower-cost option for tighter code budgets.
Should I choose PIC18F04Q40T-I/SL or PIC18F14Q40 for my design?
Choose PIC18F04Q40T-I/SL when a 14-pin SOIC footprint with 12 I/O pins is sufficient and your firmware fits within 16KB Flash. Choose PIC18F14Q40 when you need 20 pins for additional peripheral routing or sensor interfaces. Both belong to the same PIC18-Q40 family with identical analog peripherals and a unified development environment in MPLAB X IDE.
Is PIC18F04Q40T-I/SL suitable for battery-powered applications?
Yes, PIC18F04Q40T-I/SL is well-suited for battery-powered sensor nodes. According to the Microchip datasheet, the device supports DOZE and IDLE power-saving modes, peripheral clock gating via the PMD registers, and a typical sleep current under 1 microamp with retention RAM. Combined with the 1.8V minimum VDD, single-cell Li-ion or 2x AA chemistries can be supported.
What development tools support PIC18F04Q40T-I/SL?
PIC18F04Q40T-I/SL is supported by MPLAB X IDE (free), MPLAB Xpress cloud IDE, XC8 C compiler, and the MPLAB Code Configurator (MCC) graphical peripheral init tool. Hardware tools include PICkit 4 (PG164140), MPLAB Snap (PG164100), and Curiosity Nano development board. Verified from the Microchip product page and MPLAB ecosystem documentation.
What is the operating temperature range of PIC18F04Q40T-I/SL?
The PIC18F04Q40T-I/SL operates across -40C to +85C, designated by the 'I' industrial suffix in the part number. This covers consumer, industrial, and most outdoor sensor applications. Per Microchip product coding, 'E' denotes extended (-40C to +125C) and 'H' denotes high-temperature variants - confirm the suffix when ordering for automotive or aerospace designs.

Engineering reference data for PIC18F04Q40T-I/SL — comparison, design guidance, and compliance information.

Selection Guide

Choose PIC18F04Q40T-I/SL when you need a compact, low-cost 8-bit MCU with built-in capacitive touch hardware (12-bit ADCC), dual 8-bit DACs, and 16-bit PWM in a 14-SOIC package. It is the right fit when firmware fits within 16KB Flash and the 12 I/O pins are sufficient for the design. Pick PIC18F05Q40T-I/SL instead if your firmware exceeds 16KB. Pick ATTINY84A-SSU only if the design mandates the AVR ecosystem - it has half the Flash and an 8-bit ADC, requiring code porting. All four options are 14-SOIC drops, so PCB layout decisions carry forward unchanged.

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
Compliant
REACH
Compliant
AEC-Q100
Not Applicable
Lead Free
Yes
Halogen Free
Unknown
Conflict Minerals
Compliant

RoHS compliance per FindMyChip listing. Not AEC-Q100 qualified - choose automotive-grade PIC18Fxx-Q40 -E variants for automotive applications.

Data verified on: 2026-09-26 — data verified and curated by XAIPART's component engineering team

Related Searches

PIC18F04Q40T-I/SL datasheet PIC18F04Q40T-I/SL price PIC18F04Q40T-I/SL 14-SOIC Microchip PIC18-Q40 family PIC18 16KB flash microcontroller PIC18F04Q40 capacitive touch PIC18F04Q40 vs PIC18F05Q40 PIC18F04Q40 drop-in replacement 14-SOIC 8-bit MCU with 12-bit ADCC how to program PIC18F04Q40 PIC18F04Q40T-I/SL buy online PIC18F04Q40 LED PWM driver

Related Components & Terms

Microchip Technology PIC18F04Q40T-I/SL PIC18-Q40 family PIC18F04Q40 PIC18F05Q40 ATTINY84A-SSU 8-bit microcontroller RISC microcontroller Harvard architecture PIC18 core Flash memory EEPROM RAM ADC (Analog-to-Digital Converter) ADCC (12-bit ADC with Computation) DAC (Digital-to-Analog Converter) PWM (Pulse-Width Modulation) Core Independent Peripherals ICSP (In-Circuit Serial Programming) 14-SOIC SOIC-14 surface-mount package RoHS MPLAB X IDE XC8 compiler PICkit capacitive touch sensing CVD (Capacitive Voltage Divider)
Quick Quote RFQ
Fill in complete details — our sales team will respond within 24 hours
Part Number Manufacturer Package QTY Target Price Extended
Total: $0.00 USD
✓
Quote submitted!

We will respond to your email within 24 hours

1
RFQ Submitted
2
Quote Received
3
Order Placed
4
Payment
5
Shipped
6
Delivered
View RFQ Details