ATTENTION: Due to increased demand and order volume, processing time may take an additional 1-3 business days.
HomeCommunitySubjectPIC16F887 8-bit Microcontroller: Programming, Datasheet and Pinout

PIC16F887 8-bit Microcontroller: Programming, Datasheet and Pinout

Embedded - Microcontrollers IC MCU 8BIT 14KB FLASH 40DIP The PIC16F887 is an 8-bit microcontroller from Microchip. This post covers pinout, programming, datasheet, specifications, tutorial, and other details about the PIC16F887 microcontroller. Furthermore, there is a huge range of semiconductors, capacitors, resistors, and ICs in stock. Welcome your RFQ!

15801

Oct 7, 2021

Yvette Gresham

Microcontroller PIC16F887 Video 01 Introduction to Microcontroller

 

Embedded - Microcontrollers IC MCU 8BIT 14KB FLASH 40DIP

The PIC16F887 is an 8-bit microcontroller from Microchip. This post covers pinout, programming, datasheet, specifications, tutorial, and other details about the PIC16F887 microcontroller. Furthermore, there is a huge range of semiconductors, capacitors, resistors, and ICs in stock. Welcome your RFQ!

PIC16F887-E/P

1773In Stock
Min.: 1 Mult.: 1
Quantity Unit Price Ext. Price
1+ $9.21755$9.22
10+ $8.6958$86.96
100+ $8.20359$820.36
500+ $7.73924$3869.62
1000+ $7.30117$7301.17
Unit Price:$9.21755
Subtotal: $9.22
Looking for a better price? Want a lower wholesale price? Please send an RFQ, and we will respond immediately.
Quick Links

PIC16F887 Pinout

Pin   Number Pin Name Description
1 MCLR/Vpp/RE3 MCLR is used during   programming, mostly connected to programmers like PicKit or 3rd pin of PORTE
2 RA0/AN0 Analog pin 0 or 0th   pin of PORTA
3 RA1/AN1 Analog pin 1 or 1st   pin of PORTA
4 RA2/AN2/Vref- Analog pin 2 or 2nd   pin of PORTA
5 RA3/AN3/Vref+ Analog pin 3 or 3rd   pin of PORTA
6 RA4/T0CKI/C1out 4th pin of PORTA
7 RA5/AN4/SS/C2out Analog pin 4 or 5th   pin of PORTA
8 RE0/RD/AN5 Analog pin 5 or 0th   pin of PORTE
9 RE1/WR/AN6 Analog pin 6 or 1st   pin of PORTE
10 RE2/CS/AN7 Analog pin 6  or   2nd pin of PORTE
11 Vdd Ground pin of MCU
12 Vss Positive pin of MCU   (+5V)
13 RA7/OSC1/CLKI External   Oscillator/clock input pin or 7th pin of PORTA
14 RA6/OSC2/CLKO External   Oscillator/clock output pin or 6th pin of PORTA
15 RC0/T1OSO/T1CKI 0th pin of PORT C
16 RC1/T1OSI/CCP2 1st pin of POCTC or   Timer/PWM pin
17 RC2/CCP1 2nd pin of POCTC or   Timer/PWM pin
18 RC3/SCK/SCL 3rd pin of POCTC
19 RD0 0th pin of POCTD
20 RD1 1st pin of POCTD
21 RD2 2nd pin of POCTD
22 RD3 3rd pin of POCTD
23 RC4/SDI/SDA 4th pin of POCTC or   Serial Data in pin
24 RC5/SDO 5th pin of POCTC or   Serial Data Out pin
25 RC6/Tx/CK 6th pin of POCTC or   Transmitter pin of Microcontroller
26 RC7/Rx/DT 7th pin of POCTC or   Receiver pin of Microcontroller
27 RD4 4th pin of POCTD
28 RD5/P1B 5th pin of POCTD
29 RD6/P1C 6th pin of POCTD
30 RD7/P1D 7th pin of POCTD
31 Vss Positive pin of MCU   (+5V)
32 Vdd Ground pin of MCU
33 RB0/INT 0th pin of POCTB or   External Interrupt pin
34 RB1/AN10 Analog pin 10    or 1st pin of POCTB
35 RB2 /AN8 Analog pin 8  or   2nd pin of POCTB
36 RB3/PGM/AN9 Analog pin 9 or 3rd   pin of POCTB or connected to the programmer
37 RB4/AN11 Analog pin 11    or 4th pin of POCTB
38 RB5/AN13 Analog pin 13    or 5th pin of POCTB
39 RB6/PGC 6th pin of POCTB or   connected to the programmer
40 RB7/PGD 7th pin of POCTB or   connected to the programmer

What is PIC16F887?

The PIC16F887 is an 8-bit microcontroller featuring RSIC CPU technology, which allows it to produce maximum output while consuming little power. It has a total of 40 pins, all of which are packaged in numerous ways to meet the needs of tiny and modern circuits. QFN and TQFP packages with 44 pins are also available. PIC16F887 gives developers access to all modern protocols, and because of its numerous pins, most protocols can be tracked at the same time without interfering with others.

PIC16F887 CAD Model

PIC16F887 Symbol

PIC16F887 Footprint

PIC16F887 3D Model

Specifications

PIC16F887-E/P Tech Specifications

Microchip Technology PIC16F887-E/P technical specifications, attributes, parameters and parts with similar specifications to Microchip Technology PIC16F887-E/P.

Product Attribute Attribute Value
Factory Lead Time6 Weeks
MountThrough Hole
Mounting TypeThrough Hole
Package / Case40-DIP (0.600, 15.24mm)
Number of Pins40Pins
Data ConvertersA/D 14x10b
Number of I/Os35I/Os
Watchdog TimersYes
Operating Temperature-40°C~125°C TA
PackagingTube
SeriesPIC® 16F
Published2007
JESD-609 Codee3
Pbfree Codeyes
Part StatusActive
Moisture Sensitivity Level (MSL)1 (Unlimited)
Number of Terminations40Terminations
ECCN CodeEAR99
Terminal FinishMatte Tin (Sn) - annealed
Max Power Dissipation800mW
Product Attribute Attribute Value
Terminal PositionDUAL
Supply Voltage5V
Frequency20MHz
Base Part NumberPIC16F887
Pin Count40
Supply Voltage-Max (Vsup)5.5V
Supply Voltage-Min (Vsup)4.5V
InterfaceI2C, SPI, UART, USART
Memory Size14kB
Oscillator TypeInternal
RAM Size368 x 8
Voltage - Supply (Vcc/Vdd)2V~5.5V
uPs/uCs/Peripheral ICs TypeMICROCONTROLLER, RISC
Core ProcessorPIC
PeripheralsBrown-out Detect/Reset, POR, PWM, WDT
Program Memory TypeFLASH
Core Size8-Bit
Program Memory Size14KB 8K x 14
ConnectivityI2C, SPI, UART/USART
Supply Current-Max4.8mA
Product Attribute Attribute Value
Bit Size8
Access Time20 μs
Has ADCYES
DMA ChannelsNO
Data Bus Width8b
PWM ChannelsYES
Number of Timers/Counters3Timers/Counters
EEPROM Size256 x 8
CPU FamilyPIC
Number of ADC Channels14ADC Channels
Number of I2C Channels1I2C Channel
Number of SPI Channels2SPI Channels
Height4.953mm
Length53.21mm
Width14.732mm
REACH SVHCNo SVHC
Radiation HardeningNo
RoHS StatusROHS3 Compliant
Lead FreeLead Free
0 Products View Similar

PIC16F887 Features

CPU   Architecture 8-bit PIC
Internal   Oscillator 8MHz
External   Oscillator 20MHz
Operating   Voltage Range (2V – 5.5V)
GPIO PORTS 36 I/O Pins
Interrupts 1
Timers 3 – (Two 8-bit and   one 16-bit timer)
Comparators 2
PWM 2 CCP and 2-PWM
ICP One ICP Pin
USART 1-Channel
I2C 1-Channel
SPI/MSSP 1-Channel
ICSP/MSSP Available
ULPWU Available
Watchdog timer Available
Self-Programming Available
LAN Not Available
CAN Not Available
ADC 14-Channel
SRAM 368 b
FLASH (Program   Memory) 14Kb
EEPROM 256 bytes

Alternatives for PIC16F887

PIC16F877A, PIC16F886, PIC16F84A, PIC18F2550, PIC18F46K22, PIC16F676, PIC16F72, PIC16F873A, PIC16F876A, PIC16F886, PIC18F252, PIC18F2520, PIC18F452, PIC18F4520

 

PIC16F887 Applications

  • Design that necessitates a large number of ADC channels

  • Low-power battery-operated applications with many I/O interfaces and communications

  • Ideal for higher-level A/D applications in the automotive, industrial, appliance, and consumer markets

 

How to Program PIC16F887 Microcontroller

The PIC microcontroller can be programmed using a variety of software available on the market. There are still people that program PIC MCUs in Assembly language. The following information pertains to Microchip's most advanced and widely used software and compiler.

 

An IDE (Integrated Development Environment), which is where the programming takes place, is required to program the PIC microcontroller. A compiler converts our software into HEX files, which can be read by MCUs. Our hex file is dumped into our PIC MCUs using an IPE (Integrated Programming Environment).

 

IDE: MPLABX v3.35

IPE: MPLAB IPE v3.35

Compiler: XC8

 

We'll need a gadget called PICkit 3 to dump or upload our code into PIC.

  • Interface the hardware (programmer kit) to the computer through a serial cable

  • Place the microcontroller in the socket of the hardware kit. Press the lock button to ensure the microcontroller is connected to the board.

  • Open the software installed on the computer. This shows the menu bar with file, functions, open, save, and setting options.

  • Select the ‘open’ option from the drop-down menu and select the ‘load file’.

  • Click on the ‘load’ button so that the hex file is loaded into the microcontroller.

    Code Loading to PIC MIcrocontroller

 

The PICkit 3 programmer/debugger is a low-cost in-circuit debugger controlled by a PC running MPLAB IDE (v8.20 or higher) on a Windows platform. The PICkit 3 programmer/debugger is a must-have tool for any development engineer. Other gear will be required, such as a perf board or breadboard, a soldering station, PIC ICs, Crystal oscillators, capacitors, and so on.

 

PIC16F887 Manufacturer

Microchip Technology Inc. is a leading provider of microcontroller and analog semiconductors, providing low-risk product development, lower total system cost, and faster time to market for thousands of diverse customer applications worldwide. Headquartered in Chandler, Arizona, Microchip offers outstanding technical support along with dependable delivery and quality.

Datasheet PDF

PIC16F887-E/P Documents

Download datasheets and manufacturer documentation for PIC16F887-E/P

Frequently Asked Questions

How much program memory is on the PIC16F887?
It is 14.
Which port in PIC 16f887 has four pins?
PIC16F887 comes with multiple power pins. It has four power pins and all pins can be used at the same time. Power pins are connected internally. Two pins are for ground and the other two are for power input.
How many input output pins are there in PIC16F887?
It has a total number of 40 pins and there are 33 pins for input and output. PIC16F877A is used in many pic microcontroller projects.
How many IO ports are there in PIC16F877A?
IT has 5 Ports in total. (PortA, PortB, PortC, PortD and PortE). It supports Serial Communication for which it has 2 Pins TX and RX.
How many analog pins are in PIC16F877A?
PIC16F877A has an inbuilt 10-bit Successive Approximation ADC which is multiplexed among 8 input pins.
FAQ
How much program memory is on the PIC16F887?
It is 14.
Which port in PIC 16f887 has four pins?
PIC16F887 comes with multiple power pins. It has four power pins and all pins can be used at the same time. Power pins are connected internally. Two pins are for ground and the other two are for power input.
How many input output pins are there in PIC16F887?
It has a total number of 40 pins and there are 33 pins for input and output. PIC16F877A is used in many pic microcontroller projects.
How many IO ports are there in PIC16F877A?
IT has 5 Ports in total. (PortA, PortB, PortC, PortD and PortE). It supports Serial Communication for which it has 2 Pins TX and RX.
How many analog pins are in PIC16F877A?
PIC16F877A has an inbuilt 10-bit Successive Approximation ADC which is multiplexed among 8 input pins.

TAGS

Share