PIC16F84A LED blink example with CCS C compiler

Blink an LED using PIC16F84A and CCS PIC C compiler

This topic shows a simple example for making an LED blinks using PIC16F84A microcontroller and CCS PIC C compiler. It is easy to make an LED blinking, a few program lines are required and the microcontroller PIC16F84A is a simple chip also.
Hardware Required:

  • PIC16F84A microcontroller
  • LED
  • 8 MHz crystal oscillator
  • 2 x 22 pF ceramic capacitor
  • 10K ohm resistor
  • 330 ohm resistor
  • Breadboard
  • 5V source

PIC16F84A LED blink circuit:
Circuit schematic diagram for the LED flasher is shown below.
pic16f84a led blink circuit CCS C compiler
In this example the PIC16F84A microcontroller runs with 8 MHz crystal oscillator, the LED is connected to pin RA0 through 330 ohm resistor.

PIC16F84A LED blink C code:
Code is written with CCS compiler, it was tested with version 5.051.

PIC16F84A LED blink simulation video:
The following video shows the simulation using Proteus software.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.