How To Use MPLAB Ver6
How To Use MPLAB Ver6
50
Starting MPLAB
I use the software for the synchronization pulse detection which was used with "Decorative light Controller" as an example. A source file is the premise stored in test1 folder as shown in the above figure.
Since the dialog of New Project is displayed, set a project name and a directory which stores a project.
1 of 6
3/15/2008 6:15 PM
Project icon.
The file list of the project is displayed. The required files are not made at this time yet.
A menu is displayed when choosing Source Files and clicking the right button of the mouse. Click Add Files.
Setup of a project
2 of 6
3/15/2008 6:15 PM
project.
the General tab. I did to the place which is the same as the source file.
Next, click MPASM Assembler tab and have Disable case sensitivity checking mark. My source code is written by the lowercase but the INC file of the standard label definition is written by the uppercase. This setting makes a case sensitivity invalid. When assembling my source file, this setting is indispensable.
Selecting of a device
Click Configure of the menu bar and select the device to use in Select Device.
Assembling operation
3 of 6
3/15/2008 6:15 PM
Double-click a source file from the project file list and Assembling will be started when clicking Make icon. open a source file.
Output message is displayed when the assembling ends. The figure on the left is in the condition that assembling was normally ended. When there is an error, error contents are displayed. When processing normally, HEX file is made and is stored in Output Directory. It is displayed with the old-type source code in the first line of the message but there is no problem.
4 of 6
3/15/2008 6:15 PM
Click Open File icon, choose * .lst by the file type and open the Listing file.
The state of memory is displayed on the last of the Listing file. This time, it is displayed as follows. Program Memory Words Used: 91 Program Memory Words Free: 1957
Setting of a debugger
The debugger is convenient for the operation confirmation of the assembled program.
The simulator of MPLAB can be used when choosing Debugger -> Select Tool -> MPLAB SIM by the menu bar.
An icon for the debugging is added to the icon bar. Run Halt Execute program code until a breakpoint is encountered or until Halt is selected. Halt (stop) the execution of program code.
Animate Continually Step Into instructions. Step Into Step Over Execute the current instruction and then halt. Execute the instruction at the current program counter location, then halt. If the instruction is a call instruction, execute the called subroutine and halt at
5 of 6
http://www.interq.or.jp/japan/se-inoue/e_pic4_9.htm
the address following the call. It is convenient when to check the processing step of the subroutine isn't necessary. Step Out In case of subroutine, step out of current location in a function and return to main program. Reset Reset as specified.
6 of 6
3/15/2008 6:15 PM