Picture of 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.

Step 1: 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
Remove these adsRemove these ads by Signing Up
LesB6 months ago

So it looks like from your schematic that you don't need an external crystal to use the internal oscillator.

aeonfox4 years ago
if you can blink an LED from a microprocessor, you can do anything with it

Yes , almost :)

I do not think so...
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.
Dipankar4 years ago
Why go to so much trouble when you can make LED's blink with two 555 timer IC's.
Even a 555 is overkill - you could just use a transistor, a capacitor and a couple of resistors.
Psickattus (author)  Dipankar4 years ago
Fundamentals are the building blocks of fun.