pic lab - site.iugaza.edu.pssite.iugaza.edu.ps/tjomaa/files/pic-lab1.pdf · press to lab1.asm to...
TRANSCRIPT
PIC LAB
LAB#1: Introduction
By ENG. Tamar Jomaa
MPLAB.
PROTEUS.
MikroC.
PIC-Simulator.
QL-Programmer
Software Tools:
MPLAB:
MPLAB:
Launch MPLAB
Open a new Source file by choosing [FILE][NEW] or clicking on the icon on the toolbar
Type in your program
Rules for the Microchip assembler:
Comments begin with a ;
Labels (names) begin in column 1 (Leftmost) and by style should be UPPERCASE
Instructions should not begin in column 1 and by style should be lowercase
The last directive should be end(comments can come after)
Save your file [FILE][SAVE AS] on your floppy or memory stick in a folder called tamar
Rules for file naming:
Names should be not more than 32 alphanumeric characters, nor beginning with a number. An underscore is an acceptable character
The extension should always be .asm; e.g. lab1.asm
The result after press save:
Make a new peoject : [Project] [ProjectWizard]
Hit the {Next} button (left)
Step One: Pick the device you are going to use as the target, hit the{next} button
Step Two: Select your Language Toolsuite.
Step Three: Give your project a name and where it is going to reside This is usually in the same place as you saved your source file; desktop:/tamar in our example (right)
Step Four: Find your source file, select it and hit the {Add}button (left), hit the {Next} button
A summary of your project is given to allow you to back up and make any alterations . Hit the {Finish} button to complete your project setup file lab1.mcp
:The result after press {finish}
Press to lab1.asm to show the following:
Then, run the program by choose project Bulid All
In case of Successful program, you receive the following massage:
To implement the program practically we only load the HEX file extension to the PIC
See you in next lab to begin with hardware site.
Assignment#1:
Download the following software tools: a) MPLAB. b) PROTEUS. c) MikroC. d) PIC-Simulator. e) QL-Programmer
Enjoy in PIC lab