User`s guide
MPLAB
®
IDE User’s Guide
DS51519B-page 56 © 2006 Microchip Technology Inc.
Tutorial Step 14:
Reset your code (Debugger>Reset) and then run it by clicking the Run icon on the
toolbar. (Hover your mouse over a toolbar icon to see its meaning.) Then stop the
program by clicking the Halt icon.
3.16 VIEWING DEBUG WINDOWS
Standard debug windows allow you to view the contents of program, data or other types
of device memory to aid in the debugging of your application. These windows are
always visible on the View menu. Some items may be grayed out, however, if they are
not supported by the device or debug tool. For more on each debug window, see
Chapter 12. “MPLAB IDE Windows”.
• Disassembly Listing Window
• Hardware Stack Window
• Program Memory Window
• File Registers Window
• EEPROM Window
• Memory Usage Gauge
• LCD Pixel Window
• Locals Window
• Watch Window
• Call Stack Window
• Special Function Registers Window
Additional debug windows may appear on the menu depending on the debug tool you
select.
• Trace Memory Window (Simulators and Emulators)
Tutorial Step 15:
You will likely use the following windows to observe your running code:
• File (Editor) Window – Displays the actual assembly or C code.
• Program Memory Window – Displays your code as Opcode Hex, Machine or
Symbolic.
• Disassembly Listing Window – Displays the disassembled code.
• Watch Window – Displays the values of registers and bits that you specify to
“watch”.
The file window should already be open, containing your code. You will be using the
Watch window in the next step.
3.17 USING WATCH WINDOWS
In order to see what the application is doing, you will need to open a debug window to
observe register values. Although many registers and their values are displayed in the
File Register window and Special Function Register (SFR) window, you usually only
wish to see a few application-specific registers. To set up your own list of registers to
view, use Watch windows (View>Watch
).
To add an item to the Watch window:
• Choose an SFR or Symbol from the drop-down list and then click the
corresponding Add button
• Drag an item from the SFR, File Register or File window
• Click directly in the window under symbol name and typing in the item