MPLAB® X Stopwatch

Appendices: P02

Appendices:

MPLAB® X Stopwatch

Open the Stopwatch tool window by selecting Window->Debugging->Stopwatch on the MPLAB® X task bar. Using the source code window, generate two break points—one on line 19 and the other on line 20, as shown in Fig. 1. Next, select the properties icon on the top right of the Stopwatch window. (This icon is a hammer and a wrench.)

Figure 1. MPLAB X IDE with two breakpoints and the Stopwatch window.

On the Stopwatch properties window, the two dropdown boxes on the right allow you to select the line of code where the Stopwatch tool will be started and the line of code where the stop watch will be stopped. Fig. 2 shows the results of selecting line 19 to start the stopwatch and line 20 to stop the Stopwatch tool. After selecting the start and stop conditions, select the OK box. The MPLAB screen will look like Fig. 1 once more. Select the Continue control until the execution stops at line 20. The processor cycle count is displayed in the Stopwatch window as shown in Fig. 3.

Figure 2. Setting the Stowpwatch properties.
Figure 3. MPLAB X screen after executing code to line 20.

The screenshots above are of Microchip MPLAB X IDE running on Microsoft Windows 7.


  • Other product and company names mentioned herein are trademarks or trade names of their respective companies. © 2014 Digilent Inc. All rights reserved.