BLINKING LED USING PIC MICROCONTROLLER (PIC16F887A)

Introduction:

  • PIC Microcontroller was manufactured by General instrument’s Microelectronics.
  • It was initially named as Peripheral Interface Controller and was later known a Programmable intelligent computer.
  • They were ready to be used by the year of 1976 and was went on to  sell more than 10 billion units by 2014.
  • They are employed in a  wide variety of embedded systems in the modern world today and very popular amongst hobbyists and industrialists.
  • Earlier versions of PIC  unfortunately had ROM and EPROM  only.

ARCHITECTURE/HARDWARE FEATURES:

  • PIC16F887A employs the Harvard architecture.
  • Lack of external memory interface.
  • Watchdog timer
  • Different RC oscillator configurations
  • SRAM

ADVANTAGES:

  1. Smaller instruction set
  2. Reduced instruction set.
  3. Inexpensive microcontrollers.
  4. Supports different protocols I2C,UART, SPI.

LIMITATIONS:

  • Just one accumulator.
  • Register bank switching required to access complete RAM of devices.

PROTEUS DIAGRAM FOR INTERFACING 8 LEDs with PIC16F887A

EXPLANATION OF DIAGRAM(PROTEUS):

  • Here pins 13 and 14 of the PIC Microcontroller are connected to an RC oscillator via two capacitors each measuring 22PF.
  • The MCLR pin 1 of the microcontroller is connected to a resistance  of 10K Ohm.

C programming code:

void main()
{
 TRISB.F0 = 0; //Makes PORTB0 or RB0 Output Pin

 while(1) //Infinite Loop
 {
   PORTB.F0 = 1; //LED ON// RBO pin of port b is toggled
   Delay_ms(1000); //1 Second Delay
   PORTB.F0 = 0; //LED OFF
   Delay_ms(1000); //1 Second Delay is given after each blink of led

}
}

 

CONNECTIONS DIAGRAM:

WORKING VIDEO LINK:

https://drive.google.com/open?id=1kTGGRc2SNaavx33qqTrdbpweHKa2C_6z