Program Debugging:VSM Debugging

VSM Debugging

When the circuit is complete, and the MCU program attached, the simulation can be run. The logic levels on each connection are displayed as blue (low) and red (high). Clicking on the Run button in the schematic should make the motor appear to turn. The Up button should make it speed up and the Down button slow down. The Reset will restart it at the default speed. This can be seen more easily by displaying the PWM signal on the virtual oscilloscope. If the program needs debugging, the source code can be displayed and single stepping and breakpoints applied. A screenshot of the VSM debugging setup is shown in Figure 9.5.

The benefits of both the more extensive debugging and project management tools in MPLAB and the user-friendly interface of Proteus VSM can be realized by running VSM as the debugging tool from within MPLAB (Figure 9.6). When selected as the debugging tool in the MPLAB menu, a VSM viewing window opens, allowing the current program in memory to be run in interactive mode. Debugging and program modification are still carried out using the

PIC Microcontrollers-1250

same MPLAB controls and facilities. However, if the schematic needs modifying, it must be re-edited in ISIS itself.

Leave a comment

Your email address will not be published. Required fields are marked *