PIC16F84 Microcontroller

PIC Microcontroller Projects

PIC16F84 Microcontroller


PIC16F84 Microcontroller is  widely used electronic gadgets and machines . It seem like it is the ancestor of all the PIC micro-controllers. PIC16F84  is 18-pin Microcontroller chip. Furthermore it is the “brain” of any project; the PIC can be accompanied with sensors and decides whether devices like motor and relays can be activated or not. This article mainly focus on the fundamentals of the PIC16F84 Micro-controller.

The fundamentals include:

  1.  Input/Output (I/O) ports
  2.  Timer
  3.  Serial Communication

Following are thePIC16f84 Parameters:

Name Value
Type of Memory Flash
Size of program Memory( in KB) 1.75
SRAM size ( in Bytes) 68
Data EEPROM/HEF (bytes) 64
Speed of CPU ( MIPS/ DMIPS ) 5
Timers 1* 8 bit
Pin Count 18
Range of Operating Voltage (V) 2 – 6
Temperature Range (C) -40 to 85
Crystal Frequency (MHz) 10


PIC16F84 Microcontroller Development Cycle

The PIC16f84 is an 18-pin 14-bit embedded micro and it features electronically erasable programmable read-only memory (EEPROM). The essential steps are:

Step 1:  On a PC, type the program, successfully compile it and then generate the HEX file.  For writhing the program we can use Embedded C compiler.

Step 2:  Upload the HEX file into the PIC16F84 using a PIC16F84 device programmer. This step is generally called as “burning”.

Step 3:  Insert your PIC16F84 into your circuit, power up and verify the program works as expected.  This ste is often called “dropping” the chip. In case the program dose not work go to Step 1 and debug your program and repeat burning and dropping.

PIC Input/Output (I/O) ports

The PIC16F84 has two main ports named A and B having five and eight digital lines respectively. Any of the port line can be configured to be an input or output. Port I/O functions are best accomplished by constructing a PIC16F84-based circuit which features a ZIF socket and 0.1 inch headers.

PIC Timer/ Counter

PIC16F84 has a inbuilt precision timing system called as Timers. These timers perform the various timing and counting functions like generating events at specific times, measuring the time period of an event, keeping date and time record, counting events, etc. Due to it’s independent functioning it can count pulses at the same time with the main program execution. A PIC16F84 micro-controller has single peripheral built-in hardware 8 bit timer – Timer0.

The real conception in this device is that it can be programmed and re-programmed using ICSP in circuit an interestingly same is followed in all other PIC devices. The newer version of PIC16F84 is PIC16F84a, which has a 16 Bit Timer. Furthermore, PIC16F84a can implement 8-bit timer which is same as that of PIC16F84.

Serial Communications

The PIC16F84 do not have a serial port. There is a way to establish PIC-to-PC serial communication with some hardware and programming . Typically the PC’s serial port has a DB9 male connector.

An 8-bit number uniquely represents each alphanumeric key on a PC. For example, the number 65 (01000001 binary) represents  upper case “A” ( the SHIFT and “a” keys). 97 represents “a”, the lower case key. An ASCII table defines keys and their values.The PIC can send or receive these 8-bit values serially at prescribed intervals (baud rate) while the PC run a terminal program like Windows’ Hyper terminal.


The PIC16F84 is based on flash  so programmers can re-program it many times. In addition if you design the circuit correctly you can re-program it in-circuit without removing the chip using In Circuit Serial Programming(ICSP) .


We cannot program it using a Low Voltage Programmer (but LVP is only for very specialized usage) as it is an older device version. We must use High Volt Programmer for e.g. PICKi3 or PICKit2 for its programming.



Microchip’s PICkit™ 3 In-Circuit Debugger/Programmer uses in-circuit debugging logic united into each chip with Flash memory to provide a low-cost hardware debugger and programmer. In-circuit debugging  beneficial in following ways:

  • Low cost
  • Debug needs minimum further  hardware
  • It dose not require expensive sockets or adapters
PIC Programmer

PIC Programmer

A pic programmer circuit  interfaces the PC to the microcontroller using the PC’s parallel,serial or USB port. It can write data to the microcontroller and also read it back for confirmation.

The pic programmer translates digital logic levels from the PC to suitable logic levels for the microcontroller – most levels are fine for LVP, but for practical (or high volt) programming of a pic microcontroller the maximum of 13.5V voltage at the MCLR pin is must. Otherwise it can damage to the microcontroller.

Following are the requirements of a PIC16F84 Micro-controller project:

  1. APIC16F84 device programmer
  2. Microchip’s MPLABor your device programmer came with software to “burn” HEX files to the PIC16F84. Else any other PIC Micro-controller IDE(Integrated Development Environment).
  3. A computer environment containing PIC (Dual Inline Package)DIP to design a circuit.
  4. A good PIC16F84 Micro-controller Book or PIC16F84 Micro-controller Data-sheet for reference.

(Note: The PIC16F84 Data sheet is available on the internet. Reference link: https://www.alldatasheet.com/datasheet-pdf/pdf/74975/MICROCHIP/PIC16F84.html

For more detailed reference, the standard books for PIC controller are:

  1. “Embedded System Design Based on 8051 and PIC Family Microcontroller” by T Bezboruah and A Goswami
  2. PIC Micro-controller book by Muhammad Ali Mazidi 
  3. “Design with PIC microcontrollers” by J B Peatman
  4. “Embedded C Programming and the Microchip PIC” by Richard H Barnett
  5. “PICs in Practice” by F P Volpe and S Volpe
  6. “Microcontrollers: Architecture Implementation and Programming” by Hintz

As of 2015, Manufacturers recommend 16F84A as an alternative of 16F84 with the only difference being that the A-version runs at 20MHz using a 20MHz crystal (the non-A version runs at 10MHz crystal speed only).

Don't miss out!
Subscribe To Our Newsletter

Learn new things. Get an article everyday.

Invalid email address
Give it a try. You can unsubscribe at any time.