Read this article with videos and pictures...[http://www.promeganet.com/?p=761]
In this 'Microcontroller Programming in Assembly language' series of articles, I would like to show you the way to write an assembly program for a PIC, known as microcontroller commonly, using mpasm assembly in MPLAB. I used PIC16F84A for this purpose. By referring this series of articles one can get an idea on how to begin programming in assembly language for PICs. To give an idea about 'Microcontroller Programming in Assembly language' I will take small assembly programs and describe their functionality one by one.
First of all, a project has to be built using MPLAB. So in this first part of the article I will show you to how to create a project using MPLAB.
To start using MPLAB, it has to be installed in the computer.
Download MPLAB >>
Step 1
Open MPLAB. You will see a screen like below.
Step 2
After you have to go to Project-> Project wizard. Screen will appear as below.
Click next.
Read related articles with photos and videos...[http://www.promeganet.com]
Step 3
After clicking next, the following screen will appear and in here the PIC which is going to be used has to be selected. Select PIC16F84A and click next.
Step 4
Then the following screen will appear on the screen.
In here you have to do several things.
* Check whether the 'Active Toolsuite' is selected as 'Microchip MPASM toolsuite'
* If the toolsuite is properly selected screen must as above. Otherwise 'a cross mark' will appear in front of each 'Toolsuite contents' which are listed below.
o MPASM Assembler (mpasmwin.exe)
o MPLINK Object linker (mplink.exe)
o MPLIB Librarian (mplib.exe)
So if a 'cross mark' appears in each toolsuite contents browse the folder which they include using 'Browse' button appears below. Assume that the MPLAB is installed to the 'C drive' of your machine, then the location of the toolsuite contents will be "C:Program FilesMicrochipMPASM Suite".
Step 5
After completing the step 4 below screen will appear and give a proper name to your project and select the location in which the project will be saved and simply click next.
Step 6
If you already have any previously written assembly program and if you want to add it to your project you can add it here. Simply select the location where it exists and press 'Add' and after adding click next. But if you do not have anything to add simply click next.
Read related articles with photos and videos...http://www.promeganet.com
Step 7
Creating a project is almost finished now. In this screen you will see a summary of Device (type of PIC used), Toolsuite and the location of the project saved. If anything needs to be changed go back otherwise click Finish.
So, this is the way you have to create a project usiing MPLAB and after creating the project you can add source files to it and it will be discussed in the next article.
In this 'Microcontroller Programming in Assembly language' series of articles, I would like to show you the way to write an assembly program for a PIC, known as microcontroller commonly, using mpasm assembly in MPLAB. I used PIC16F84A for this purpose. By referring this series of articles one can get an idea on how to begin programming in assembly language for PICs. To give an idea about 'Microcontroller Programming in Assembly language' I will take small assembly programs and describe their functionality one by one.
First of all, a project has to be built using MPLAB. So in this first part of the article I will show you to how to create a project using MPLAB.
To start using MPLAB, it has to be installed in the computer.
Download MPLAB >>
Step 1
Open MPLAB. You will see a screen like below.
Step 2
After you have to go to Project-> Project wizard. Screen will appear as below.
Click next.
Read related articles with photos and videos...[http://www.promeganet.com]
Step 3
After clicking next, the following screen will appear and in here the PIC which is going to be used has to be selected. Select PIC16F84A and click next.
Step 4
Then the following screen will appear on the screen.
In here you have to do several things.
* Check whether the 'Active Toolsuite' is selected as 'Microchip MPASM toolsuite'
* If the toolsuite is properly selected screen must as above. Otherwise 'a cross mark' will appear in front of each 'Toolsuite contents' which are listed below.
o MPASM Assembler (mpasmwin.exe)
o MPLINK Object linker (mplink.exe)
o MPLIB Librarian (mplib.exe)
So if a 'cross mark' appears in each toolsuite contents browse the folder which they include using 'Browse' button appears below. Assume that the MPLAB is installed to the 'C drive' of your machine, then the location of the toolsuite contents will be "C:Program FilesMicrochipMPASM Suite".
Step 5
After completing the step 4 below screen will appear and give a proper name to your project and select the location in which the project will be saved and simply click next.
Step 6
If you already have any previously written assembly program and if you want to add it to your project you can add it here. Simply select the location where it exists and press 'Add' and after adding click next. But if you do not have anything to add simply click next.
Read related articles with photos and videos...http://www.promeganet.com
Step 7
Creating a project is almost finished now. In this screen you will see a summary of Device (type of PIC used), Toolsuite and the location of the project saved. If anything needs to be changed go back otherwise click Finish.
So, this is the way you have to create a project usiing MPLAB and after creating the project you can add source files to it and it will be discussed in the next article.
SHARE