Mikroelektronika MIKROE-350 Data Sheet

Page of 526
SOFTWARE SIMULATOR OVERVIEW
The Source-level Software Simulator is an integral component of the mikroBasic
PRO for AVR environment. It is designed to simulate operations of the AVR MCUs
and assist the users in debugging Basic code written for these devices.
After you have successfully compiled your project, you can run the Software Simu-
lator by selecting Run › Start Debugger from the drop-down menu, or by clicking
the Start Debugger Icon         from the Debugger Toolbar. Starting the Software Sim-
ulator makes more options available: Step Into, Step Over, Step Out, Run to Cursor,
etc. Line that is to be executed is color highlighted (blue by default).
Note: The Software Simulator simulates the program flow and execution of instruc-
tion lines, but it cannot fully emulate AVR device behavior, i.e. it doesn’t update
timers, interrupt flags, etc.
Watch Window
The Software Simulator Watch Window is the main Software Simulator window which
allows you to monitor program items while simulating your program. To show the Watch
Window, select View › Debug Windows › Watch from the drop-down menu. 
The Watch Window displays variables and registers of the MCU, along with their
addresses and values.
There are two ways of adding variable/register to the watch list: 
- by its real name (variable's name in "Basic" code). Just select desired  
variable/register from Select variable from list drop-down menu and click the
Add Button                  . 
- by its name ID (assembly variable name). Simply type name ID of the 
variable/register you want to display into Search the variable by assemby name
box and click the Add Button                  . 
Variables can also be removed from the Watch window, just select the variable that
you want to remove and then click the Remove Button                         .
Add All Button                       adds all variables.  
80
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Environment
mikroBasic PRO for AVR
CHAPTER 2