The stopwatch is useful for simple timing between program halts. Reach this window from Window>Debugging>Stopwatch.
To use the Stopwatch:
Instruction Cycles
The simulator counts instruction cycles between pausing (halts).
PIC MCUs and dsPIC30F/PIC24F devices use 4 clock cycles per instruction. dsPIC33F/PIC24H devices use 2 clock cycles per instruction.
Clear the stopwatch window contents by clicking the Clear History button.
Processor Frequency
This field, including Frequency units, will be set from File>Project Properties, “Simulator” category, “Oscillator Options” options category.
Window Icons
The stopwatch has the following icons on the left side of the window:
Icon | Icon Text | Description |
---|---|---|
Properties | This option is not available for MPLAB X Simulator. | |
Reset Stopwatch on Run | Default option - always set. | |
No Reset Stopwatch on Run | This option is not available for MPLAB X Simulator. | |
Clear History | Clear the stopwatch window. | |
Clear Stopwatch | Reset the stopwatch value to zero. |