Qianglongsheng Electronic Technology MCD-DEMO-II Manual page 8

Table of Contents

Advertisement

DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd.
Debugging
Debugging program is to test whether the program you deigned is operational, whether it produces correct result as
wanted, whether there's any defects in your design, whether the algorithm design is reasonable, and whether it can
accurately control the various hardware resources, and whether it can obtain desired results.
Choose debugging tools
Select menu command
may select the software debugger which comes with the MPLAB software as the debugger for the target program.
open the corresponding toolbar.
Observe debugging results
The internal storage area of PIC microcontroller can be divided into several sections: program memory, hardware
stack, file registers, special function registers and EEPROM data memory. In the course of the operation of program, it
will repeatedly read, write or modify the contents in the storage area. Therefore, we can observe the changes of content
in storage area corresponding to the operation of program so as to understand the operation of program, and achieve
the purpose of debugging. To open storage area we can choose the View menu commands, as shown in Figure 2-12.
Apart from the use of these storage area to observe the debugging process, we can also add the concerned specific
modules to the observation window to monitor the results. Implementation the menu command
observation window will open, as shown in Figure 2-13.
Figure 2-12 Menu command to open storage area
Thus, we have introduced a simple use of MPLAB, and through the learning in this chapter, we should be able to
complete the source code edit, compile and debug.
Note: For more information on the MPLAB please visit the website of MICROCHIP and download "MPLAB User
Manual".
Debugger à Select Tool, to select the simulator connected to the PC as the debugging tool, or you
Page 8 of 33
ViewàWatch
Figure 2-13 Observation window
After choice, it will
and the

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents