You are on page 1of 3

12/11/2020 Blinking Disco LEDs using microcontroller PIC16f877a

Blinking LED pattern using microcontroller


Proteus Schematic Diagram:

Software Required:
1- MikroC PRO for PIC (Download latest version or version 6.6.2 is good enough for this tutorial, NOTE: latest version will give
errors  )
2- Proteus (v7.7 or 8)

Hardware Required:
1- PIC16f877a
2- Different Colour eight LEDs 
3- 20MHz oscillator
4- 22pf capacitors (2)
5- 10K variable resistor
6- 9 volts battery
7- 7805 voltage regulator

Working and Procedure:


POWERED BY

https://hassam794.weebly.com/blinking-leds-pattern-using-pic16f877a.html 1/3
12/11/2020 Blinking Disco LEDs using microcontroller PIC16f877a

Now make sure you have all this stuff, rst of all create new project in MikroC, choose your Microcontroller i.e PIC16f877a and
set frequency 20MHz (this is basically the frequency of oscillator, in our case we have used 20MHz). If MikroC asks to import
libraries then click OK to import all libraries. Create a new C le for you project and add the C code (comment your email address
for source code) and save your project. Now it’s time to build .HEX le (we need this le for Simulation and Hardware) you can
nd BUILD on the top layer of MikroC simply click on it or just press Ctrl+F9. .HEX le is now saved in your project folder.

For Proteus Simulink open the .DSN simulation le (comment your email address for simulation le). You will see PIC16f877a in
simulation double click on it and add the .HEX le you generated in MikroC. Now run the Simulation and wow LED are blinking
with pattern you may call it Disco LEDs. If you have any question leave a comment.

Author: Engr. Hassam Bin Hassan

0 comments
Leave a message...

you may also like

Distance Measurement Device using PIC

POWERED BY

https://hassam794.weebly.com/blinking-leds-pattern-using-pic16f877a.html 2/3
12/11/2020 Blinking Disco LEDs using microcontroller PIC16f877a

POWERED BY

https://hassam794.weebly.com/blinking-leds-pattern-using-pic16f877a.html 3/3

You might also like