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 Microchip PIC16F84A 8-bit 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.

LED: Light Emitting Diode

Hardware Required:

  • PIC16F84A microcontroller   —> datasheet
  • LED
  • 8 MHz crystal oscillator
  • 2 x 22 pF ceramic capacitor
  • 10k Ohm resistor
  • 330 ohm resistor
  • Breadboard
  • 5V source
  • PIC Microcontroller programmer (PICkit 3, PICkit 4…)

PIC16F84A LED blink example 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 a current limiting resistor of 330 Ohm.

MCLR pin (#4) of the PIC16F84A microcontroller is connected to circuit VCC (+5V) through 10k Ohm resistor.

PIC16F84A LED blink example C code:
Code is written with CCS compiler, it was tested with version 5.051.
The C code is described through comments.

PIC16F84A LED blink example simulation video:
The following video shows the simulation of this project using Proteus simulation software.

Related Project:
PIC16F84A LED blink using push button – CCS C compiler


Discover more from Simple Circuit

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

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

Scroll to Top