3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Blink a LED with Assembly Language & a PIC

Blink a LED with Assembly Language & a PIC
To state the blindingly obvious, there are many flavors of microcontroller in the world.  There are innumerable applications for them too.  This Instructable will cover the steps necessary to blink a LED using a PIC microcontroller and Microchip assembly language, showing you how to access and use some of the device's hardware peripherals

To do this I am going to show you how to blink a LED at approximately 1 Hz with a 50% duty cycle.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Obtain Necessary Parts & Tools

Obtain Necessary Parts & Tools
What you will need

1. A PIC, preferably a 16F1936--but as long as you know your specific hardware, you could probably implement this on nearly any 8 bit PIC with an on-board 16 bit timer.  There are some slight programming differences between the 1936 and earlier uCs that you might be familiar with.  The 1936 is what I have at the moment, and it's pretty spiffy

2. Some way to program the PIC. I am going to be using a PICkit III to do ICSP (In-circuit serial programming).  Can be gotten from Microchip for a small sum of money.  There are many programming options for PICs.  You can even roll your own programmer.

3.  MPlab.  This is available from Microchip for the low low cost of Free.

4.  Miscellaneous electronic parts/equipment
- A 3-6V power supply
- Breadboard
- Jumper wires
- 1 uF Capacitor
- 10K resistor
- LED of choice (around 20 ma current draw), and appropriately sized resistor.
-A small tactile switch
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Oct 13, 2010. 6:03 PMaeonfox says:
if you can blink an LED from a microprocessor, you can do anything with it

Mar 26, 2012. 10:45 AMbercioiu says:
I do not think so...
Mar 9, 2012. 1:13 AMsimonrichards150 says:
Just a note, the LED connected to RB0 is shown in a source configuration, not a sink configuration. It should be the other way around for it to light with a logic 0 on RB0.
Sep 17, 2010. 3:57 PMDipankar says:
Why go to so much trouble when you can make LED's blink with two 555 timer IC's.
Nov 14, 2010. 2:37 PMdavesutherland says:
Even a 555 is overkill - you could just use a transistor, a capacitor and a couple of resistors.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
2
Author:Psickattus(Paul)
I like to garden and tinker, and run through the woods with a big, doggy Labrador Retriever.