Assemble Code to Flash a LED
Assembly of the code converts the assembly instructions to machine
language which the computer can understand. To complete this step we
use a program called MP Lab. The following steps are required.
- You must create a project file. Note that the name of the
project file, the name of the directory, the name of the assembler
file and the name of the hex file created should be identical
except for the extension to the file name.
- You must tell the program which PIC Microchip you are
using.
- You must build and save the project.
To complete these steps follow the instructions below;
- It is assumed that you have your basic code and assembler code
in a directory on your central server and the directory and the
code have the same name.
- Open MP Lab on a pc.
- Menu, Project - select New Project
- The file name should be the same as the file name of the
basic and assembler file. This is entered in the top left box,
in theis case ledflash.pjt
- Choose the directory on the central server that you created
for the basic and assembler files to be stored in. Make sure
the directory that you choose has an open folder icon as shown
below.
Click ok.
- The Edit Project widow will open.
- It is necessary to select the correct microchip on this
screen. When you click on the change button, the Development
Mode window will open. Choose PIC16F84A as the
processor.
Click apply.
- Click the Add Node button. The Add Node window will open.
Under folders select the folder where your files are located.
Then under file name select the assembler file that will be
used

- The edit project window should look like this
Click ok.
- Menu Project, Select Make Project You should get a Build
Successful
The
hex code is now created.
- Menu, Project - Select Save Project
- Your done.
Technological Design
Home