0% found this document useful (0 votes)
36 views6 pages

How To Use MPLAB Ver6

This document provides instructions for using MPLAB Ver6.50, including how to start MPLAB, create a new project, set up the project, select a device, assemble code, view the listing file, and set up the debugger. It explains that MPLAB Ver6.50 allows creating projects, adding source files, setting build options and output directories, selecting a PIC device, assembling code to generate HEX files, viewing memory usage in listing files, and using the simulator debugger.

Uploaded by

nykdeva
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views6 pages

How To Use MPLAB Ver6

This document provides instructions for using MPLAB Ver6.50, including how to start MPLAB, create a new project, set up the project, select a device, assemble code, view the listing file, and set up the debugger. It explains that MPLAB Ver6.50 allows creating projects, adding source files, setting build options and output directories, selecting a PIC device, assembling code to generate HEX files, viewing memory usage in listing files, and using the simulator debugger.

Uploaded by

nykdeva
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

How to use MPLAB Ver6.

50

[Menu]>[Guide to use the PIC]

How to use MPLAB Ver6.50


As for the MPLAB tool of the Microchip Inc., a frequently new version is released. The operation methods differ in Ver5 and Ver6 of MPLAB. I will introduce about the basic usage of MPLAB Ver6.50 here. A function difference between Ver5 and Ver6 isn't explained.

The premise of explanation

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.

When starting MPLAB, a screen like the figure above is displayed.

Creation of a new project

Since the dialog of New Project is displayed, set a project name and a directory which stores a project.

A new project can be created if it clicks on a New

1 of 6

3/15/2008 6:15 PM

How to use MPLAB Ver6.50

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.

After choosing a source file, press "Open" button.

The source file was included in the project.

Setup of a project

Click Build Options icon and set the condition of the

Set Output Directory and Intermediates Directory in

2 of 6

3/15/2008 6:15 PM

How to use MPLAB Ver6.50

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.

This time, I selected PIC16F628.

Assembling operation

3 of 6

3/15/2008 6:15 PM

How to use MPLAB Ver6.50

Double-click a source file from the project file list and Assembling will be started when clicking Make icon. open a source file.

The elapse of the assembling is displayed by the bar graph.

When there is an error, the bar becomes red.

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.

Displaying of a Listing file


The quantity consumed of the program memory is displayed in the Listing file.

4 of 6

3/15/2008 6:15 PM

How to use MPLAB Ver6.50

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

How to use MPLAB Ver6.50

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

You might also like