Skip to main content

We use cookies to understand how you use our site and improve your experience. See our Privacy Policy.

PIC16F877A

8-bit Flash Microcontroller

The PIC16F877A is a 8-bit flash microcontroller from Microchip Technology. View the full PIC16F877A datasheet below including key specifications, electrical characteristics, absolute maximum ratings.

PIC16F877A shares its datasheet with PIC16F877, whose page lists every part number it covers.

Official PIC16F877A datasheet (PDF) — the source this page was extracted from.

PIC16F877A Key Specifications

ParameterValue
ADC10-bit, 8 channels
Timers2x 8-bit, 1x 16-bit
I/O Pins33
Data EEPROM256 bytes
Program Memory8K x 14 words Flash (14.3 KB)
Supply Voltage2.0V to 5.5V
Flash Endurance100,000 erase/write cycles typical
EEPROM Endurance1,000,000 erase/write cycles typical
EEPROM Retention>40 years
Data Memory (RAM)368 bytes
Instruction Cycle200 ns
Analog Comparators2
Operating FrequencyDC to 20 MHz
Operating Temperature-40°C to +85°C (Industrial)
Communication InterfacesMSSP (SPI, I2C), USART, Parallel Slave Port
Capture/Compare/PWM Modules2

PIC16F877A Overview

Part: PIC16F877A (PIC16F873A/874A/876A/877A family) — Microchip Technology

Type: 8-bit Enhanced Flash Microcontroller (PIC16 mid-range RISC)

Description: 8-bit Flash MCU with up to 20 MHz clock, 8K x 14-word Flash program memory, 368 bytes RAM, 256 bytes EEPROM, 10-bit 8-channel ADC and a 2.0–5.5 V supply range.

Operating Conditions:

  • Supply voltage: 2.0–5.5 V
  • Operating temperature: -40 to +85 °C (industrial; extended grade -40 to +125 °C is ordering-grade dependent)
  • Clock: DC–20 MHz (200 ns instruction cycle)

Absolute Maximum Ratings:

  • Max supply voltage (VDD with respect to VSS): -0.3 to +7.5 V
  • Max current into VDD pin: 250 mA
  • Max current out of VSS pin: 300 mA
  • Max current per I/O pin: 25 mA sunk or sourced
  • Storage temperature: -65 to +150 °C
  • Ambient temperature under bias: -55 to +125 °C
  • Total power dissipation: 1.0 W

Key Specs:

  • Program memory: 8K x 14-word Flash (PIC16F877A/876A), 4K words (PIC16F873A/874A)
  • Data RAM: 368 bytes (876A/877A), 192 bytes (873A/874A)
  • Data EEPROM: 256 bytes (876A/877A), 128 bytes (873A/874A)
  • I/O pins: 33 on the 40/44-pin devices (874A/877A), 22 on the 28-pin devices (873A/876A)
  • ADC: 10-bit, 8 channels on 40/44-pin devices, 5 channels on 28-pin devices
  • Timers: two 8-bit and one 16-bit; 2 CCP modules (16-bit capture and compare, 10-bit PWM)
  • Flash endurance: 100,000 erase/write cycles typical; EEPROM endurance 1,000,000 cycles typical, retention over 40 years
  • Voltage on MCLR: 0 to +14 V; voltage on RA4: 0 to +8.5 V (absolute maximum)

Features:

  • 35 single-word instructions; all single-cycle except branches
  • MSSP with SPI (master) and I²C (master/slave)
  • USART/SCI with 9-bit address detection
  • Parallel Slave Port (40/44-pin devices only)
  • Two analog comparators with programmable on-chip voltage reference
  • Brown-out Reset, Power-on Reset, Watchdog Timer with its own RC oscillator
  • Self-reprogrammable Flash, ICSP via two pins, In-Circuit Debug, programmable code protection
  • Sleep power-saving mode

Applications:

  • General-purpose embedded control

Package:

  • 40-pin PDIP (PIC16F874A/877A)
  • 44-pin PLCC
  • 44-pin TQFP
  • 44-pin QFN
  • 28-pin PDIP, SOIC, SSOP and QFN (PIC16F873A/876A)

PIC16F877A Features

  • Timer0: 8-bit timer/counter with 8-bit prescaler
  • Timer1: 16-bit timer/counter with prescaler, can be incremented during Sleep via external crystal/clock
  • Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
  • Two Capture, Compare, PWM modules
  • -Capture is 16-bit, max. resolution is 12.5 ns
  • -Compare is 16-bit, max. resolution is 200 ns
  • -PWM max. resolution is 10-bit
  • Synchronous Serial Port (SSP) with SPI (Master mode) and I 2 C™ (Master/Slave)
  • Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection
  • Parallel Slave Port (PSP) - 8 bits wide with external RD, WR and CS controls (40/44-pin only)
  • Brown-out detection circuitry for Brown-out Reset (BOR)

PIC16F877A Pin Configuration

In Capture mode, the RC2/CCP1 pin should be configured as an input by setting the TRISC<2> bit.

Note: If the RC2/CCP1 pin is configured as an output, a write to the port can cause a Capture condition.

PIC16F877A Electrical Characteristics

PIC16LF873A/874A/876A/877A (Industrial)

PIC16LF873A/874A/876A/877A (Industrial) - PIC16F873A/874A/876A/877A (Industrial, Extended) - Param No.PIC16LF873A/874A/876A/877A (Industrial) - PIC16F873A/874A/876A/877A (Industrial, Extended) - SymbolPIC16LF873A/874A/876A/877A (Industrial) - PIC16F873A/874A/876A/877A (Industrial, Extended) - Characteristic/ DeviceStandard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial - Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial -40°C T A +125°C for extended - MinStandard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial - Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial -40°C T A +125°C for extended - Typ†Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial - Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial -40°C T A +125°C for extended - MaxStandard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial - Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial -40°C T A +125°C for extended - UnitsStandard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial - Standard Operating Conditions (unless otherwise stated) Operating temperature -40°C T A +85°C for industrial -40°C T A +125°C for extended - Conditions
D001VDDSupply VoltageSupply VoltageSupply VoltageSupply VoltageSupply VoltageSupply Voltage
D001VDD16LF87XA2.0-5.5VAll configurations (DC to 10 MHz)
D001 D001A16F87XA4.0 VBOR-5.5 5.5V VAll configurations BOR enabled, FMAX = 14 MHz (7)
D002VDRRAM Data Retention Voltage (1)-1.5-V
D003VPORVDD Start Voltage to ensure internal Power-on Reset signal-VSS-VSee Section 14.5 'Power-on Reset (POR)' for details
D004SVDDVDD Rise Rate to ensure internal Power-on Reset signal0.05--V/msSee Section 14.5 'Power-on Reset (POR)' for details
D005VBORBrown-out Reset Voltage3.654.04.35VBODEN bit in configuration word enabled

Legend: Rows with standard voltage device data only are shaded for improved readability.

  • † Data in 'Typ' column is at 5V, 25°C, unless otherwise stated. These parameters are for design guidance only and are not tested.

Note

  • 1: This is the limit to which VDD can be lowered without losing RAM data.
  • 2: The supply current is mainly a function of the operating voltage and frequency. Other factors, such as I/O pin loading, switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption.

The test conditions for all IDD measurements in active operation mode are:

OSC1 = external square wave, from rail-to-rail; all I/O pins tri-stated, pulled to VDD; MCLR = VDD; WDT enabled/disabled as specified.

  • 3: The power-down current in Sleep mode does not depend on the oscillator type. Power-down current is measured with the part in Sleep mode, with all I/O pins in high-impedance state and tied to VDD and VSS.
  • 4: For RC osc configuration, current through REXT is not included. The current through the resistor can be estimated by the formula Ir = VDD/2REXT (mA) with REXT in k .
  • 5: Timer1 oscillator (when enabled) adds approximately 20 A to the specification. This value is from characterization and is for design guidance only. This is not tested.
  • 6: The current is the additional current consumed when this peripheral is enabled. This current should be added to the base IDD or IPD measurement.
  • 7: When BOR is enabled, the device will operate correctly until the VBOR voltage trip point is reached.

PIC16F877A Absolute Maximum Ratings

Ambient temperature under bias.................................................................................................................-55to +125°C
Storage temperature .............................................................................................................................. -65°Cto +150°C
Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4) ......................................... -0.3V to (VDD+ 0.3V)
Voltage on VDD with respect to VSS ............................................................................................................-0.3 to +7.5V
Voltage on MCLR with respect to VSS (Note 2) .................................................................................................0to +14V
Voltage on RA4 with respect to Vss..................................................................................................................0to +8.5V
Total power dissipation (Note 1) ...............................................................................................................................1.0W
Maximum current out of VSS pin ...........................................................................................................................300mA
Maximum current into VDD pin ..............................................................................................................................250mA
Input clamp current, I IK (V I < 0 or VI > VDD)20 mA
Output clamp current, I OK (VO < 0 or VO > VDD)20 mA
Maximum output current sunk by any I/O pin..........................................................................................................25mA
Maximum output current sourced by any I/O pin ....................................................................................................25mA
Maximum current sunk by PORTA, PORTB and PORTE (combined) (Note 3) ....................................................200mA
Maximum current sourced by PORTA, PORTB and PORTE (combined) (Note 3) ...............................................200mA
Maximum current sunk by PORTC and PORTD (combined) (Note 3) .................................................................200mA
Maximum current sourced by PORTC and PORTD (combined) (Note 3) ............................................................200mA

Note 1: Power dissipation is calculated as follows: Pdis = VDD x {IDD - IOH} + {(VDD - VOH) x IOH} + (VOl x IOL)

2: Voltage spikes below VSS at the MCLR pin, inducing currents greater than 80 mA, may cause latch-up. Thus, a series resistor of 50-100 should be used when applying a 'low' level to the MCLR pin rather than pulling this pin directly to VSS.

  • 3: PORTD and PORTE are not implemented on PIC16F873A/876A devices.

† NOTICE: Stresses above those listed under 'Absolute Maximum Ratings' may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability.

FIGURE 17-1: PIC16F87XA VOLTAGE-FREQUENCY GRAPH (INDUSTRIAL, EXTENDED)

FIGURE 17-2: PIC16LF87XA VOLTAGE-FREQUENCY GRAPH (INDUSTRIAL)

Variants on the same datasheet

These parts have exact links to the same datasheet. They are candidates to compare, not verified drop-in replacements; check package, pinout and electrical limits.

Part NumberManufacturerPackage
PIC16F877Microchip Technology—
PIC16F877A-I/PMicrochip Technology40-DIP (0.600", 15.24mm)

Other Microcontrollers (MCU)

All Microcontrollers (MCU) datasheetsAll Microchip Technology datasheets (600)

Data on this page is extracted from publicly available manufacturer datasheets using automated tools including AI. It may contain errors or omissions. Always verify specifications against the official manufacturer datasheet before making design or purchasing decisions. See our Terms of Service. Rights holders can submit a takedown request.

Ask your AI agent about the PIC16F877A

Connect SheetsData to Claude, Cursor, Codex or any MCP client and your agent reads this datasheet for you: pinout, limits, register maps and design checks, with the numbers taken from the PDF.

claude mcp add --transport http sheetsdata https://mcp.sheetsdata.com/mcp

Then ask: "Can the PIC16F877A run from my 12 V rail? Check it against the datasheet limits."

Create a free account $2 of usage every month, no card needed.