Microcontroller Programming in Assembly language PART 1
Microcontroller Programming in Assembly language PART 1
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.
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.
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.
- MPASM Assembler (mpasmwin.exe)
- MPLINK Object linker (mplink.exe)
- 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 Files\Microchip\MPASM 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.
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.
Other related Articles
PIC Programming for beginners with PIC16F84A
Beginner guide to PIC Programming
Parallel Port Programming in Visual Basic
Related E-Books downloads
Micro controllers in practice by Loan Susnea and Marian Mitescu
PIC in practice by David W. Smith
The PIC Microcontroller; Your Personal Introductory Course by John Morton
Programming and Customising the PIC Microcontroller by Myke Predko
Pick’n up the Pace - Microcontroller Application Guide by Walter G. Jung
Introduction to Microprocessors and Microcontrollers by John Crisp
PIC Microcontrollers Second Edition - An Introduction to Microelectronics by Martin P. Bates
Download more e-books and software>>
Comments
9 Comments on Microcontroller Programming in Assembly language PART 1
-
meganet on
Sun, 2nd Nov 2008 7:08 pm
-
PIC programming for beginners with 16f84a | Promeganet on
Sat, 15th Nov 2008 11:41 am
-
Microcontroller Programming in assembly language | Promeganet on
Sun, 16th Nov 2008 8:29 am
-
NKhan on
Sat, 29th Nov 2008 9:09 pm
-
lieben on
Tue, 3rd Mar 2009 7:22 pm
-
KrisBelucci on
Tue, 2nd Jun 2009 7:29 am
-
PeterMontee on
Fri, 3rd Jul 2009 9:34 am
-
KonstantinMiller on
Mon, 6th Jul 2009 7:03 pm
-
????? ???????? on
Fri, 19th Mar 2010 2:00 am
good job
[...] Microcontroller Programming in assembly language PART 1 [...]
[...] Microcontroller Programming in assembly language PART 1 [...]
exellent help for poor community, having exellent skill but can’t afford the software & books
Interessante Informationen.
Great post! Just wanted to let you know you have a new subscriber- me!
It is already far not exception
How soon will you update your blog? I’m interested in reading some more information on this issue.
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!














