
PIC16F877A-I/P
Microchip TechnologyExtended
-40℃~+85℃ 10bit 14KB 20MHz 256Byte 33 368Byte 4V~5.5V 8 Bit External FLASH PIC DIP-40 Microcontrollers (MCU/MPU/SOC) ROHS
- Part id
- microchip/PIC16F877A-I/P
- Category
- Microcontrollers (MCU, MPU, SOC)
- Package
- DIP-40
- Pins
- 40
- In stock
- 64 at JLCPCB (C8766)
- Used on
- 6 open-source boards
Overview
The PIC16F877A-I/P is a microcontroller made by Microchip Technology in a DIP-40 package with 40 pins. -40℃~+85℃ 10bit 14KB 20MHz 256Byte 33 368Byte 4V~5.5V 8 Bit External FLASH PIC DIP-40 Microcontrollers (MCU/MPU/SOC) ROHS.
PCBKit's library has its KiCad symbol (Logic:PIC16F877A-I/P, from CERN's library) and its footprint (Package_DIP:DIP-40_W25.4mm, from KiCad's library), ready for a KiCad board. 64 are in stock at JLCPCB (part C8766). 6 open-source boards in 5 repositories on GitHub use it.
Symbol
Footprint
From the datasheet
10- Supply, least
- 4 V · VDD, recommended operating min, all configurations · p. 175
- Supply, most
- 5.5 V · VDD, recommended operating max, all configurations · p. 175
- Supply, absolute maximum
- 7.5 V · VDD, absolute max relative to VSS · p. 173
- Works from
- -40 °C · Industrial operating ambient min · p. 175
- Works up to
- 85 °C · Industrial operating ambient max · p. 175
- Takes working
- 7 mA · VDD typical, HS oscillator, 20 MHz, VDD = 5.5 V · p. 176
- Takes at most
- 15 mA · VDD max, HS oscillator, 20 MHz, VDD = 5.5 V · p. 176
- Takes asleep
- 1.5 µA · VDD typical power-down, WDT disabled, VDD = 4.0 V · p. 177
- A pin gives at most
- 25 mA · Absolute max current sunk by any I/O pin · p. 173
- Edge
- 10 ns · Typical port output rise time, Standard (F) · p. 183
What it is and has
18- Operating Frequency
- DC – 20 MHz · p. 5
- Flash Program Memory
- 8K × 14-bit words · p. 5
- Data Memory
- 368 bytes · p. 5
- EEPROM Data Memory
- 256 bytes · p. 5
- Interrupts
- 15 · p. 5
- I/O Ports
- Ports A, B, C, D, E · p. 5
- Timers
- 3 · p. 5
- Capture/Compare/PWM modules
- 2 · p. 5
- Serial Communications
- MSSP, USART · p. 5
- Parallel Communications
- PSP · p. 5
- ADC
- 10-bit, 8 input channels · p. 5
- Analog Comparators
- 2 · p. 5
- Instruction Set
- 35 Instructions · p. 5
- CPU
- High-Performance RISC · p. 1
- Instruction set
- 35 single-word instructions · p. 1
- Clock input
- DC – 20 MHz · p. 1
- Protection
- Brown-out Reset (BOR) · p. 1
- Analog comparators
- 2 · p. 1
Around it
3- cap 33 pF
- between T1OSI and VSS; C1 for optional Timer1 LP oscillator at 32 kHz; design guidance only. · p. 59
- cap 15 pF
- between T1OSI and VSS; C1 for optional Timer1 oscillator at 100 kHz; design guidance only. · p. 59
- cap 15 pF
- between T1OSI and VSS; C1 for optional Timer1 oscillator at 200 kHz; design guidance only. · p. 59
Specifications
83| Parameter | Conditions | As printed | Page |
|---|---|---|---|
| Ambient temperature under bias | min -55 · max 125 °C | 173 | |
| Storage temperature | min -65 · max 150 °C | 173 | |
| Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4) | Maximum: VDD + 0.3 V | min -0.3 V | 173 |
| Voltage on VDD with respect to VSS | min -0.3 · max 7.5 V | 173 | |
| Voltage on MCLR with respect to VSS (Note 2) | min 0 · max 14 V | 173 | |
| Voltage on RA4 with respect to Vss | min 0 · max 8.5 V | 173 | |
| Total power dissipation (Note 1) | max 1 W | 173 | |
| Maximum current out of VSS pin | max 300 mA | 173 | |
| Maximum current into VDD pin | max 250 mA | 173 | |
| Maximum output current sunk by any I/O pin | max 25 mA | 173 | |
| Maximum output current sourced by any I/O pin | max 25 mA | 173 | |
| Maximum current sunk byPORTA, PORTB and PORTE (combined) (Note 3) | max 200 mA | 173 | |
| Maximum current sourced by PORTA, PORTB and PORTE (combined) (Note 3) | max 200 mA | 173 | |
| Maximum current sunk by PORTC and PORTD (combined) (Note 3) | max 200 mA | 173 | |
| Maximum current sourced by PORTC and PORTD (combined) (Note 3) | max 200 mA | 173 | |
| Operating temperature TA | PIC16F877A, industrial | min -40 · max 85 °C | 175 |
| Supply Voltage VDD | 16F87XA; all configurations | min 4 · max 5.5 V | 175 |
| Supply Voltage VDD | BOR enabled, FMAX = 14 MHz(7); minimum VBOR | max 5.5 V | 175 |
| RAM Data Retention Voltage(1) VDR | typ 1.5 V | 175 | |
| VDD Rise Rate to ensure internal Power-on Reset signal SVDD | See Section 14.5 Power-on Reset (POR) | min 0.05 V/ms | 175 |
| Brown-out Reset Voltage VBOR | BODEN bit in configuration word enabled | min 3.65 · typ 4 · max 4.35 V | 175 |
| Supply Current(2,5) IDD | 16F87XA; XT, RC osc configurations, FOSC = 4 MHz, VDD = 5.5V | typ 1.6 · max 4 mA | 176 |
| Supply Current(2,5) IDD | 16F87XA; HS osc configuration, FOSC = 20 MHz, VDD = 5.5V | typ 7 · max 15 mA | 176 |
| Brown-out Reset Current(6) IBOR | BOR enabled, VDD = 5.0V | typ 85 · max 200 A | 176 |
| Power-down Current(3,5) IPD | 16F87XA; VDD = 4.0V, WDT enabled, -40°C to +85°C | typ 10.5 · max 42 A | 177 |
| Power-down Current(3,5) IPD | 16F87XA; VDD = 4.0V, WDT disabled, -40°C to +85°C; D021 | typ 1.5 · max 16 A | 177 |
| Power-down Current(3,5) IPD | 16F87XA; VDD = 4.0V, WDT disabled, -40°C to +85°C; D021A | typ 1.5 · max 19 A | 177 |
| Brown-out Reset Current(6) IBOR | BOR enabled, VDD = 5.0V | typ 85 · max 200 A | 177 |
| Input Low Voltage, I/O ports: with TTL buffer VIL | 4.5V ≤ VDD ≤ 5.5V; minimum VSS | max 0.8 V | 178 |
| Input Low Voltage, OSC1 (in XT and LP modes) VIL | Note 1; minimum VSS | max 0.3 V | 178 |
| Input Low Voltage, Ports RC3 and RC4: with SMBus VIL | For VDD = 4.5 to 5.5V | min -0.5 · max 0.6 V | 178 |
| Input High Voltage, I/O ports: with TTL buffer VIH | 4.5V ≤ VDD ≤ 5.5V; maximum VDD | min 2 V | 178 |
| Input High Voltage, OSC1 (in XT and LP modes) VIH | Note 1; maximum VDD | min 1.6 V | 178 |
| Input High Voltage, Ports RC3 and RC4: with SMBus VIH | For VDD = 4.5 to 5.5V | min 1.4 · max 5.5 V | 178 |
| PORTB Weak Pull-up Current IPURB | VDD = 5V, VPIN = VSS, -40°C to +85°C | min 50 · typ 250 · max 400 A | 178 |
| Input Leakage Current(2, 3), I/O ports IIL | VSS ≤ VPIN ≤ VDD, pin at high-impedance; maximum ±1 uA | max 1 A | 178 |
| Input Leakage Current(2, 3), MCLR, RA4/T0CKI IIL | VSS ≤ VPIN ≤ VDD; maximum ±5 uA | max 5 A | 178 |
| Input Leakage Current(2, 3), OSC1 IIL | VSS ≤ VPIN ≤ VDD, XT, HS and LP osc configuration; maximum ±5 uA | max 5 A | 178 |
| Output Low Voltage, I/O ports VOL | IOL = 8.5 mA, VDD = 4.5V, -40°C to +85°C | max 0.6 V | 179 |
| Output Low Voltage, OSC2/CLKO (RC osc config) VOL | IOL = 1.6 mA, VDD = 4.5V, -40°C to +85°C | max 0.6 V | 179 |
| Open-Drain High Voltage VOD | RA4 pin; characterized but not tested | max 8.5 V | 179 |
| OSC2 pin COSC2 | Capacitive loading; in XT, HS and LP modes when external clock is used to drive OSC1 | max 15 pF | 179 |
| All I/O pins and OSC2 (RC mode) CIO | Capacitive loading | max 50 pF | 179 |
| SCL, SDA (I2C mode) CB | Capacitive loading | max 400 pF | 179 |
| VDD for read/write VDRW | Data EEPROM Memory; using EECON to read/write, VMIN = min. operating voltage; minimum VMIN | max 5.5 V | 179 |
| Erase/write cycle time TDEW | Data EEPROM Memory | typ 4 · max 8 ms | 179 |
| VDD for read VPR | Program Flash Memory; VMIN = min. operating voltage; minimum VMIN | max 5.5 V | 179 |
| VDD for erase/write | Program Flash Memory; using EECON to read/write, VMIN = min. operating voltage; minimum VMIN | max 5.5 V | 179 |
| Erase/Write cycle time TPEW | Program Flash Memory | typ 4 · max 8 ms | 179 |
| Input Offset Voltage VIOFF | Typical ±5.0 mV; maximum ±10 mV | typ 5 · max 10 mV | 180 |
| Input Common Mode Voltage* VICM | Maximum VDD – 1.5; characterized but not tested | min 0 V | 180 |
| Common Mode Rejection Ratio* CMRR | Characterized but not tested | min 55 dB | 180 |
| Response Time*(1) TRESP | PIC16F87XA; one input at (VDD – 1.5)/2, other input transitions from VSS to VDD; characterized but not tested | typ 150 · max 400 ns | 180 |
| Comparator Mode Change to Output Valid* TMC2OV | Characterized but not tested | max 10 s | 180 |
| Settling Time*(1) TSET | VRR = 1 and VR<3:0> transitions from ‘0000’ to ‘1111’; characterized but not tested | max 10 s | 180 |
| OSC1 to CLKO TOSH2CKL | Note 1; RC mode, CLKO output is 4 x TOSC; characterized but not tested | typ 75 · max 200 ns | 183 |
| OSC1 to CLKO TOSH2CKH | Note 1; RC mode, CLKO output is 4 x TOSC; characterized but not tested | typ 75 · max 200 ns | 183 |
| CLKO Rise Time TCKR | Note 1; RC mode, CLKO output is 4 x TOSC; characterized but not tested | typ 35 · max 100 ns | 183 |
| CLKO Fall Time TCKF | Note 1; RC mode, CLKO output is 4 x TOSC; characterized but not tested | typ 35 · max 100 ns | 183 |
| Port In Hold after CLKO TCKH2IOI | Note 1; characterized but not tested | min 0 ns | 183 |
| OSC1 (Q1 cycle) to Port Out Valid TOSH2IOV | Characterized but not tested | typ 100 · max 255 ns | 183 |
| OSC1 (Q2 cycle) to Port Input Invalid (I/O in hold time) TOSH2IOI | Standard (F); characterized but not tested | min 100 ns | 183 |
| Port Input Valid to OSC1 (I/O in setup time) TIOV2OSH | Characterized but not tested | min 0 ns | 183 |
| Port Output Rise Time TIOR | Standard (F); characterized but not tested | typ 10 · max 40 ns | 183 |
| Port Output Fall Time TIOF | Standard (F); characterized but not tested | typ 10 · max 40 ns | 183 |
| Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4) | Maximum = VDD + 0.3V | min -0.3 V | 173 |
| Voltage on MCLR with respect to VSS | Note 2 | min 0 · max 14 V | 173 |
| Total power dissipation | Note 1 | max 1 W | 173 |
| Maximum current sunk by PORTA, PORTB and PORTE (combined) | Note 3 | max 200 mA | 173 |
| Maximum current sourced by PORTA, PORTB and PORTE (combined) | Note 3 | max 200 mA | 173 |
| Maximum current sunk by PORTC and PORTD (combined) | Note 3 | max 200 mA | 173 |
| Maximum current sourced by PORTC and PORTD (combined) | Note 3 | max 200 mA | 173 |
| Supply Voltage VDD | 16F87XA, all configurations, DC to 10 MHz | min 4 · max 5.5 V | 175 |
| Supply Voltage VDD | 16F87XA, BOR enabled, FMAX = 14 MHz; minimum = VBOR | max 5.5 V | 175 |
| RAM Data Retention Voltage VDR | Note 1 | typ 1.5 V | 175 |
| VDD Rise Rate to ensure internal Power-on Reset signal SVDD | See Section 14.5 | min 0.05 V/ms | 175 |
| Supply Current IDD | 16F87XA, XT, RC osc configurations, FOSC = 4 MHz, VDD = 5.5V | typ 1.6 · max 4 mA | 176 |
| Supply Current IDD | 16F87XA, HS osc configuration, FOSC = 20 MHz, VDD = 5.5V | typ 7 · max 15 mA | 176 |
| Brown-out Reset Current IBOR | BOR enabled, VDD = 5.0V; additional current | typ 85 · max 200 A | 176 |
| Power-down Current IPD | 16F87XA, VDD = 4.0V, WDT enabled, -40°C to +85°C | typ 10.5 · max 42 A | 177 |
| Power-down Current IPD | 16F87XA, VDD = 4.0V, WDT disabled, -40°C to +85°C; D021 | typ 1.5 · max 16 A | 177 |
| Power-down Current IPD | 16F87XA, VDD = 4.0V, WDT disabled, -40°C to +85°C; D021A | typ 1.5 · max 19 A | 177 |
| Brown-out Reset Current IBOR | BOR enabled, VDD = 5.0V; additional current | typ 85 · max 200 A | 177 |
Open-source boards using it
6- 2 layers75 × 90 mm

- 2 layers130 × 95 mm

Digclockv1
Rishvanth-SK-2002/8051-Digital-Clock
Bare-metal 8051 digital clock and alarm with custom KiCad PCB and assembly firmware.
51 parts - 2 layers72.8 × 72.8 mm

TACHYM
AssaadMH/power-electronics-simulation
AC power controllers, a 0–10 V industrial dimmer, a digital tachometer and a brushless drive, designed and simulated end to end.
23 parts1MIT - 2 layers200.7 × 123.2 mm

- 2 layers191.7 × 104.9 mm

- 2 layers191.7 × 104.9 mm

Parts like it
8STC89C516RD+40I-PDIP40
DIP-403.5V~5.5V 35 51 Family 61KB FLASH DIP-40 Microcontrollers (MCU/MPU/SOC) ROHSSTC MicroMicrocontrollers (MCU/MPU/SOC)STC89C52RC-40I-PDIP40
DIP-403.3V~5.5V 51 Family 8KB FLASH DIP-40 Microcontrollers (MCU/MPU/SOC) ROHSSTCMicrocontrollers (MCU/MPU/SOC)AT89S52-24PU
DIP-40-40℃~+85℃ 24MHz 256Byte 32 4V~5.5V 51 Family 8 Bit 8KB Built-in FLASH DIP-40 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)PIC18F45K80-I/P
PDIP-40-40℃~+85℃ 1.8V~5.5V 12bit 1KB 3.6KB 32KB 35 64MHz 8 Bit Built-in FLASH PIC PDIP-40 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)STC12C5A60S2-35I-PDIP40
DIP-4010bit 35MHz 36 4V~5.5V 51 Family 60KB FLASH DIP-40 Microcontrollers (MCU/MPU/SOC) ROHSSTCMicrocontrollers (MCU/MPU/SOC)AT89C55WD-24PU
DIP-40-40℃~+85℃ 20KB 24MHz 256Byte 32 4.5V~5.5V 51 Family 8 Bit Built-in FLASH DIP-40 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)PIC16F887-I/P
PDIP-4010bit 14KB 20MHz 2V~5.5V 35 PIC PDIP-40 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)PIC18F4520-I/P
PDIP-40-40℃~+85℃ 1.5KB 10bit 256Byte 32KB 36 4.2V~5.5V 40MHz 8 Bit Built-in FLASH PIC PDIP-40 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)
Questions
Is there a KiCad symbol and footprint for the PIC16F877A-I/P?
Yes. The symbol is Logic:PIC16F877A-I/P and the footprint Package_DIP:DIP-40_W25.4mm, both drawn on this page. PCBKit places them on a board for you when you design with it.
What package is the PIC16F877A-I/P?
DIP-40, with 40 pins. Its footprint is drawn on this page.
Where is the PIC16F877A-I/P datasheet?
Microchip Technology publishes it: the Datasheet link on this page opens it.
Where can I order the PIC16F877A-I/P?
JLCPCB lists it as part C8766, with 64 in stock; the sellers' links on this page open their listings.
What can replace the PIC16F877A-I/P?
Parts like it in the library: the STC89C516RD+40I-PDIP40 by STC Micro, the STC89C52RC-40I-PDIP40 by STC, the AT89S52-24PU by Microchip Technology and the PIC18F45K80-I/P by Microchip Technology. Check their datasheets: a part that fits the footprint may still differ in its ratings.
Which open-source boards use the PIC16F877A-I/P?
6 boards in 5 repositories on GitHub; the most starred are listed on this page, with their KiCad files.