The 16F877A is one of the most popular PIC microcontrollers and it's easy to see why - it comes in a 40 pin DIP pinout and it has many internal peripherals.
|RA4/T0CKI||Open drain||Normal CMOS||The pin is physically different so the input characteristics are changed.|
|Cost||Expensive||Cheaper||Modern devices are usually cheaper.|
|ADC||Yes||More useful||More controls although different registers are used.|
|Nano WattTM||No||Yes||16F88x - ultra low power operation (battery operation).|
|Internal Clock||No||Yes||8Mhz to 31kHz 1% accuracy.|
|External Gate||No||Yes||External Timer1 gate input (start Timer1 counter).|
|Volt reference||No||Yes||Internal 0.6V voltage reference.|
|RS485, LIN 2.0||No||Yes||Enhanced USART supports RS485 and LIN 2.0 operation.|
|Parallel Slave port||Yes||No||Acts as an 8 -bit processor interface i.e. another 8 bit processor can read and write to this interface controlling the 16F877A as a slave processor.|
The four features that you might make you use a 16F887 instead of a 16F877(A) are
The gate could be used to more accurately capture an input time e.g. for a reciprocal frequency counter.
The volt reference means you don't need an external reference although it will probably not be useful for highly accurate operation. It is definitely more useful in a battery powered operation where you want to compare the input battery voltage to a known reference e.g. using the comparator and the internal 0.6V reference.
Nano WattTM could be useful for battery powered operation.
The internal clock is useful for lab development (not for accuracy) and for general operation - it can also be set to 31kHz so consuming less power.
All the above depend on your specific application requirements.
The 40 pins make it easier to use the peripherals as the functions are
spread out over the pins. This makes it easier to decide what external
devices to attach without worrying too much if there are enough pins to do the
One of the main advantages is that each pin is only shared between two or three functions so its easier to decide what the pin function (other devices have up to 5 functions for a pin).
The pinout of the 16F877A is:
As you can see the chip is full of peripherals so you can use it for many different projects.
The main peripherals of the 16F877A are:
As you can see the device has a rich set of internal peripherals that can be used for many different designs.
The most unusual internal peripheral is the parallel Slave Port (PSP) and this makes the device compatible with an 8 bit bus so you can directly interface the 16F877A into a system that uses an 8 bit bus. Although this is probably not common now you could enhance an existing system by adding this device i.e. enhance by adding the capabilities of all the other internal peripherals.
More PIC16F877A Projects:
Jump to other devices: bubble diagram device list.
Arduino EEPROM: How to use it and How to presrve the life of EEPROM. Two examples sketches to save multiple values to EEPROM.
A tutorial on using the ADS1115 precision 16 bit ADC for low power use.
Learn how to use the TP4056 properly. There's a right, and a wrong way, to use it to safely charge Lithium Ion batteries.
The DW01A chip is a Lithium Ion battery protector commonly used on TP4056 boards. Find out Exactly how it works and how to use it the correct way.
For Arduino string operations you can use Object Class Strings or C style strings but which should you use? Also find out how to decode commands and control variables in your programs using strings.
Real Time Clock Design (FREE): A Free and Complete RTC design using the DS1307 and a PIC micro (16F88) also re-targetable. This PIC project uses an I2C Clock chip and 7-segment display to create a fou…