LED Blink Assembly code for PIC16F886 using Timer0 interrupt

The below is a working example of LED blink program using PIC assembly code which can be compiled on MPLAB IDE.

Abstract:

The LED is connected to RC4 of PIC16F886 and the circuit is setup as active LOW. Here the LED will glow when the RC4 output is made to ‘0’.
.
.
.
.
.
.
.
The PIC configurations used are,

There are 3 global variables also used for the project which are shown as below.

There are 2 labels also used as shown below,

Complete Assembly program:

2 Comments

    Taylor

    Hey! Thanks for posting this code. i was searching all over the internet to find a sample assembly code with timer interrupts for my PIC16F886, but could not find a working example.

    This one i tried and works like magic 😀 😀 😀

    The LED was blinking so fast with 20MHz crystal, but i adjusted the DELAY COUNT variable to 0x80

      embedded_expert

      Thanks for trying out the code and sharing your experience with us. 🙂

Leave a Reply

*
*

Required fields are marked *