Blink an LED using a PIC16F84A in assembly language

This tutorial is to help us on how to design, build, and code in assembly language , a 4 bit counter which counts from 0 to 9 both on LEDs and on a seven segment display.
On the first schematic below, the counter will count using '0' and '1' bits depending on the state of the LEDs whether they are 'ON' or 'OFF' in binary counting.
You need to watch the video above in order to understand how this circuit works.


Arduino Christmas

In this project, you will need

  1. a PIC16F84A microcontroller.
  2. two capacitors and a crystal oscillator: used to produce an input clock frequency into the microcontroller
    • 5 resistors
    • One of resistance 10K: pulldown resistors to ubstruct any electric current from below.
    • Four of resistance 220 ohm: to limit the output supplied to the LED in order not to destroy it.
  3. a 5V dc input voltage source
  4. Four green LEDs
  5. a push-button: it resets the microcontroller in case of any failure
    and a switch: to decide whether a 1 bit or a 0 bit is received by the microcontroller.

  6. Click on the link below to download the

Source code

In order to use the seven segment display, we are going to connect a 4511 binary counter from the PIC16F84A to the seven segment display. In this way, its going to count from 0 to 9 on the seven segment display. you understand more as per the schematic below.

Arduino Christmas