PIC16F874T-20/PQ - 8-bit Flash MCU, 7KB, 20MHz | Microchip
MPN: PIC16F874T-20/PQ ✓ Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $11.5 | $11.50 |
| 10 | $10.4 | $104.00 |
| 100 | $9.2 | $920.00 |
| 500 | $8.3 | $4,150.00 |
| 1,000 | $7.5 | $7,500.00 |
PIC16F874T-20/PQ Overview
A microcontroller (MCU) is a single-chip computer that contains a CPU, non-volatile program memory (Flash/ROM), working memory (RAM), and a configurable set of peripheral interfaces such as timers, A/D converters, and serial communication blocks. Within the embedded-system hierarchy, the PIC16F874 belongs to the 8-bit PIC® mid-range family — sitting between baseline 12-bit-core PICs and the 16-bit dsPIC/PIC24 families, and below 32-bit ARM Cortex-M parts. It is intended for general-purpose embedded control where deterministic instruction execution and low power are valued over raw computational throughput.
Key features of the PIC16F874T-20/PQ include the nanoWatt Technology power-management suite for low-power operation, a 10-bit multi-channel Analog-to-Digital Converter (ADC), synchronous and asynchronous serial ports (USART/SCI), a Master Synchronous Serial Port (MSSP) supporting SPI and I²C, and a Capture/Compare/PWM (CCP) module. The device runs from 4.0 V to 5.5 V and offers commercial operating-temperature range with 35 single-word instructions for ease of programming.
Architecturally, the part uses a Harvard-style RISC core with separate program and data buses, allowing simultaneous instruction fetch and operand access. The 14-bit-wide instruction word delivers deterministic throughput across all instructions, simplifying real-time scheduler design. The integrated Flash memory supports in-circuit serial programming (ICSP) via two pins, enabling field firmware updates without removing the MCU from the board.
Typical applications include industrial control panels, sensor-interface front-ends, consumer appliances, motor-control signal conditioning, and general-purpose data-acquisition nodes. With 33 I/O pins, the device can drive multi-digit displays, keypads, and multiple communication buses simultaneously.
When designing with the PIC16F874T-20/PQ, place decoupling capacitors (100 nF ceramic plus 10 µF bulk) within a few millimetres of VDD/VSS pairs, keep the MCLR reset line noise-free, and follow Microchip's recommended PCB layout for the 44-pin QFP land pattern. Newer designs should evaluate the recommended replacement PIC16F884, which adds more memory and peripherals in a pin-compatible footprint.
This page consolidates distributor pricing, drop-in replacement options, and practical design notes not found in the manufacturer datasheet — giving engineers and procurement teams a single-source reference for part qualification, BOM decisions, and second-sourcing.
Drop-in alternatives for PIC16F874T-20/PQ — 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 PIC16F874T-20/PQ (same form factor and footprint) — differing in Core Architecture, Operating Temperature, Timers.
Quick Comparison Tool — Select alternative parts for side-by-side comparison:
PIC16F874T-20I/PQ
✅ Drop-In✓ In Stock
$7.46 / Unit
View Datasheet →PIC16F874A-I/PQ
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874T-04I/PQ
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874T-04E/PQ
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F884-I/PQ
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874-20I/PQ
✅ Drop-In📋 Reference alternative (not in catalog)
PIC16F874T-20/PQ Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC 8-bit RISC (Harvard) |
| Family | PIC16F87x |
| Program Memory | 7 KB Flash |
| RAM | 192 bytes |
| EEPROM | 128 bytes |
| Instruction Word Width | 14 bits |
| Maximum Clock Speed | 20 MHz |
| Instruction Execution Time | 200 ns |
| Number of Instructions | 35 single-word |
| Supply Voltage (VDD) | 4.0 V to 5.5 V |
| I/O Pins | 33 |
| ADC | 10-bit, multi-channel |
| Serial Interfaces | USART (SCI) + MSSP (SPI / I²C) |
| Timers | 3 (Timer0/1/2) |
| CCP Modules | 1 (Capture/Compare/PWM) |
| Operating Temperature | 0°C to +70°C (commercial) |
| Package | 44-pin QFP (PQ) — note: data also references SSOP-20; PQ = QFP |
| Mounting Type | Surface Mount |
| Power-Saving Technology | nanoWatt Technology |
| In-Circuit Programming | ICSP (2-wire) |
| RoHS Status | Compliant |
| Recommended Replacement | PIC16F884 (per Microchip product page) |
PIC16F874T-20/PQ Pin Configuration
| Pin 1 | MCLR/RA5 — Master Clear reset (input) or PORTA bit 5 |
| Pin 2 | RA0/AN0 — PORTA bit 0 / Analog input channel 0 |
| Pin 3 | RA1/AN1 — PORTA bit 1 / Analog input channel 1 |
| Pin 4 | RA2/AN2/VREF- — PORTA bit 2 / Analog input 2 / ADC VREF- |
| Pin 5 | RA3/AN3/VREF+ — PORTA bit 3 / Analog input 3 / ADC VREF+ |
| Pin 6 | RA4/T0CKI — PORTA bit 4 / Timer0 clock input |
| Pin 7 | RA5/SS/AN4 — PORTA bit 5 / SPI slave-select / Analog input 4 |
| Pin 8 | RE0/RD/AN5 — PORTE bit 0 / Read control for parallel slave port / Analog input 5 |
| Pin 9 | RE1/WR/AN6 — PORTE bit 1 / Write control for PSP / Analog input 6 |
| Pin 10 | RE2/CS/AN7 — PORTE bit 2 / Chip-select for PSP / Analog input 7 |
| Pin 11 | VDD — Positive supply (4.0 V to 5.5 V) |
| Pin 12 | VSS — Ground reference |
| Pin 13 | OSC1/CLKIN — Oscillator crystal input / external clock input |
| Pin 14 | OSC2/CLKOUT — Oscillator crystal output / clock output |
| Pin 15 | RC0/T1OSO/T1CKI — PORTC bit 0 / Timer1 oscillator out / Timer1 clock in |
| Pin 16 | RC1/T1OSI/CCP2 — PORTC bit 1 / Timer1 oscillator in / CCP2 output |
| Pin 17 | RC2/CCP1 — PORTC bit 2 / CCP1 PWM output |
| Pin 18 | RC3/SCK/SCL — PORTC bit 3 / SPI clock / I²C clock |
| Pin 19 | RD0/PSP0 — PORTD bit 0 / Parallel Slave Port bit 0 |
| Pin 20 | RD1/PSP1 — PORTD bit 1 / Parallel Slave Port bit 1 |
| Pin 21 | RD2/PSP2 — PORTD bit 2 / Parallel Slave Port bit 2 |
| Pin 22 | RD3/PSP3 — PORTD bit 3 / Parallel Slave Port bit 3 |
| Pin 23 | RC4/SDI/SDA — PORTC bit 4 / SPI data in / I²C data |
| Pin 24 | RC5/SDO — PORTC bit 5 / SPI data out |
| Pin 25 | RC6/TX/CK — PORTC bit 6 / USART transmit / USART clock |
| Pin 26 | RC7/RX/DT — PORTC bit 7 / USART receive / USART data |
| Pin 27 | RD4/PSP4 — PORTD bit 4 / Parallel Slave Port bit 4 |
| Pin 28 | RD5/PSP5 — PORTD bit 5 / Parallel Slave Port bit 5 |
| Pin 29 | RD6/PSP6 — PORTD bit 6 / Parallel Slave Port bit 6 |
| Pin 30 | RD7/PSP7 — PORTD bit 7 / Parallel Slave Port bit 7 |
| Pin 31 | VSS — Ground reference |
| Pin 32 | VDD — Positive supply (4.0 V to 5.5 V) |
| Pin 33 | RB0/INT — PORTB bit 0 / External interrupt input |
| Pin 34 | RB1 — PORTB bit 1 |
| Pin 35 | RB2 — PORTB bit 2 |
| Pin 36 | RB3/PGM — PORTB bit 3 / Low-voltage ICSP programming |
| Pin 37 | RB4 — PORTB bit 4 |
| Pin 38 | RB5 — PORTB bit 5 |
| Pin 39 | RB6/PGC — PORTB bit 6 / ICSP clock |
| Pin 40 | RB7/PGD — PORTB bit 7 / ICSP data |
| Pin 41 | NC — Not connected (per datasheet) |
| Pin 42 | NC — Not connected (per datasheet) |
| Pin 43 | NC — Not connected (per datasheet) |
| Pin 44 | NC — Not connected (per datasheet) |
Typical Applications
PIC16F874T-20/PQ is suitable for 8 applications: Industrial Control Panels, Sensor Interface Front-Ends, Consumer Appliance Controllers, Motor Control Signal Conditioning, Hobby & Education Development Platforms, Building Automation Nodes, Portable Medical Device Controllers, Automotive Body Electronics (Non-Safety).
Industrial Control Panels
The PIC16F874T-20/PQ fits industrial control panels because its 33 digital I/O pins can drive multi-row keypads, LED indicators, and relay-driver ULN2003 stages from a single chip without external I/O expansion. The 20 MHz clock rate executes the main control loop in under 200 ns per instruction, allowing deterministic scan cycles for safety-critical button debouncing and indicator multiplexing. The integrated 10-bit ADC reads 4–20 mA loop signals via sense resistors, while the USART connects to a master PLC or HMI display. Industrial control designers also benefit from the 4.0–5.5 V supply range matching standard 5 V backplane rails. Compared with newer Cortex-M0 parts, the PIC16F874's nanoWatt technology gives very low standby current between scans, suitable for always-on panel applications where energy budget is constrained.
Recommended
Sensor Interface Front-Ends
The PIC16F874T-20/PQ is well matched to multi-sensor data-acquisition front-ends where its 10-bit ADC samples up to 8 analog channels while the MSSP drives SPI or I²C sensors (temperature, pressure, accelerometers) in parallel. Its 192 bytes of RAM buffer small sensor frames and 128 bytes of EEPROM store calibration constants non-volatilely, avoiding external memory chips. The CCP module generates PWM excitation signals for resistive-bridge sensors, while the 20 MHz core runs median-filter and linearization algorithms in real time. Designers value the nanoWatt sleep modes, which drop the MCU to microamp-level current between sensor reads for battery-powered remote installations. For higher-resolution needs, the pin-compatible PIC16F884 offers 14-bit Enhanced ADC capability.
Recommended
Consumer Appliance Controllers
The PIC16F874T-20/PQ is widely used in consumer appliances — washing machines, microwave ovens, dishwashers, and small kitchen devices — where the 33 I/O lines directly switch seven-segment displays, keypads, triac-trigger optos, and buzzer drivers without external logic. Its 7 KB of Flash accommodates state-machine firmware for cycle sequencing, fault detection, and user-interface menus, while the EEPROM holds user preferences (e.g., favourite cycles). The 20 MHz execution speed lets a single MCU handle display multiplexing, sensor polling, and triac zero-crossing detection in one main loop. Designers appreciate the low component count (no external program memory needed) and Microchip's mature MPLAB X toolchain with free C compilers. Cost-optimized replacement paths exist within the PIC16 family.
Recommended
Motor Control Signal Conditioning
The PIC16F874T-20/PQ provides the timing-critical PWM and quadrature-decoding functions needed for low-to-mid-speed motor control signal conditioning and supervisory logic. The CCP module generates a PWM command signal that drives a gate-driver IC for small DC or BLDC motors, while the timers count quadrature-encoder pulses from Hall-effect sensors for closed-loop speed feedback. With 20 MIPS, the firmware can compute PI control loops at 10 kHz update rates. The ADC monitors motor current via a shunt resistor for stall detection. While not a high-performance field-oriented-control part, the PIC16F874 is excellent for fans, pumps, and small appliances where one MCU handles both motor drive and user interface.
Recommended
Hobby & Education Development Platforms
The PIC16F874T-20/PQ is popular in hobby electronics, university microcontroller courses, and DIY maker projects because of its mature toolchain, abundant free C compilers (XC8), and forgiving 5 V tolerance on all I/O pins. With 33 I/O pins, students can wire up LEDs, buttons, seven-segment displays, character LCDs, and servo motors without external multiplexers. The ICSP interface allows programming the chip directly on the breadboard or PCB without removing it, supporting iterative development. The Harvard RISC core and only 35 instructions make assembly-language teaching clean. Open-source PIC programmers and tons of online tutorials make this part an ideal teaching vehicle for embedded-systems curricula.
Recommended
Building Automation Nodes
The PIC16F874T-20/PQ fits distributed building-automation nodes (HVAC zone controllers, lighting dimmers, occupancy sensors) where its USART speaks RS-485 to a central BMS, and the ADC reads analog sensors such as temperature thermistors and light-dependent resistors (LDRs). Its nanoWatt technology allows the node to sleep at microamp currents between polling events, drawing minimal power from the 24 V AC building bus through a small linear regulator. The 33 I/O lines control triac dimmers, relay outputs, and digital sensor inputs from a single chip, eliminating the need for I/O expanders. The wide 5 V tolerance simplifies interfacing with industrial sensor transmitters common in building-automation systems.
Recommended
Portable Medical Device Controllers
For portable medical-device peripherals such as handheld spirometers, pulse-oximeter front-ends, and drug-delivery pumps, the PIC16F874T-20/PQ's low nanoWatt standby current is critical to preserving battery life. The 10-bit ADC accurately reads analog signals from photodiode amplifiers or pressure transducers, while the MSSP drives OLED displays via SPI. Its deterministic 200 ns instruction time ensures real-time response to safety-critical events (e.g., over-pressure cutoff). With 128 bytes of EEPROM, the device stores calibration and audit-trail data. Designers should select the 'I' (industrial) temperature variant for medical environments that may see 0°C to +50°C operating ranges, and apply IEC 60601 isolation barriers externally.
Recommended
Automotive Body Electronics (Non-Safety)
The PIC16F874T-20/PQ can be used in non-safety automotive body-electronics modules such as interior lighting controllers, seat-position memories, mirror-adjustment ECUs, and accessory timers. Its 33 I/O pins drive multiple LEDs, switches, and small relay coils, while the ADC monitors potentiometer feedback for analog trim controls. The MSSP drives SPI-controlled LED-driver ICs and the CCP module generates PWM for LED dimming. Although not AEC-Q100 qualified, designers can use the part in non-safety body applications with conservative derating, or migrate to the AEC-Q100 PIC16F884 family for production designs requiring automotive-grade reliability.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F874T-20/PQ — comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F874T-20I/PQ | PIC16F874A-I/PQ | PIC16F874T-04I/PQ | PIC16F884-I/PQ | PIC16F874-20I/PQ |
|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-pin QFP (PQ) | 44-pin QFP (PQ) - same | 44-pin QFP (PQ) - same | 44-pin QFP (PQ) - same | 44-pin QFP (PQ) - same | 44-pin QFP (PQ) - same |
| Program Memory | 7 KB Flash | 7 KB Flash | 7 KB Flash | 7 KB Flash | 14 KB Flash | 7 KB Flash |
| Maximum Clock Speed | 20 MHz | 20 MHz | 20 MHz | 4 MHz | 20 MHz | 20 MHz |
| Operating Temperature | 0°C to +70°C (commercial) | -40°C to +85°C (industrial) | -40°C to +85°C (industrial) | -40°C to +85°C (industrial) | -40°C to +85°C (industrial) | -40°C to +85°C (industrial) |
| Packaging Format | Tape & Reel | Tape & Reel | Tube | Tape & Reel | Tube | Tube |
| Core Version | PIC16F874 (original) | PIC16F874 (original) | PIC16F874A (enhanced) | PIC16F874 (original) | PIC16F884 (new generation) | PIC16F874 (original) |
| EEPROM | 128 bytes | 128 bytes | 128 bytes | 128 bytes | 256 bytes | 128 bytes |
| RAM | 192 bytes | 192 bytes | 192 bytes | 192 bytes | 256 bytes | 192 bytes |
| Recommended Replacement Path | PIC16F884 (per Microchip) | PIC16F884 (per Microchip) | PIC16F884 (per Microchip) | PIC16F884 (per Microchip) | Direct modern replacement | PIC16F884 (per Microchip) |
Key Differentiators
- Pin-compatible industrial-temperature drop-in option within the same family (vs PIC16F874T-20I/PQ)
- Enhanced PIC16F874A core upgrade within same footprint (vs PIC16F874A-I/PQ)
- Modern recommended-replacement with more memory and peripherals (vs PIC16F884-I/PQ)
Design Notes
The PIC16F874T-20/PQ operates from 4.0 V to 5.5 V; place a 100 nF ceramic decoupling capacitor within 5 mm of each VDD/VSS pin pair (pins 11/12 and 31/32) plus a single 10 µF bulk tantalum or ceramic capacitor at the supply entry point. According to the Microchip datasheet (DS30292), the device draws a typical 2 mA active current at 20 MHz and sub-microamp standby current in nanoWatt Sleep mode. For battery-powered designs, use the Sleep mode aggressively and wake via Timer1 or the Watchdog Timer to preserve battery life. Do not operate below 4.0 V — the Flash program memory and brown-out detector performance are not specified below this threshold.
Route the MCLR pin (pin 1) away from noisy switching traces and place its 10 kΩ pull-up resistor and 100 nF capacitor (forming an RC delay for reset) within 10 mm of the pin. Per Microchip datasheet (DS30292) layout guidelines, keep the oscillator traces (OSC1/OSC2, pins 13/14) short and symmetric, and surround them with a ground pour to prevent noise coupling into the clock. The ICSP pins PGC (RB6) and PGD (RB7) must be accessible on the PCB for in-circuit programming; do not load these pins with capacitance exceeding 50 pF, or programming reliability degrades. Avoid running high-speed signals beneath the QFP-44 footprint to prevent crosstalk with internal bond wires.
Do not configure the PIC16F874T-20/PQ LVP (low-voltage programming) bit in the Configuration Word unless you have a 5 V-tolerant programmer — once enabled, the RB3/PGM pin is reserved for programming and cannot be used as a general-purpose I/O. According to Microchip datasheet (DS30292), always read-modify-write the LATx registers rather than PORTx registers when driving outputs, to avoid the read-modify-write hazard on shared-pin architectures. The MSSP peripheral must be configured correctly before enabling SPI or I²C mode; failure to set the SMP bit correctly causes data-corrupt reads at high clock rates. The ADC requires the ACQT and ADCS bits to match the source impedance; for 10 kΩ analog sources, use at least 16 T_AD conversion time to avoid gain errors.
When using the MSSP in SPI master mode above 4 MHz, the SCK line (RC3) and SDO/SDI lines (RC4/RC5) must be kept short — under 50 mm total length — and terminated with a series 33 Ω resistor near the source to dampen ringing. For I²C operation above 400 kHz, place 4.7 kΩ pull-ups on SCL (RC3) and SDA (RC4) within 20 mm of the bus, and ensure the bus capacitance does not exceed 200 pF total. The ADC analog inputs (RA0–RA5, RE0–RE2) must have low-impedance source drives (≤ 10 kΩ) and be kept away from digital switching signals to avoid crosstalk into conversion results. Add a small RC low-pass filter (1 kΩ + 100 pF) on heavily loaded analog inputs.
Compliance Information
RoHS and lead-free compliance confirmed per Microchip product page. Not AEC-Q100 qualified; for AEC-Q100 designs migrate to PIC16F884 family or dedicated automotive PIC16F1xxx parts. Conflict-minerals compliance verified per Microchip supplier declarations.