PIC16F886 Assembly example code for UART echo test using interrupt

PIC16F886 Assembly example code for UART echo test using interrupt

This example assembly code for PIC16F886 can be used to learn the working of the UART module within the PIC MCU. The assembly code project is comprised of two *.asm files and can be compiled using MPLAB IDE.

Working:
The program will echo back the characters which were entered from a PC (Personal Computer).
.
.
.
.
.
.
.
Source files:

1. main.asm

2. uart.asm

PS: The above assembly program is having a special behavior while executing the same. Readers are encouraged to find out the program behavior and are welcome to comment on this. 🙂

LED Blink Assembly code for PIC16F886 using Timer0 interrupt

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: