2001 Microchip Technology Inc.
DS51159B-page 145
Debugging Techniques
Click Apply or OK.
Reset the system (Debug>System Reset) and then run your program
(Debug>Run>Run, green stoplight icon on toolbar or <F9>). After it halts,
bring up the Trace Memory Window (Window>Trace Memory).
Figure A.5: Trace Display - TBE for ISR Time
Read the Time when the trigger halted execution. That is the time between
interrupt start events. As in Solution A, we see that the time stamp is 132
microseconds.
A.4.2
Variable not correct
A variable is not correct at a routine. The code shows the variable being set
correctly, but somewhere in the code this variable is getting changed. Where
is the bad code?
In order to figure out why the value of a variable is not correct, you can use
the trace display to capture the values being read/written. From this, you can
set up the complex trigger to help you debug the problem.
To clear all break, trace and trigger points, select Debug>Clear All Points.
Open the source code file (File>Open) to examine the code.
The routine shown in Figure A.6 does not seem to be sending the right
variables out. It should increment the 16-bit value of
num_out
and send it out
to the port.
Содержание MPLAB ICE
Страница 1: ...2001 Microchip Technology Inc DS51159C MPLAB ICE EMULATOR USER S GUIDE M...
Страница 8: ...MPLAB ICE User s Guide DS51159B page viii 2001 Microchip Technology Inc...
Страница 18: ...MPLAB ICE User s Guide DS51159B page 18 2001 Microchip Technology Inc NOTES...
Страница 36: ...MPLAB ICE User s Guide DS51159B page 36 2001 Microchip Technology Inc NOTES...
Страница 58: ...MPLAB ICE User s Guide DS51159B page 58 2001 Microchip Technology Inc NOTES...
Страница 80: ...MPLAB ICE User s Guide DS51159B page 80 2001 Microchip Technology Inc NOTES...
Страница 126: ...MPLAB ICE User s Guide DS51159B page 126 2001 Microchip Technology Inc NOTES...
Страница 129: ...2001 Microchip Technology Inc DS51159B page 129 Verification Figure 7 3 Verify MPLAB ICE Run Mode Tests...
Страница 140: ...MPLAB ICE User s Guide DS51159B page 140 2001 Microchip Technology Inc NOTES...
Страница 158: ...MPLAB ICE User s Guide DS51159B page 158 2001 Microchip Technology Inc NOTES...
Страница 189: ...2001 Microchip Technology Inc DS51159B page 189 Index NOTES...
Страница 190: ...MPLAB ICE User s Guide DS51159B page 190 2001 Microchip Technology Inc NOTES...
Страница 191: ...2001 Microchip Technology Inc DS51159B page 191 Index NOTES...