Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Appendix A: Programming a Microcontroller
Simulator is activated by clicking on DEBUGGER > SELECT TOOL > MPLAB SIM, as shown in figure. As a result, several
icons related to the simulator only appear. Their meanings are as follows:
Starts program execution at full speed. In this example, the simulator executes the program at full (normal) speed
until it is halted by clicking the icon below.
Pauses program execution. Program can continue executing step by step or at full speed again.
Starts program execution at optional speed. The speed of execution is set in dialog Debugger/Settings/Animation/
Realtime Updates.
Starts step-by-step program execution. Instructions are executed one after another. Furthermore, clicking on this
icon enables you to step into subroutines and macros.
This icon has the same function as the previous one except it has the ability to step into subroutines.
Resets microcontroller. By clicking this icon, the program counter is positioned at the beginning of the program
and simulation can start.
Similar to real environment, the first thing that should be done is to reset the microcontroller using the option DEBUGGER
> RESET or by clicking reset icon. As the consequence of this, a green line is positioned at the beginning of the program
and program counter PCL is cleared to zero. Refer to the window Special Function Registers shown below.
Apart from SFRs, it is good to have an insight in File Registers. A window containing them appears by clicking the VIEW-
http://www.mikroe.com/en/books/picmcubook/appa/ (20 of 21)5/3/2009 11:35:35 AM