Skip to the content
12345678910111213141516171819202122232425262728293031323334353637383940

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

2RA0/AN03RA1/AN14RA2/AN2/VREF-/CVREF5RA3/AN3/VREF+6RA4/T0CKI/C1OUT7RA5/AN4/SS/C2OUT33RB0/INT34RB135RB236RB3/PGM37RB438RB539RB6/PGC40RB7/PGD15RC0/T1OSO/T1CKI16RC1/T1OSI/CCP217RC2/CCP118RC3/SCK/SCL23RC4/SDI/SDA24RC5/SDO25RC6/TX/CK26RC7/RX/DT19RD0/PSP020RD1/PSP121RD2/PSP222RD3/PSP327RD4/PSP428RD5/PSP529RD6/PSP630RD7/PSP78RE0/RD/AN59RE1/WR/AN610RE2/CS/AN71MCLR/VPP13OSC1/CLKI14OSC2/CLKO11VDD32VDD12VSS31VSS
Logic:PIC16F877A-I/PFrom CERN's library

Footprint

12345678910111213141516171819202122232425262728293031323334353637383940
Package_DIP:DIP-40_W25.4mmFrom KiCad's library

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
ParameterConditionsAs printedPage
Ambient temperature under biasmin -55 · max 125 °C173
Storage temperaturemin -65 · max 150 °C173
Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4)Maximum: VDD + 0.3 Vmin -0.3 V173
Voltage on VDD with respect to VSSmin -0.3 · max 7.5 V173
Voltage on MCLR with respect to VSS (Note 2)min 0 · max 14 V173
Voltage on RA4 with respect to Vssmin 0 · max 8.5 V173
Total power dissipation (Note 1)max 1 W173
Maximum current out of VSS pinmax 300 mA173
Maximum current into VDD pinmax 250 mA173
Maximum output current sunk by any I/O pinmax 25 mA173
Maximum output current sourced by any I/O pinmax 25 mA173
Maximum current sunk byPORTA, PORTB and PORTE (combined) (Note 3)max 200 mA173
Maximum current sourced by PORTA, PORTB and PORTE (combined) (Note 3)max 200 mA173
Maximum current sunk by PORTC and PORTD (combined) (Note 3)max 200 mA173
Maximum current sourced by PORTC and PORTD (combined) (Note 3)max 200 mA173
Operating temperature TAPIC16F877A, industrialmin -40 · max 85 °C175
Supply Voltage VDD16F87XA; all configurationsmin 4 · max 5.5 V175
Supply Voltage VDDBOR enabled, FMAX = 14 MHz(7); minimum VBORmax 5.5 V175
RAM Data Retention Voltage(1) VDRtyp 1.5 V175
VDD Rise Rate to ensure internal Power-on Reset signal SVDDSee Section 14.5 Power-on Reset (POR)min 0.05 V/ms175
Brown-out Reset Voltage VBORBODEN bit in configuration word enabledmin 3.65 · typ 4 · max 4.35 V175
Supply Current(2,5) IDD16F87XA; XT, RC osc configurations, FOSC = 4 MHz, VDD = 5.5Vtyp 1.6 · max 4 mA176
Supply Current(2,5) IDD16F87XA; HS osc configuration, FOSC = 20 MHz, VDD = 5.5Vtyp 7 · max 15 mA176
Brown-out Reset Current(6) IBORBOR enabled, VDD = 5.0Vtyp 85 · max 200 A176
Power-down Current(3,5) IPD16F87XA; VDD = 4.0V, WDT enabled, -40°C to +85°Ctyp 10.5 · max 42 A177
Power-down Current(3,5) IPD16F87XA; VDD = 4.0V, WDT disabled, -40°C to +85°C; D021typ 1.5 · max 16 A177
Power-down Current(3,5) IPD16F87XA; VDD = 4.0V, WDT disabled, -40°C to +85°C; D021Atyp 1.5 · max 19 A177
Brown-out Reset Current(6) IBORBOR enabled, VDD = 5.0Vtyp 85 · max 200 A177
Input Low Voltage, I/O ports: with TTL buffer VIL4.5V ≤ VDD ≤ 5.5V; minimum VSSmax 0.8 V178
Input Low Voltage, OSC1 (in XT and LP modes) VILNote 1; minimum VSSmax 0.3 V178
Input Low Voltage, Ports RC3 and RC4: with SMBus VILFor VDD = 4.5 to 5.5Vmin -0.5 · max 0.6 V178
Input High Voltage, I/O ports: with TTL buffer VIH4.5V ≤ VDD ≤ 5.5V; maximum VDDmin 2 V178
Input High Voltage, OSC1 (in XT and LP modes) VIHNote 1; maximum VDDmin 1.6 V178
Input High Voltage, Ports RC3 and RC4: with SMBus VIHFor VDD = 4.5 to 5.5Vmin 1.4 · max 5.5 V178
PORTB Weak Pull-up Current IPURBVDD = 5V, VPIN = VSS, -40°C to +85°Cmin 50 · typ 250 · max 400 A178
Input Leakage Current(2, 3), I/O ports IILVSS ≤ VPIN ≤ VDD, pin at high-impedance; maximum ±1 uAmax 1 A178
Input Leakage Current(2, 3), MCLR, RA4/T0CKI IILVSS ≤ VPIN ≤ VDD; maximum ±5 uAmax 5 A178
Input Leakage Current(2, 3), OSC1 IILVSS ≤ VPIN ≤ VDD, XT, HS and LP osc configuration; maximum ±5 uAmax 5 A178
Output Low Voltage, I/O ports VOLIOL = 8.5 mA, VDD = 4.5V, -40°C to +85°Cmax 0.6 V179
Output Low Voltage, OSC2/CLKO (RC osc config) VOLIOL = 1.6 mA, VDD = 4.5V, -40°C to +85°Cmax 0.6 V179
Open-Drain High Voltage VODRA4 pin; characterized but not testedmax 8.5 V179
OSC2 pin COSC2Capacitive loading; in XT, HS and LP modes when external clock is used to drive OSC1max 15 pF179
All I/O pins and OSC2 (RC mode) CIOCapacitive loadingmax 50 pF179
SCL, SDA (I2C mode) CBCapacitive loadingmax 400 pF179
VDD for read/write VDRWData EEPROM Memory; using EECON to read/write, VMIN = min. operating voltage; minimum VMINmax 5.5 V179
Erase/write cycle time TDEWData EEPROM Memorytyp 4 · max 8 ms179
VDD for read VPRProgram Flash Memory; VMIN = min. operating voltage; minimum VMINmax 5.5 V179
VDD for erase/writeProgram Flash Memory; using EECON to read/write, VMIN = min. operating voltage; minimum VMINmax 5.5 V179
Erase/Write cycle time TPEWProgram Flash Memorytyp 4 · max 8 ms179
Input Offset Voltage VIOFFTypical ±5.0 mV; maximum ±10 mVtyp 5 · max 10 mV180
Input Common Mode Voltage* VICMMaximum VDD – 1.5; characterized but not testedmin 0 V180
Common Mode Rejection Ratio* CMRRCharacterized but not testedmin 55 dB180
Response Time*(1) TRESPPIC16F87XA; one input at (VDD – 1.5)/2, other input transitions from VSS to VDD; characterized but not testedtyp 150 · max 400 ns180
Comparator Mode Change to Output Valid* TMC2OVCharacterized but not testedmax 10 s180
Settling Time*(1) TSETVRR = 1 and VR<3:0> transitions from ‘0000’ to ‘1111’; characterized but not testedmax 10 s180
OSC1  to CLKO  TOSH2CKLNote 1; RC mode, CLKO output is 4 x TOSC; characterized but not testedtyp 75 · max 200 ns183
OSC1  to CLKO  TOSH2CKHNote 1; RC mode, CLKO output is 4 x TOSC; characterized but not testedtyp 75 · max 200 ns183
CLKO Rise Time TCKRNote 1; RC mode, CLKO output is 4 x TOSC; characterized but not testedtyp 35 · max 100 ns183
CLKO Fall Time TCKFNote 1; RC mode, CLKO output is 4 x TOSC; characterized but not testedtyp 35 · max 100 ns183
Port In Hold after CLKO  TCKH2IOINote 1; characterized but not testedmin 0 ns183
OSC1  (Q1 cycle) to Port Out Valid TOSH2IOVCharacterized but not testedtyp 100 · max 255 ns183
OSC1  (Q2 cycle) to Port Input Invalid (I/O in hold time) TOSH2IOIStandard (F); characterized but not testedmin 100 ns183
Port Input Valid to OSC1 (I/O in setup time) TIOV2OSHCharacterized but not testedmin 0 ns183
Port Output Rise Time TIORStandard (F); characterized but not testedtyp 10 · max 40 ns183
Port Output Fall Time TIOFStandard (F); characterized but not testedtyp 10 · max 40 ns183
Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4)Maximum = VDD + 0.3Vmin -0.3 V173
Voltage on MCLR with respect to VSSNote 2min 0 · max 14 V173
Total power dissipationNote 1max 1 W173
Maximum current sunk by PORTA, PORTB and PORTE (combined)Note 3max 200 mA173
Maximum current sourced by PORTA, PORTB and PORTE (combined)Note 3max 200 mA173
Maximum current sunk by PORTC and PORTD (combined)Note 3max 200 mA173
Maximum current sourced by PORTC and PORTD (combined)Note 3max 200 mA173
Supply Voltage VDD16F87XA, all configurations, DC to 10 MHzmin 4 · max 5.5 V175
Supply Voltage VDD16F87XA, BOR enabled, FMAX = 14 MHz; minimum = VBORmax 5.5 V175
RAM Data Retention Voltage VDRNote 1typ 1.5 V175
VDD Rise Rate to ensure internal Power-on Reset signal SVDDSee Section 14.5min 0.05 V/ms175
Supply Current IDD16F87XA, XT, RC osc configurations, FOSC = 4 MHz, VDD = 5.5Vtyp 1.6 · max 4 mA176
Supply Current IDD16F87XA, HS osc configuration, FOSC = 20 MHz, VDD = 5.5Vtyp 7 · max 15 mA176
Brown-out Reset Current IBORBOR enabled, VDD = 5.0V; additional currenttyp 85 · max 200 A176
Power-down Current IPD16F87XA, VDD = 4.0V, WDT enabled, -40°C to +85°Ctyp 10.5 · max 42 A177
Power-down Current IPD16F87XA, VDD = 4.0V, WDT disabled, -40°C to +85°C; D021typ 1.5 · max 16 A177
Power-down Current IPD16F87XA, VDD = 4.0V, WDT disabled, -40°C to +85°C; D021Atyp 1.5 · max 19 A177
Brown-out Reset Current IBORBOR enabled, VDD = 5.0V; additional currenttyp 85 · max 200 A177

Open-source boards using it

6
  • 2 layers130 × 95 mmDigclockv1, the printed circuit board in 3D

    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 mmTACHYM, the printed circuit board in 3D

    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 layers191.7 × 104.9 mmVersion current, the printed circuit board in 3D

    Version current

    oomlout/oomlout_oomp_project_src

    117 parts

Parts like it

8

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.