PIC16F84A-20/P - 8-Bit 20MHz 1.75KB Flash MCU | Microchip DIP-18
MPN: PIC16F84A-20/P β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $3.12 | $3.12 |
| 10 | $2.85 | $28.50 |
| 100 | $2.41 | $241.00 |
| 500 | $2.05 | $1,025.00 |
| 1,000 | $1.72 | $1,720.00 |
PIC16F84A-20/P Overview
A microcontroller (MCU) is a single-chip computer containing a CPU core, program and data memory, peripherals, and I/O on one die, designed for embedded control tasks. Within the semiconductor taxonomy, the PIC16F84A belongs to the 8-bit MCU family, which sits under the broader category of microcontrollers and finally under integrated circuits. The PIC architecture uses a RISC instruction set with only 35 single-word instructions, which simplifies learning while still delivering deterministic real-time performance.
Key features include 20 MHz maximum clock, 4.0-5.5 V single-supply operation, 13 digital I/O lines, an 8-bit timer (TMR0) with 8-bit prescaler, a Watchdog Timer with its own on-chip RC oscillator for reliable resets, and an ICD-friendly in-circuit serial programming (ICSP) interface via RB6/RB7. The 64-byte EEPROM supports 1M erase/write cycles typical, allowing non-volatile storage of calibration constants or user settings.
Internally, the device uses a Harvard architecture with separate program and data buses, supporting 14-bit wide instructions and 8-bit wide data. Power consumption is minimized by the nanoWatt technology features: SLEEP mode with < 1 Β΅A typical standby current, software-controlled oscillator switching between INTOSC mode if available in derivative parts, and selective peripheral disable.
Typical applications include hobbyist robotics, hobby-grade learning boards, simple sensor interfaces, automotive interior accessories, small appliances, IR remote control decoders, LED sequencing controllers, and legacy industrial control retrofits that still rely on the original PIC16F84A pinout. The PIC16F84A's enduring popularity is driven by thousands of university textbooks and legacy code libraries still referencing the part.
When designing, route ICSPDAT (RB6) and ICSPCLK (RB7) away from high-frequency switching nodes, place a 100 nF decoupling capacitor within 5 mm of VDD, and ensure the MCLR pull-up is at least 10 kΞ© to allow reliable in-circuit programming. The internal oscillator of the 'A' revision eliminates the need for external crystals in cost-sensitive designs.
This page synthesizes distributor pricing from DigiKey/Mouser/Octopart, lists Microchip cross-references from the migration document DS30072, and consolidates practical design notes and pin-compatible alternatives that are not collected in any single manufacturer source.
Drop-in alternatives for PIC16F84A-20/P β 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 PIC16F84A-20/P (same form factor and footprint) β differing in Timers, Mounting Type, Instruction Set, MSL Level, Core Architecture.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F84A-20I/P
β Drop-Inβ In Stock
$2.43 / Unit
View Datasheet βPIC16F84A-04/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F84A-04I/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F628A-04/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F88-I/P
β Drop-Inπ Reference alternative (not in catalog)
PIC16F84-10/P
β Drop-Inβ In Stock
$3.59 / Unit
View Datasheet βPIC16F84A-20/P Maximum Ratings & Electrical Characteristics
| Program Memory Type | Flash |
| Program Memory Size | 1.75 KB (1K x 14) |
| Data RAM Size | 68 bytes |
| EEPROM Size | 64 bytes |
| CPU Core | PIC16 (8-bit RISC) |
| Instruction Set | 35 single-word instructions, 14-bit wide |
| Maximum Clock Frequency | 20 MHz |
| Instruction Execution Time | 200 ns at 20 MHz |
| Supply Voltage (VDD) | 4.0 V to 5.5 V |
| I/O Pins | 13 |
| Timers | 1 x 8-bit (TMR0) with 8-bit prescaler |
| Watchdog Timer | Yes, dedicated on-chip RC oscillator |
| Hardware Stack | 15-bit x 2 levels |
| Operating Temperature | 0 Β°C to +70 Β°C (commercial, '20' speed) |
| Package Type | 18-pin PDIP (Plastic DIP) |
| Mounting Type | Through-hole |
| MSL Level | 1 (unlimited) |
| RoHS Status | Compliant (lead-free) |
PIC16F84A-20/P Pin Configuration
| Pin 1 | RA2 β Bidirectional digital I/O / analog input |
| Pin 2 | RA3 β Bidirectional digital I/O / analog input |
| Pin 3 | RA4/T0CKI β Bidirectional digital I/O / Timer0 clock input (open-drain) |
| Pin 4 | MCLR/VPP β Master Clear reset input / programming voltage |
| Pin 5 | VSS β Ground reference |
| Pin 6 | RB0/INT β Bidirectional digital I/O / external interrupt |
| Pin 7 | RB1 β Bidirectional digital I/O |
| Pin 8 | RB2 β Bidirectional digital I/O |
| Pin 9 | RB3 β Bidirectional digital I/O |
| Pin 10 | RB4 β Bidirectional digital I/O / interrupt-on-change |
| Pin 11 | RB5 β Bidirectional digital I/O / interrupt-on-change |
| Pin 12 | RB6/ICSPCLK β Bidirectional digital I/O / serial programming clock |
| Pin 13 | RB7/ICSPDAT β Bidirectional digital I/O / serial programming data |
| Pin 14 | VDD β Positive supply voltage (4.0-5.5 V) |
| Pin 15 | OSC2/CLKOUT β Crystal/Resonator pin 2 / clock output |
| Pin 16 | OSC1/CLKIN β Crystal/Resonator pin 1 / external clock input |
| Pin 17 | RA0 β Bidirectional digital I/O / analog input |
| Pin 18 | RA1 β Bidirectional digital I/O / analog input |
Typical Applications
PIC16F84A-20/P is suitable for 7 applications: Hobbyist Robotics & Learning Boards, IR Remote Control Decoder, Automotive Interior Accessories, Sensor Interface & Data Logger, LED Sequencing & Chaser Controller, Legacy Industrial Control Retrofit, Security Keypad & Access Control.
Hobbyist Robotics & Learning Boards
The PIC16F84A-20/P's 35-instruction RISC core, 20 MHz clock, and textbook familiarity make it ideal for hobbyist robotics and university embedded-systems courses. Its 13 digital I/O pins comfortably drive four H-bridge motor channels plus sensor feedback, while 1.75 KB Flash holds simple line-following or wall-avoidance algorithms. The 200 ns instruction cycle supports tight PID loops at kHz rates, and 64 B EEPROM stores tunable PID gains between power cycles. Compared to the 4 MHz -04 variant, the -20/P cuts latency five-fold for IR-pulse timing in encoder decoding. Students also benefit from PICkit 3/4 ICSP support on RB6/RB7, allowing in-circuit debug on the actual learning board. The 18-pin PDIP footprint is breadboard-friendly, eliminating soldering during rapid prototyping.
Recommended
IR Remote Control Decoder
The PIC16F84A-20/P's 20 MHz clock and edge-triggered PORTB interrupt-on-change are well matched to decoding NEC, RC5, or SIRC IR remote protocols in the 36-40 kHz carrier range. The 200 ns instruction cycle samples the demodulated IR signal at over 100 kHz, easily capturing 1.5 ms bit-times with sub-Β΅s jitter. 1.75 KB Flash stores up to 32 distinct command mappings, and 64 B EEPROM retains user-programmed button assignments across battery swaps. Power consumption in SLEEP is under 1 Β΅A, supporting battery-powered remote designs that idle for years. Pairing the MCU with a TSOP1738 IR receiver on RB0 yields a 3-component decoder. Compared to a discrete logic implementation, the PIC16F84A-20/P delivers reprogrammability at near-zero added cost.
Recommended
Automotive Interior Accessories
The PIC16F84A-20/P (industrial -I variant recommended for -40C to +85C underhood) drives interior accessories such as LED sequencing controllers, dome-light timers, and aftermarket alarm LED indicators. Its 4.0-5.5 V supply range matches the automotive 12 V bus after a 7805 regulator, and 13 digital I/O lines multiplex up to 64 LED states via Charlieplexing. The Watchdog Timer with dedicated on-chip RC oscillator recovers the MCU from automotive electrical transients. EEPROM stores user-configurable timing parameters that survive battery disconnection, a key automotive requirement. Compared to a simple 555-timer circuit, the PIC16F84A-20/P adds programmable timing curves without analog drift. Designers should add TVS diodes on VDD and 100 nF decoupling within 5 mm of the supply pin.
Recommended
Sensor Interface & Data Logger
With 13 digital I/O and software-controlled bit-banging, the PIC16F84A-20/P reads one-wire DS18B20 temperature sensors, SPI pressure sensors, and I2C EEPROMs to build a low-cost multi-sensor data logger. 64 B EEPROM, while small, holds calibration constants and timestamped event flags between battery swaps. The 20 MHz clock bit-bangs 1-Wire and SPI at the maximum rated bus speeds without CPU stall, and the Watchdog Timer prevents logger hangs during extended unattended deployments. Compared to a fixed-logic sensor interface, the PIC16F84A-20/P lets engineers reconfigure the protocol set over ICSP without PCB changes. Pair with a DS1302 RTC on PORTA for time-stamped logging.
Recommended
LED Sequencing & Chaser Controller
The PIC16F84A-20/P drives 8 to 13 LEDs directly from PORTB with internal weak pull-ups disabled, producing chaser, fade, or persistence-of-vision effects. At 20 MHz, software PWM at 100 Hz refresh rate with 256 steps per channel is feasible on 4 channels simultaneously, supporting smooth fading. 1.75 KB Flash holds multiple pre-programmed animation sequences, and 64 B EEPROM stores user-selected modes. The MCU's 25 mA sink/source per pin (200 mA total) is sufficient for direct low-current LED drive without external transistors. Compared to discrete shift-register chains, the PIC16F84A-20/P enables single-button mode switching and EEPROM-backed state retention.
Recommended
Legacy Industrial Control Retrofit
Thousands of legacy industrial controllers still depend on PIC16F84A-20/P firmware, especially in 1990s-era PLC I/O modules and HVAC zone controllers. The 18-pin PDIP remains the simplest form factor for through-hole replacement on existing backplanes, and 20 MHz headroom runs the original control loops with significant timing margin. EEPROM retains setpoints across power cycles, and the Watchdog Timer recovers from brownouts common in industrial environments. Compared to redesigning with a modern MCU, drop-in replacement preserves decades of validated firmware behavior. The PIC16F84A-20/P's continued active status makes it a sustainable spare part for legacy maintenance contracts.
Recommended
Security Keypad & Access Control
The PIC16F84A-20/P reads a 4x3 or 4x4 matrix keypad on PORTB while scanning LED indicators on PORTA, building a complete door-access controller in a single 18-pin MCU. EEPROM stores up to 64 B of access codes (sufficient for several 4-digit PINs and audit flags), and the Watchdog Timer guards against code-probing attacks by resetting on illegal jumps. The 20 MHz clock debounces key presses in software within 10 ms, well below user perception. The 13 digital I/O lines also drive a relay or MOSFET for the door strike. Compared to dedicated keypad ICs, the PIC16F84A-20/P allows firmware updates over ICSP for changing access logic without hardware swap.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F84A-20/P β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F84A-20I/P | PIC16F84A-04/P | PIC16F84A-04I/P | PIC16F628A-04/P | PIC16F88-I/P | PIC16F84-10/P |
|---|---|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | PDIP-18 | PDIP-18 - same | PDIP-18 - same | PDIP-18 - same | PDIP-18 - same | PDIP-18 - same | PDIP-18 - same |
| Max Clock Frequency | 20 MHz | 20 MHz | 4 MHz | 4 MHz | 20 MHz | 20 MHz | 10 MHz |
| Program Memory (Flash) | 1.75 KB (1K x 14) | 1.75 KB | 1.75 KB | 1.75 KB | 3.5 KB | 4 KB | 1.75 KB |
| Data RAM | 68 B | 68 B | 68 B | 68 B | 224 B | 368 B | 68 B |
| EEPROM | 64 B | 64 B | 64 B | 64 B | 128 B | 256 B | 64 B |
| Operating Temperature | 0 Β°C to +70 Β°C | -40 Β°C to +85 Β°C | 0 Β°C to +70 Β°C | -40 Β°C to +85 Β°C | 0 Β°C to +70 Β°C | -40 Β°C to +85 Β°C | 0 Β°C to +70 Β°C |
| Internal Oscillator | No (external required) | No | No | No | Yes (4 MHz) | Yes (8 MHz, software-tunable) | No |
Key Differentiators
- 20 MHz speed grade vs the same-family -04 variant (vs PIC16F84A-04/P)
- Original 'A' silicon revision with nanoWatt technology (vs PIC16F84 (non-A, original))
- Simple 35-instruction RISC core vs 16-bit/32-bit alternatives (vs ATSAMD21G17A-MF (ARM Cortex-M0+ 32-bit MCU))
Design Notes
Place a 100 nF ceramic decoupling capacitor within 5 mm of the VDD pin (pin 14), directly between VDD and VSS, with a short, low-inductance trace. Add a 10 Β΅F bulk capacitor at the board entry point if the supply traces are longer than 25 mm. In SLEEP mode the PIC16F84A-20/P draws under 1 Β΅A typical per the Microchip datasheet, so battery-backed designs can use a simple resistor-divider or low-dropout regulator on the supply rail.
Keep the traces between OSC1 (pin 16) and OSC2 (pin 15) and the crystal as short and symmetric as possible. Place the crystal load capacitors (typically 15-33 pF) within 2-3 mm of the MCU pins. Route the ICSP signals ICSPCLK (RB7) and ICSPDAT (RB6) to a 6-pin header with dedicated ground to enable programming without disconnecting target circuitry. Use a 10 kΞ© pull-up on MCLR (pin 4) so the device can be reset reliably and programmed in-circuit.
Do not leave MCLR floating - a floating reset pin causes erratic behavior and unpredictable code execution. Always include a 10 kΞ© pull-up to VDD. RA4 is an open-drain output, so it cannot source current - add an external pull-up if used as an output. When migrating code from PIC16F84 to PIC16F84A, consult Microchip migration document DS30072B to verify register behavior differences in TMR0 prescaler assignment and EEPROM write timing.
Compliance Information
RoHS-compliant and lead-free per Microchip product page; halogen-free status not explicitly stated. Not AEC-Q100 qualified; for automotive applications choose the PIC16F84A-20I/P industrial variant within a system-level qualification.