Getting started with Assembly for PIC microcontrollers

18 September, 2009 (03:34) | PIC, Tutorials | By: Lucian

Hi everybody. This is my first post of a series related to assembly programming for PIC Microcontrollers. In this first tutorial I will show you how to set-up the compilers and IDEs that you will use for building code in assembly.

We will start with installing the tools for Linux based operating systems. I am using Ubuntu operating system which is free for download. For writing assembly code I am using Piklab, also a free program. To install this on Ubuntu you have to open the terminal and type the following command :

sudo apt-get install piklab

You will be prompted for you root password. Type it in to install the software. After installation, to launch the program you open the terminal and type “piklab”.

This is the Piklab main window. You are also going to need “gputils” for compiling the source code into hex files. To install gputils you type the following command into the terminal :

sudo apt-get install gputils

So now we have the software needed to write programs in assembly and compile them. We have to do one more thing. Open Piklab and select from the menu “Settings” -> “Configure Piklab” -> “Standalone file” -> “Toolchain” -> “GPUtils”. Now we have configured Piklab to use gputils as assembly tools for files that are not included in any projects. We are going to use this method for the first few codes.

If you are using Windows OS, Microchip is offering for free the MPLAB IDE that can be downloaded from their website. It is very easy to install and setup. You just follow the steps after running the setup.exe file.

Thanks for reading. I will soon post the first assembly lesson. If you have any questions just leave a message.

Write a comment