User`s guide

Simulator Reference
© 2006 Microchip Technology Inc. DS51519B-page 253
Trace Options
To trace all lines of an executing program for display in the trace window (and the
related logic analyzer), check the “Trace All” checkbox. To stop program execution
when the trace buffer is full, check “Break on Trace Buffer Full”.
To see the trace window, select View>Simulator Trace
. For more on tracing, see
MPLAB IDE documentation on the Trace Memory window.
To see the logic analyzer window, select View>Simulator Logic Analyzer
. For more on
this window, see MPLAB IDE documentation on the Logic Analyzer window.
21.3.2 Break Options tab
Select Debugger>Settings and then click the Break Options tab. Set up break options
for specific processor areas or conditions.
Messages are displayed as they are generated in the Output window under the MPLAB
SIM tab. The messages will be displayed in a standard format as shown below:
Component-message number : message
For example,
CORE-E0001: Stack Error occurred
ADC-W0001: Cannot change ADCON1 SSRC when ADON=1
Core (Including Stack)
Select break options from the drop-down lists for core warnings and errors:
Break – Report and break on core errors
Ignore – Ignore core errors (trap, normal behavior)
Report – Report and trap on core errors
The core includes stack operation. Therefore, a break option for a stack
overflow/underflow is set by selecting a break option for a core error. The default for
core errors is Break, which means a break occurs on a stack error. For dsPIC DSC
devices, the simulator will always reset. For PIC12/16 devices, the simulator will never
reset. For PIC18 devices, whether the simulator resets or not depends on the
Configuration bits (Configure>Configuration Bits
).
The simulator reports the stack error before the possible Reset action. Thus, you can
set the core error break option accordingly to capture that moment before the Reset.
Peripheral
Select break options from the drop-down lists for peripheral (e.g., timers, ADC, USART,
etc.) warnings and errors:
Break – Report and Break on Peripheral errors
Ignore – Ignore Peripheral errors (Trap/Reset, normal behavior)
Report – Report and Trap on Peripheral errors
WDT Timeout
Select break options from the drop-down list for watchdog timer warnings:
Break – Break on WDT
Break+Warn – Report and Break on WDT
Reset – Reset on WDT (normal behavior)
WDT Period
Enter a watchdog timer time-out period value in milliseconds. The range is from 1 to
32767 ms. To return to the default WDT period, click Default.