PIC16F877A-E/PT - 8-Bit 20MHz 14KB Flash MCU 44-TQFP | Microchip
MPN: PIC16F877A-E/PT β Active| Qty | Unit Price | Extended |
|---|---|---|
| 1 | $11.62 | $11.62 |
| 10 | $10.45 | $104.50 |
| 100 | $9.32 | $932.00 |
| 500 | $8.55 | $4,275.00 |
| 1,000 | $7.8 | $7,800.00 |
PIC16F877A-E/PT Overview
What is a PIC16F877A? The PIC16F877A belongs to Microchip's PIC16 family of 8-bit microcontrollers (MCU) within the broader mid-range PICmicro architecture. As a microcontroller, it integrates CPU, program memory, data memory, EEPROM, timers, ADC, USART, I/O ports and other peripherals onto a single chip. Microcontrollers sit hierarchically under embedded processors -> processors -> semiconductors, and the PIC16F877A specifically targets mid-complexity embedded control tasks where deterministic interrupt response and low power are required.
Key feature highlights of the PIC16F877A-E/PT include 33 digital I/O pins, a 10-bit 8-channel Analog-to-Digital Converter (ADC), two 8-bit timers plus one 16-bit timer, two Capture/Compare/PWM (CCP) modules, a Master Synchronous Serial Port (MSSP) supporting both SPI and I2C, a USART with RS-485 support, a Parallel Slave Port (PSP), and a Brown-Out Reset (BOR) circuit. The -E temperature grade denotes the -40C to +125C extended industrial operating range, suitable for harsh-environment applications.
Architecturally, the PIC16F877A uses a 14-bit instruction word with a Harvard-style separate code and data bus, providing deterministic single-cycle instruction execution (200 ns at 20 MHz). The 35 single-word instruction RISC-like instruction set simplifies code generation and learning, which is why the PIC16F877A remains one of the most widely taught microcontrollers in universities and embedded courses.
Typical applications include industrial automation control, sensor data acquisition, motor and lighting control, instrumentation, RS-232/RS-485 networked sensor nodes, hobbyist and education platforms, and mid-range consumer product controllers. The wide supply range of 2.0V to 5.5V and low-power sleep modes extend battery-operated use cases.
Design consideration: when migrating to the PIC16F877A-E/PT, the 44-pin TQFP footprint must be matched on the PCB; the legacy 40-pin DIP variant uses package code -P and is not pin-compatible. Ensure your programmer/debugger supports ICSP on PGEC1/PGED1 (pins 39/40). Use MPLAB X IDE and the XC8 compiler for firmware development.
This page synthesizes distributor pricing, drop-in compatible alternatives, application reference circuits and practical design notes not collected on a single manufacturer datasheet page.
Drop-in alternatives for PIC16F877A-E/PT β 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 PIC16F877A-E/PT (same form factor and footprint) β differing in Package, Timers, Operating Temperature, ADC, Core Architecture.
Quick Comparison Tool β Select alternative parts for side-by-side comparison:
PIC16F877A-I/PT
β Drop-Inπ Reference alternative (not in catalog)
PIC16F877-20I/PT
β Drop-Inβ In Stock
$5.1 / Unit
View Datasheet βPIC16F877-04E/PT
β Drop-Inβ In Stock
$3.25 / Unit
View Datasheet βPIC16F887-E/PT
β Drop-Inπ Reference alternative (not in catalog)
PIC16F874AT-I/PT
β Drop-Inβ In Stock
$6.95 / Unit
View Datasheet βPIC16F874A-I/PT
β Drop-Inπ Reference alternative (not in catalog)
PIC16F877A-E/PT Maximum Ratings & Electrical Characteristics
| Core Architecture | PIC16 (8-bit, 14-bit instruction word) |
| Maximum CPU Frequency | 20 MHz (200 ns instruction cycle) |
| MIPS | 5 MIPS |
| Program Memory (Flash) | 14 KB (8K x 14 words) |
| Data SRAM | 368 bytes |
| Data EEPROM | 256 bytes |
| Digital I/O Pins | 33 |
| ADC | 10-bit, 8 channels |
| Timers | 2 x 8-bit + 1 x 16-bit |
| CCP Modules | 2 (Capture/Compare/PWM) |
| Serial Interfaces | MSSP (SPI/I2C), USART (RS-485) |
| Parallel Slave Port | Yes (8-bit PSP) |
| Brown-Out Reset (BOR) | Yes |
| Operating Voltage | 2.0 V to 5.5 V |
| Operating Temperature | -40C to +125C (extended -E grade) |
| Package | 44-pin TQFP (PT), 10x10 mm |
| Mounting Type | Surface Mount |
| Instruction Set | 35 single-word instructions |
| ICSP Programming | Yes (PGEC1/PGED1) |
| RoHS Status | Compliant |
| Lead-Free | Yes |
PIC16F877A-E/PT Pin Configuration
| Pin 1 | MCLR/VPP/THV β Master Clear (active-low reset) / ICSP programming voltage |
| Pin 2 | RA0/AN0 β PORTA bit 0 / Analog input 0 |
| Pin 3 | RA1/AN1 β PORTA bit 1 / Analog input 1 |
| Pin 4 | RA2/AN2/VREF- β PORTA bit 2 / Analog input 2 / ADC negative reference |
| Pin 5 | RA3/AN3/VREF+ β PORTA bit 3 / Analog input 3 / ADC positive reference |
| Pin 6 | RA4/T0CKI/C1OUT β PORTA bit 4 / Timer0 clock input / Comparator 1 output |
| Pin 7 | RA5/AN4/SS/C2OUT β PORTA bit 5 / Analog input 4 / SPI Slave Select / Comparator 2 output |
| Pin 8 | RE0/RD/AN5 β PORTE bit 0 / Parallel Slave Port read control / Analog input 5 |
| Pin 9 | RE1/WR/AN6 β PORTE bit 1 / Parallel Slave Port write control / Analog input 6 |
| Pin 10 | RE2/CS/AN7 β PORTE bit 2 / Parallel Slave Port chip select / Analog input 7 |
| Pin 11 | VDD β Positive supply voltage (+2.0V to +5.5V) |
| Pin 12 | VSS β Ground reference |
| Pin 13 | OSC1/CLKIN β Crystal oscillator input / external clock input |
| Pin 14 | OSC2/CLKOUT β Crystal oscillator output / clock output |
| Pin 15 | RC0/T1OSO/T1CKI β PORTC bit 0 / Timer1 oscillator output / Timer1 clock input |
| Pin 16 | RC1/T1OSI/CCP2 β PORTC bit 1 / Timer1 oscillator input / CCP2 module |
| Pin 17 | RC2/CCP1 β PORTC bit 2 / CCP1 module (PWM/Capture/Compare) |
| Pin 18 | RC3/SCK/SCL β PORTC bit 3 / SPI clock / I2C clock |
| Pin 19 | RD0/PSP0 β PORTD bit 0 / Parallel Slave Port data bit 0 |
| Pin 20 | RD1/PSP1 β PORTD bit 1 / Parallel Slave Port data bit 1 |
| Pin 21 | RD2/PSP2 β PORTD bit 2 / Parallel Slave Port data bit 2 |
| Pin 22 | RD3/PSP3 β PORTD bit 3 / Parallel Slave Port data bit 3 |
| Pin 23 | RC4/SDI/SDA β PORTC bit 4 / SPI data in / I2C data |
| Pin 24 | RC5/SDO β PORTC bit 5 / SPI data out |
| Pin 25 | RC6/TX/CK β PORTC bit 6 / USART asynchronous transmit / synchronous clock |
| Pin 26 | RC7/RX/DT β PORTC bit 7 / USART asynchronous receive / synchronous data |
| Pin 27 | RD4/PSP4 β PORTD bit 4 / Parallel Slave Port data bit 4 |
| Pin 28 | RD5/PSP5 β PORTD bit 5 / Parallel Slave Port data bit 5 |
| Pin 29 | RD6/PSP6 β PORTD bit 6 / Parallel Slave Port data bit 6 |
| Pin 30 | RD7/PSP7 β PORTD bit 7 / Parallel Slave Port data bit 7 |
| Pin 31 | VSS β Ground reference |
| Pin 32 | VDD β Positive supply voltage (+2.0V to +5.5V) |
| Pin 33 | RB0/INT β PORTB bit 0 / External interrupt |
| Pin 34 | RB1 β PORTB bit 1 |
| Pin 35 | RB2 β PORTB bit 2 |
| Pin 36 | RB3/PGM β PORTB bit 3 / Low-voltage ICSP programming entry |
| Pin 37 | RB4 β PORTB bit 4 |
| Pin 38 | RB5 β PORTB bit 5 |
| Pin 39 | RB6/PGC β PORTB bit 6 / ICSP clock (PGEC1) |
| Pin 40 | RB7/PGD β PORTB bit 7 / ICSP data (PGED1) |
| 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
PIC16F877A-E/PT is suitable for 7 applications: Industrial Sensor Data Acquisition, Educational Microcontroller Platform, Motor and Lighting PWM Control, RS-232/RS-485 Communication Gateway, Consumer Appliance Controllers, Battery-Powered Remote Sensor Nodes, Hobbyist and Maker Projects.
Industrial Sensor Data Acquisition
The PIC16F877A-E/PT is well suited for multi-channel industrial sensor acquisition nodes thanks to its 10-bit 8-channel ADC, 14 KB Flash for protocol stacks and 368-byte RAM for sample buffering. The integrated MSSP and USART let a single chip digitize 4-20 mA or 0-10 V sensor inputs through op-amp front ends while concurrently driving an RS-485 Modbus network at 115200 bps. The -40C to +125C extended temperature grade allows deployment inside unheated outdoor cabinets or near motor drives, where commercial-grade MCUs would fail. Compared to a discrete ADC + 8051 design, the integrated peripheral set reduces PCB area to under 25x25 mm and total BOM by approximately 30%.
Recommended
Educational Microcontroller Platform
The PIC16F877A has been the de-facto teaching platform for 8-bit embedded courses for two decades because of its 35-instruction RISC-like ISA, deterministic 200 ns instruction cycle and abundant academic reference material. The /PT 44-pin TQFP package enables surface-mount soldering labs, while the same silicon in /P DIP package supports breadboard prototyping. Universities typically pair it with the MPLAB X IDE, XC8 compiler, and PICkit 3/4 programmer on the PGEC1/PGED1 ICSP pins. The 14 KB Flash is large enough for laboratory exercises covering GPIO, timers, ADC, I2C and UART peripherals, while still fitting within student-project budgets.
Recommended
Motor and Lighting PWM Control
The PIC16F877A-E/PT dual Capture/Compare/PWM (CCP) modules generate two independent PWM channels with 10-bit resolution, sufficient for DC motor speed control, LED dimming and small stepper drives. Combined with the 16-bit timer base, complementary PWM with dead-band insertion for half-bridge drivers is achievable in firmware. The integrated 10-bit ADC samples current or potentiometer feedback in real time, enabling closed-loop PI control with millisecond update rates. The 2.0V-5.5V supply range allows direct operation from a 3.3V regulator, simplifying power tree design in 3.3V-only systems while still supporting 5V peripheral drivers when needed.
Recommended
RS-232/RS-485 Communication Gateway
The PIC16F877A-E/PT USART module supports both RS-232 point-to-point and RS-485 multi-drop industrial networks at speeds up to 115200 bps, while the MSSP delivers SPI or I2C for local peripheral extension. A common gateway application uses the USART as an RS-485 Modbus master talking to field sensors, with the MSSP in I2C mode driving an EEPROM, RTC or small OLED display on the local board. The 256-byte internal EEPROM stores configuration and node address. Compared to a host-CPU + external UART design, the integrated approach reduces chip count and simplifies firmware task scheduling.
Recommended
Consumer Appliance Controllers
Mid-complexity consumer appliances - rice cookers, washing-machine control boards, microwave user interfaces and small HVAC thermostats - are exactly the segment the PIC16F877A-E/PT was designed for. The 33 GPIO pins drive multiplexed keypads, 7-segment or character LCDs, status LEDs and relay triacs without external I/O expanders. The 14 KB Flash holds state-machine firmware plus menu string tables, while the 256-byte EEPROM remembers user settings after power loss. The wide 2.0V-5.5V supply range is forgiving of rectified mains ripple, and the -40C to +125C extended temperature grade is robust against steam, oven-adjacent and unheated-closet environments.
Recommended
Battery-Powered Remote Sensor Nodes
The PIC16F877A-E/PT supports multiple low-power modes (Sleep, Idle, and Watchdog-driven wake-up) that drop quiescent current to microampere levels, making it viable for battery or solar-powered remote sensor nodes. Sleep current at 3V is typically under 1 uA with the Watchdog Timer enabled, allowing 2-5 year operation from a single 3.6V lithium AA cell when duty-cycled at 1% (e.g. one wake per minute, 50 ms active). The 10-bit ADC digitizes temperature, humidity or battery voltage during the active window, then data is logged or transmitted via UART or SPI. Brown-out reset protects against accidental writes during battery end-of-life.
Recommended
Hobbyist and Maker Projects
Despite being a 20-year-old part, the PIC16F877A remains widely used in DIY electronics, robotics and Maker Faire projects because of its enormous code-example base, low cost (under $12 in unit quantities) and broad third-party support. It integrates ADC, PWM, I2C, SPI and UART in one chip, so makers can build line-following robots, RC receivers, aquarium controllers and home automation nodes with a single IC plus a few discretes. The MPLAB X IDE and XC8 compiler are free, and the PICkit 3/4 programmer costs under $50, keeping the development barrier low. For users new to PIC microcontrollers, the 44-pin TQFP can be adapted to breadboard via a breakout board or replaced with the 40-pin DIP -P variant on the same firmware.
Recommended
Recommended Products Summary
Engineering reference data for PIC16F877A-E/PT β comparison, design guidance, and compliance information.
Selection Guide
Comparison with Alternatives
| Parameter | This Product | PIC16F877A-I/PT | PIC16F877-20I/PT | PIC16F887-E/PT | PIC16F874AT-I/PT |
|---|---|---|---|---|---|
| Brand | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology | Microchip Technology |
| Package | 44-pin TQFP (PT) | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same | 44-pin TQFP (PT) - same |
| Flash Program Memory | 14 KB (8K x 14) | 14 KB | 14 KB | 14 KB | 7 KB |
| Data SRAM | 368 bytes | 368 bytes | 368 bytes | 368 bytes | 192 bytes |
| Data EEPROM | 256 bytes | 256 bytes | 256 bytes | 256 bytes | 128 bytes |
| Max CPU Frequency | 20 MHz | 20 MHz | 20 MHz | 20 MHz | 20 MHz |
| ADC Resolution | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 8 channels | 10-bit, 14 channels | 10-bit, 8 channels |
| Operating Temperature | -40C to +125C (extended -E) | -40C to +85C (industrial -I) | -40C to +85C (industrial -I) | -40C to +125C (extended -E) | -40C to +85C (industrial -I) |
| Operating Voltage | 2.0 V to 5.5 V | 2.0 V to 5.5 V | 2.0 V to 5.5 V | 2.0 V to 5.5 V | 2.0 V to 5.5 V |
Key Differentiators
- Extended -40C to +125C temperature grade vs industrial -40C to +85C (vs PIC16F877A-I/PT)
- Drop-in 44-pin TQFP replacement with more ADC channels and lower cost (vs PIC16F887-E/PT)
- Larger 14 KB Flash vs 7 KB on PIC16F874A family (vs PIC16F874AT-I/PT)
Design Notes
Place a 100 nF decoupling capacitor as close as possible to each VDD/VSS pin pair (pins 11/12 and 31/32 on the /PT TQFP). The PIC16F877A-E/PT draws switching currents during ADC conversion and CCP PWM transitions, and inadequate decoupling causes spurious ADC readings and CCP timing jitter. For noise-sensitive analog designs, add a bulk 10 uF tantalum at the supply entry plus ferrite bead, and place a small RC filter (10 ohm + 100 nF) on AVdd if AVdd is sourced separately from Vdd. Estimated: assuming IO = 20 mA transient at 20 MHz, supply lead inductance must be under 50 nH for less than 100 mV ripple.
Keep the 20 MHz crystal (or resonator) and its loading capacitors within 5 mm of pins 13 (OSC1) and 14 (OSC2). Route the crystal traces over a continuous ground plane with no signal crossings; ground pour stitching around the oscillator area reduces radiated EMI by approximately 10-15 dB. Avoid routing the ICSP lines PGC (pin 39) and PGD (pin 40) next to the oscillator, as ICSP is sensitive to clock noise during programming. For 44-pin TQFP reflow soldering, follow JEDEC J-STD-020 with MSL-1 floor life and a peak reflow of 250C; the lead-pitch of 0.8 mm requires 0.15 mm stencil apertures for reliable paste release.
Three common pitfalls when bringing up the PIC16F877A-E/PT: (1) confusing the package suffix - /P is 40-pin DIP, /PT is 44-pin TQFP, /L is 44-pin PLCC, /ML is 44-pin QFN; the PCB land pattern is NOT interchangeable. (2) Forgetting to disable the configuration-bit PWRT (Power-up Timer) can extend startup by 72 ms, which may violate timing-sensitive USB or RS-485 enumeration windows. (3) Using an in-circuit emulator (ICE) header that loads the crystal oscillator can shift the clock frequency by several percent; always characterize timing with the production ICSP header installed. Source: Microchip PIC16F877A datasheet and Microchip TB077 application note on configuration bits.
The PIC16F877A-E/PT ADC achieves its 10-bit accuracy only when the analog source impedance is under 10 kohm; higher-impedance sensors require an op-amp buffer (such as MCP6002 or MCP6021) before the AN0-AN7 input. Acquisition time must be set to a minimum of 1.4 uS at 20 MHz to allow the internal sample capacitor to fully charge. For ESP-sensitive designs, set the ADC clock to a frequency derived from Fosc/16 or Fosc/32, not Fosc/2, to minimize digital switching noise coupling into the analog section. Estimated: at 10 kohm source impedance and 20 pF hold capacitor, the RC time constant is 200 ns, requiring approximately 1 uS acquisition time for 10-bit settling.
Compliance Information
RoHS compliant per Microchip product page. NOT AEC-Q100 qualified; for automotive designs use AEC-Q100-grade PIC16F1939 or dsPIC33 families. Halogen-free status not explicitly stated in provided web data.