Home

Proteus VSM AVRStudio® Viewer

The Integrated Solution for AVR Development

The Proteus VSM AVRStudio viewer provides the link between schematic capture and embedded software development, allowing Proteus VSM to function as a plug-in simulator for the AVRStudio 4 IDE. Together with Atmel we have developed a true plug and play solution which enables seamless design flow from schematic capture through software design, compilation, debugging and co-simulation.

Proteus Licensing Options

  • A purchased, professional licence for Proteus VSM will allow you to run the pre-supplied Virtual Evaluation Boards/Application Notes and also to create, edit or otherwise customise any schematic to suit your design requirements.

  • Copies of Proteus which do not have a purchased, professional licence will allow you to load and run pre-supplied Virtual Evaluation Boards/Application Notes but will not allow you to modify the electrical connectivity of the schematic or design custom schematics for your own projects.

You can purchase a professional licence at any time by right clicking in a free area of the viewer and selecting the ‘Buy Full Version Online’ from the resulting context menu.

Using Proteus VSM and AVRStudio

  • Why Use the Proteus VSM Viewer?

  • Getting Started with the AVRStudio viewer

  • A Guided Tour of the AVRStudio viewer

  • Taking Measurements and Analysing Data with the AVRStudio Viewer

  • Debugging and Diagnostic Tools

  • Limitations of the free Proteus VSM AVRStudio Viewer

  • Icon Reference

  • Context Menu Reference

Please email support@labcenter.com with any technical queries or problems.


Context Reference

PROTEUS VSM AVRSTUDIO® VIEWER

The Context Menu

The context menu in the Proteus VSM Viewer is accessed via the right mouse button. It acts dynamically, greying out options that are not available, either because the simulation is running or because the option has no meaning at the point where the mouse was clicked. The following summarises the functionality of each option in the context menu.

Open

This presents you with the standard File Open dialogue allowing you to load a different Proteus schematic into the viewer. For your convenience the pre-supplied Evaluation Boards and Application Notes can be accessed directly from the places bar at the left of the dialog box.

Save

This allows you to commit changes to the schematic such as resistance, capacitance values and processor clock frequency. You can change the electrical connectivity of the schematic by launching the schematic application via the ISIS icon.

Save As

This allows you to save the design under a different name. This would typically be used where you were exercising different values for components in an evaluation board or application note and wanted to save several different configurations.

Print

This option will print the schematic (or specified schematic area) using your default printer. It also provides several options for scaling the schematic to paper size and allows configuration of the print job.

Printer Setup

This presents you with the Windows standard Printer Setup dialog form to allow you to configure the print job.

Set Area

Use this option if you want to print only a portion of the schematic. After selecting this option the cursor changes and you can use the mouse to drag out the area you want to print. If you want to deselect a previously specified print area simply re-invoke this command and left click once on the schematic.

Reset Popup Windows

The Proteus VSM viewer will launch popup windows where appropriate for various instruments and peripherals that may be on the schematic (the I2C & SPI protocol analyzers, Oscilloscope and Virtual Terminal amongst others). These can be positioned, resized or indeed closed and re-opened during simulation to maximise screen real estate and the status of each popup is persistent across simulation sessions. This command will reset all the popup windows in a design to their default states.

Reset Persistent Model Data

Proteus VSM models implement persistence of memory (EEPROM for example) exactly as real world devices do. This means for example, that after writing to an I2C memory, the memory contents will persist across simulation runs and AVRStudio sessions. All of the persistent model data in the design can be reset globally via this command.

Set Animation Options

This option will launch a configuration dialogue allowing to customise both the appearance of the schematic during simulation and the tolerances and general behaviour of the simulation engine. We would recommend that this be used only by advanced users of the software with a firm understanding of software simulation principles of operation.

Edit Properties

This option, only enabled when the mouse is over a component and the simulation is not running, allows you to change the properties of that component. This can be used for example, to change the capacitance of a capacitor, the resistance of a resistor, the clock frequency of a microprocessor and so on as well as to set the initial values for memories etc.

Operating Point Info

When the simulation is running or paused this options provides a snapshot view of the pin states of the object under the mouse. This option will be disabled/greyed out unless the mouse is over a schematic component and the simulation is either running or paused.

Simulate Graph

This option is enabled when the simulation is not running and the mouse is over a graph object. It will then run a simulation for the time specified on the graph and display the results on the graph after the simulation pass is complete.

Dynamic Simulation Items

Many objects in Proteus (processor models, virtual instruments, EPROM memories etc.) provide access to their internal memory spaces, have their own debugging/trace windows or otherwise produce informative popup windows. These options are obviously dependant on the component being on the schematic and so are dynamic, only becoming visible and selectable when a simulation is in progress.


Diagnostics

PROTEUS VSM AVRSTUDIO® VIEWER

Debugging with the Proteus VSM AVRStudio® Viewer

While the ability to execute your code and watch it propagate through your entire embedded system certainly helps verify that your firmware is correct, where Proteus VSM really saves you time is when something is not working correctly and you need to isolate and correct the problem. The following discussion details some of the debugging techniques available to you within the Proteus VSM AVRStudio viewer.

Basic Debugging Tools

One way to think of the viewer is as a ‘Virtual ICE’ where the hardware is presented to you as a schematic instead of a physical prototype. This means that Proteus is slaved to the AVRStudio environment and you can single step your code in AVRStudio, monitoring the effects of code execution on the schematic. Better still, because you are working in a software environment the entire system will ‘freeze’ in time after every step (without the associated problems such as capacitors discharging that would occur in a physical prototype).

The following guide will cover the basics of single stepping and code navigation of a system level simulation as well as detailing the procedure for injecting values directly into the system via the AVRStudio environment. Prior to starting this walkthrough you should have one of the pre-supplied sample projects loaded inside the AVRStudio environment, with Proteus VSM configured as the debugger – please see getting started for more information.

Single Stepping with Proteus and AVRStudio

  1. Start by connecting the simulation to the AVRStudio environment via the green button at the top right of AVRStudio.
  2. Note that at this point the simulation has connected but no simulation time has elapsed. This is shown on the status bar at the bottom of the Proteus VSM Viewer.

  3. To take a closer look at what is happening we can set breakpoints and single step within AVRStudio. Since we are working inside AVRStudio the control commands are exactly as normal – refer to the AVRStudio documentation for more information.

  4. Having set a breakpoint we can now run the simulation via the Play button at the top of the AVRStudio IDE. The simulation will advance, executing the firmware through the virtual hardware until the breakpoint is reached. At this time, the entire system will pause in time, allowing us to examine a ‘snapshot’ of the circuit at this point in time and to single step our code.
  5. All of the available debug windows are presented to you when the simulation is paused via the right click context menu. Crucially, this includes for example, memory dumps of peripherals external to the processor as well as internal processor information. In the screenshot below for example, we have an I2C EEPROM and a graphical LCD display on the schematic and can therefore view/watch their contents as we single step our code.
  6. When the simulation is free running all the debug windows will disappear (to preserve screen real estate and allow you to interact with the simulation). If the simulation is paused at a breakpoint or you are single stepping your code then all of the debug windows will again be visible or launchable from the context menu. As with the instrumentation, you can close any window via the cross at the top right of the popup window and re-launch it (when the simulation is paused) by right clicking on an empty area of the schematic and selecting the window from the resulting menu.

Diagnostic Tools

Diagnostic tools (sometimes known as trace modes) provide a powerful method of interrogating parts of the system during simulation. Essentially what you do is specify the on-board or system peripheral(s) that you want to monitor and you then receive a detailed textual report as the simulation progresses, informing you of all activity on these peripherals. Think of this as ‘lifting the lid’ on a component to better see what is happening as the simulation progresses.

The following example shows how to configure diagnostic reporting for the AVR’s ADC module. You can of course interrogate any on-board peripheral (as well as system peripherals!) in exactly the same way. In our example we are configuring ADC diagnostics but of course any diagnostic option(s) can be enabled depending on your design and debug requirements.

Using Diagnostic Tools and the Simulation Advisor

  1. Launch the configure diagnostics tool from the Proteus VSM Viewer.

  2. Select the AVR Microcontroller, then ADC Events and set to Full Trace mode.

  3. Close the dialogue form and connect Proteus to the AVRStudio IDE.

  4. Launch the Simulation Advisor from the bottom right of the Proteus VSM viewer and position in a free area of the workspace.

  5. We then start and run the simulation and then stimulate the schematic such that ADC conversion occurs We can see that all ADC events are logged in the simulation advisor.
  6. When you are finished disconnect the simulation from the AVRStudio IDE.


GettingStarted

Proteus VSM AVRStudio® Viewer

Getting Started with the Proteus VSM AVRStudio® Viewer

A number of application notes and evaluation boards have been created in Proteus VSM and come pre-supplied and ready to use with the Proteus software. The following example provides a ‘getting started’ guide to configuring Proteus to work with AVRStudio®.

Loading and Running a Proteus VSM simulation on the STK500 Evaluation Board :

  1. Launch the AVRStudio IDE application, go to the Project Menu and select the Open Project command. Navigate to the Samples directory of your Proteus installation (by default this will be C:\program files\Labcenter Electronics\Proteus 7 Demonstration\Samples\) and then the VSM AVR Studio Viewer\Eval Boards\STK500 with MEGA48. directory. Finally, open the test.aps workspace.

  2. We now need to associate the Proteus VSM Viewer with the AVRStudio IDE. Start by going to the Debug Menu in the AVRStudio IDE and clicking on the Select Platform and Device command.

  3. From the resulting dialogue form, specify Proteus VSM Viewer as the platform and the processor being simulated as the device. In our case, this is the MEGA48 as we are going to run the STK500 schematic with the MEGA48 processor wired on.

  4. You should now see that the Proteus VSM Viewer has opened inside AVRStudio. If the viewer is not visible you can launch it again from the View Menu – Toolbars – Proteus VSM menu option.

  5. Use the Open Icon on the viewer and select for example the STK500_MEGA48 schematic from the resulting file selector.

  6. Select the Build command from the Build Menu in AVRStudio to ensure that our project code is both compiled and ready for simulation.

  7. Now that we have the schematic and project we can start the simulation. Use the green button at the top of the AVRStudio IDE to connect the Proteus simulation to AVRStudio.

  8. At this point the simulation is paused at time zero. Start the Simulation by clicking on the Run button near the top right of the AVRStudio IDE. This will execute the program code and the VSM Viewer will show you the effects of your program on the design.

  9. You are now simulating the standard Atmel firmware in a virtual environment. Try pressing the buttons towards the bottom right of the schematic to activate the LED’s for example.

This is clearly not the most exciting of schematics/projects and is provided to introduce the concepts of virtual prototyping. We recommend you have a look at some of the other pre-supplied sample designs to familiarise yourself with the types of project that can be prototyped in Proteus.

While there is clear benefit from exercising our code through a virtual system (we can tell immediately that our button response code and LED routines are working correctly for example) there is far more to working with Proteus and AVRStudio than simply free running a simulation. The following topics include some simple practical examples with the STK500 board you currently have loaded and we recommend you work through them

See also:

Measurement and Analysis with the Proteus VSM Viewer

Debugging and Diagnostics with the Proteus VSM Viewer

Additional functionality of the Professional Proteus VSM Viewer


GuidedTour

PROTEUS VSM AVRSTUDIO® VIEWER

A Guided Tour of the Proteus VSM AVRStudio® Viewer

The Proteus VSM AVRStudio viewer is designed to allow you to simulate and interact with Proteus schematics inside AVRStudio. It is fully functional as a viewer, providing everyone with the ability to run and debug with pre-supplied application notes and virtual evaluation boards. Editing functionality however, is available only to licensed users of the Proteus VSM software, who can therefore design and test their own projects.

The following discussion provides a broad overview on working with a schematic inside the Proteus VSM viewer - details on loading the pre-supplied schematics into the viewer can be found here

Context Menus

As with almost all Windows applications most actions on the viewer can be accessed via the right mouse context menus. These allow you to place measurement instruments, edit component properties, launch simulation windows, navigate through sheets and so on. Context menus are dynamic in the viewer so, for example, when you right click over a component you have an option to edit the components properties and when you right click in a free area of the schematic you can navigate sheets.

Additionally, the options available to you when Proteus is connected to AVRStudio are different from those presented to you when a simulation is not in progress. This makes sense as, for example, it would not be a good idea to allow you to delete the AVR Microcontroller from the schematic during a simulation and would be similarly pointless to launch a popup window showing the contents of an I2C memory when the schematic is disconnected from AVRStudio.

In particular, note that to place and wire virtual instruments or to edit component values requires that Proteus is disconnected from the AVRStudio environment.

It is not possible to edit the connectivity of the schematic (for example, rewiring an existing circuit or creating your own schematics) without a professional licence for Proteus VSM. Once purchased, you can both create your own designs and modify the connectivity of existing schematics.

Navigating the Schematic

Once we have a schematic loaded in the viewer we need to be able to navigate around the schematic and view certain portions of it as required. This typically falls into two categories; navigating within a sheet on the schematic and navigating across sheets on the schematic.

Navigating Within a Sheet

This is by far the most common type of navigation, where you want to zoom into (or out of) a particular area of the current sheet or re-centre the display on a portion of the schematic.

You can change the display of a sheet in one of the following four ways:

  1. Use the Zoom In and Zoom Out icons to change the magnification of the current view. This will change the magnification but not re-centre the display.

  2. Use the Pan icon to re-centre the display at the current magnification at the point subsequently selected by the mouse button.

  3. Click the middle mouse button and then move the mouse. This will ‘pick up’ the entire schematic and re-centre according to the motions of the mouse. You can also roll the middle mouse wheel during this operation to simultaneously zoom and pan. Left click the middle mouse button when you are finished to exit ‘track pan’ mode.

  4. Zoom in and out with the mouse wheel. This has the advantages of being quick and also that the display will re-centre around the current cursor position.

  5. Zoom in to a particular area of the board by selecting the Zoom to Area icon and dragging out an area of the schematic (left depress the mouse and drag). Holding the SHIFT key down and left dragging the mouse will have the same effect.

You can re-centre the display and magnification such that the entire sheet is visible in the viewer at any time via the Zoom to Sheet icon.

All the icons referenced above are detailed here.

Navigating Between Sheets

With more complicated, hierarchical schematics, it is sometimes necessary to navigate between sheets on the schematic. This is achieved via the sheet navigation icons at the top of the viewer or by right clicking in a free area of the schematic and selecting the sheet from the resulting context menu as shown below.

Navigating to a Sheet via the Context Menu.

Configuring a Schematic Prior to Simulation

You will almost certainly want to edit component values prior to starting the simulation (if only to set the correct clock frequency for the processor!!) and the Proteus VSM viewer allows you to do this as follows :

To Edit a Component Value:

  1. Make sure that a simulation is not in progress (see the screenshot below) and move the mouse over the component to be edited.

  2. Right click on the component and select edit properties from the context menu.

  3. From the resulting dialog box change values as required. For example, with a processor you can specify the clock frequency, with a resistor change the resistance, with a terminal the baud rate and so on.

  4. Hit the OK button on the dialog to commit the change.

Full customisation of schematics is possible with a professional version of the Proteus software, where you can use the ISIS icon to modify the connectivity of the schematic.

Running a Simulation

Having arranged the display and edited the component values as required we now want to run a simulation. This is done in AVRStudio either via the connection icons as shown below or via the Start Simulation command on the Debug menu.

The simulation status icons both when stopped (left) and when simulating (right).

The simulation will start up and pause immediately (before any simulation time has elapsed). This allows you to move popup windows, set breakpoints in AVRStudio and otherwise set up your debugging environment prior to setting the simulation free running. The Run command from the Debug menu or the F5 shortcut key can then be used to set the simulation going.

When the simulation is running the viewer acts as your virtual testbench. This means that you can use the mouse to hit buttons, flick switches, adjust gain on pots, temperature on thermostats and so on. You can also use the keypad model, virtual terminal or indeed analog & digital generators to provide a command interface or stimulus to your program (provided the schematic contains these parts of course!).

The debugging interface is identical as that for a standard AVRStudio session – start/step/run etc. along with the AVRStudio watch window and debugging windows can all be used exactly as normal. Please see the AVRStudio help documentation or the section on debugging techniques for more details.

Managing Screen Real Estate During Simulation

When the simulation is running you may end up with a plethora of popup windows for the various debugging tools and information displays available to you. These can all be moved to anywhere within the AVRStudio IDE and will remember their positions between simulation sessions. Alternatively, they can all be closed via the cross at the top right of their window and re-opened via the simulation icons or via the right mouse context menu as required.


IconReference

PROTEUS VSM AVRSTUDIO® VIEWER

Icon Reference

While the general operation of the Proteus VSM Viewer is intuitive and straightforward we have listed the icons available together with a brief description of what they do below:

Open Icon

This icon will launch the Open File dialogue form allowing you to load a different Proteus schematic into the viewer. For your convenience the pre-supplied Evaluation Boards and Application Notes can be accessed directly from the places bar at the left of the dialog box.

This option is only enabled when a simulation is not in progress.

Save Icon

This allows you to commit changes to the schematic such as resistance, capacitance values and processor clock frequency. If you are using a pre-supplied virtual evaluation board or application note you will be prompted to save the design under a different name.

This option is only enabled when a simulation is not in progress.

Print Icon

This option will print the currently loaded schematic or a specific area of the schematic if specified by the user. The resulting dialog also provides several options for scaling the schematic to paper size and allows configuration of the print job.

Printable Area Icon

By default a print action will print the entire schematic. If, however, you only want to print a specific section of the schematic use this command. The cursor will then change and you can use the mouse to drag out the area you want to print. If you want to deselect a previously specified print area simply re-invoke this command and left click once on the schematic.

ISIS Icon

This option will launch a copy of the ISIS schematic capture package with the design currently in the viewer preloaded. Users can then edit, delete, rewire or otherwise the schematic to suit the requirements of their current project. Saving the design in ISIS will then cause the viewer to reload the now modified schematic.

If you invoke the ISIS package and make changes while a simulation is running on the viewer, the simulation will automatically stop when you commit the changes in order that the newly modified schematic can be loaded into the viewer.

This option is limited to licensed professional users of the Proteus software as a professional version of the capture package (ISIS) is necessary to modify the connectivity of designs.

Configuration Diagnostics

This option will launch the configure diagnostics dialogue form, allowing you to specify diagnostic reporting for peripherals of interest on the current schematic design. More information on diagnostics can be found here.

Help Icon

Selecting this option will launch this help file.

Pan Icon

This icon is used for navigating around the schematic, and specifically for repositioning the display on a different portion of the schematic. After selecting this icon left click on the point on the schematic on which you would like the viewer to centre it’s display. This command together with the zoom commands detailed below provides complete control over the display area.

Zoom In Icon

This icon allows you to increase the magnification on the schematic. Note that this will zoom in around the current centre of the schematic - you can use the Zoom to Area command detailed below to zoom in on a particular section of the schematic.

You can also use the mouse wheel to zoom in (or out) of the area pointed to by the mouse.

Zoom Out Icon

This icon allows you to decrease the magnification on the schematic. Note that this will zoom out around the current centre of the schematic - you can use the Zoom to Area command detailed below to zoom in on a particular section of the schematic.

You can also use the mouse wheel to zoom out (or in) of the area pointed to by the mouse.

Zoom to Sheet Icon

This icon will reset the magnification and re-centre the schematic such that the complete schematic is visible on the viewer screen.

Zoom to Area Icon

This icon is used to zoom in on a specific area of the schematic, both increasing the magnification and centring the display around the selected area. When invoked the cursor will change and you can then drag out the area you want to zoom in to with the left mouse button.

You can also zoom in on a particular area of the schematic by holding down the SHIFT key on the keyboard and dragging the area out with the left mouse button.

Goto Sheet Icon

This command will launch a dialog form which enables you to navigate between different sheets on a hierarchical design.

Enter Child Sheet Icon

This command allows you to enter a specific child sheer on a hierarchical design. After invoking the command, the cursor will change and left clicking the mouse on the parent component will switch the view to the child sheet for that component.

Exit to Parent Sheet Icon

This command will exit the current child sheet in an hierarchical design and switch the viewer display back to the parent sheet.

Simulation Log Icon

This icon will launch the Proteus VSM simulation log, which contains a wealth of information on the state of a simulation as well as providing warnings of net contentions and other diagnostic information.

This option is only enabled when a simulation is in progress.

Watch Window Icon

This command will launch the Proteus VSM watch window. Right clicking on the watch will then allow you to add items from the processors memory spaces (and internal data structures) for monitoring.

You can add a watchpoint condition via the context menu on the watch window, specifying a condition on a watch window item which, when satisfied, will cause the simulation to pause. This is an extremely powerful debugging tool. For example, to pause the simulation when a timer overflows or when a specific value is written to a port.

Items can be dragged and dropped onto the watch window from any other memory window launched on the viewer. This means for example that you could launch the I2C memories memory contents, highlight a memory address and drag it onto the watch window and then visually monitor it as the simulation progresses.

This option is only enabled when a simulation is in progress.

Virtual Oscilloscope Icon

This icon allows you to launch the Virtual Oscilloscope for analysis during a simulation.

This option is only enabled when a simulation is in progress and an oscilloscope is present on the schematic.

Logic Analyser Icon

This icon allows you to launch the Virtual Logic Analyser for analysis during a simulation.

This option is only enabled when a simulation is in progress and a Logic Analyser is present on the schematic.

Virtual Terminal Icon

This icon allows you to launch the Virtual Terminal during a simulation.

This option is only enabled when a simulation is in progress and a Virtual Terminal has been placed on the schematic.

I2C Protocol Analyser Icon

This icon allows you to launch the I2C Protocol Analyser for analyses during a simulation.

This option is only enabled when a simulation is in progress and an I2C Protocol Analyser has been placed on the schematic.

SPI Protocol Analyser

This icon allows you to launch the SPI Protocol Analyser for analyses during a simulation.

This option is only enabled when a simulation is in progress and an SPI Protocol Analyser has been placed on the schematic.


Limitations

PROTEUS VSM AVRSTUDIO® VIEWER

Limitations of the Proteus VSM AVRStudio® Viewer

The main limitation of the Proteus VSM viewer is that you cannot directly change the connectivity of schematic of schematics within the viewer. That is, while you can adjust component values and properties you cannot, for example, rewire an LCD onto a different port.

This limitation does not apply where the user has a professional license for the Proteus VSM software as they can launch the ISIS schematic capture editor (via the ISIS icon) and thereby have full control over the schematic.

This is summarised below :

Ability to exercise code through a complete virtual system.

Ability to change component values (e.g resistances, capacitances, clock frequency, etc.).

Ability to place measurement instruments (e.g. oscilloscope) and analyse data.

Ability to single step debug both hardware and software synchronously in time.

Ability to interrogate devices to receive diagnostic reporting as the simulation progresses.

Ability to use and simulate all pre-supplied Evaluation Boards and App Notes.

Ability to edit the connectivity or rewire an existing schematic.

Ability to create a custom schematic tailored to your current project.

Where:

Available with the Viewer.

Requires Professional Licence.

You can purchase a professional licence at any time by right clicking in a free area of the viewer and selecting the ‘Buy Full Version Online’ from the resulting context menu.


Measurements

PROTEUS VSM AVRSTUDIO® VIEWER

Taking Measurements and Analysing Data

You can place and wire a number of virtual instruments onto the schematic from within the Proteus VSM viewer, allowing you to interrogate the virtual system during simulation. The full list of available instruments is provided below.

  • Oscilloscope

  • Logic Analyser

  • Counter/Timer

  • Signal Generator

  • Pattern Generator

  • Dual Mode I2C Protocol Analyser

  • Dual Mode SPI Protocol Analyser

  • TTY/RS232 Virtual Terminal

  • DC/AC Voltmeters and Ammeters

  • Voltage and Current Probes

Each instrument has a help file associated with it which can be launched by right clicking on the component (once placed), selecting Edit Properties from the resulting context menu, and then hitting the Help button at the right of the resulting dialogue form. This help file explains all the modes of operation for the instrument and provides a useful reference source in correct operation.

Launching the Help File from the Edit Component Dialogue of an Instrument.

It is important to realize that all pulses, signals and waveforms propagate through the wires on the schematic – there is no cheating or hidden communication between components. This means that you can place and wire any instrument at any place on the schematic to interrogate the design at that point.

The following is a basic procedural guide to placing and connecting instrumentation inside the Proteus VSM Viewer. You can follow this guide with any of the pre-supplied sample projects loaded, choosing an appropriate instrument for the design.

To place and wire a Virtual Instrument in the Proteus VSM Viewer:

  1. Ensure that you have one of the sample projects open with the Proteus VSM viewer visible. Refer to Getting Started for more information.
  2. Right Click the mouse on a free area of the schematic and select the instrument you wish to place from the resulting context menu. In the screenshot below we are placing an SPI Protocol Analyser.

  3. You should now see an outline of the instrument that will follow the mouse pointer around the viewer. Position the mouse pointer at the point that you wish to place the instrument and left click to commit placement
    .
  4. Having now placed the instrument we simply need to wire it up to the lines that we want to monitor. Start by hovering the mouse over a wire end – note that the colour of the mouse pointer will change to be green, indicating that we can start wire placement here.

  5. Now left click the mouse to start placing the wire and move the mouse towards the destination of the wire – this can either be a pin or another wire on the schematic. When the mouse is over a legal destination for the wire, left click again to place the wire and exit wire placement mode.

  6. Finally, now that we have wired the instrument we can run the simulation and monitor traffic with the instrument. Use the green button to connect and then the play button to start the simulation running.

  7. When the simulation is running you will see a popup window for the instrumentation. If you have more than one instrument on the viewer and/or you are also debugging you may wish to temporarily hide or show a particular instrument. You can close any instruments popup via the small cross at the top right of the popup and then launch the popup again from the appropriate icon on the viewer.


WhyUse

PROTEUS VSM AVRSTUDIO® VIEWER

Why Use the Proteus VSM AVRStudio® Viewer ?

The Proteus VSM Viewer can be thought of as a Virtual Prototyping Environment, effectively simulating your firmware on a schematic version of the complete embedded system. The Proteus AVR™ models run the exact same binary as that you would use to program a physical chip and all signals propagate through the wires on the schematic. This means that you can realistically design, test and debug both the firmware and the hardware prior to physical prototyping

Using the Proteus VSM viewer with AVRStudio has numerous advantages over traditional development techniques. These broadly fall into the following categories :

Price

When you consider that Proteus VSM includes over a dozen instruments, including a DSO, Logic Analyzer and I2C/SPI Protocol Analyzer, as well as a world class schematic and simulation environment, the cost of a full professional licence is a fraction of that for equipping an equivalent hardware lab.

Flexibility

Because you are working in a software environment it is the matter of minutes to rewire your schematic, change your firmware and retest. If you want to optimise or experiment with your hardware (or software!) design prior to prototyping you can do so quickly and in a transparent environment where the results of your mods can be seen instantly.

Changes to hardware design are as simple to make as changes to software design and the verification of changes (by running the simulation) is easy and fast.

Unique Features

Proteus VSM includes a number of features that either can’t be done or can’t be done easily in a hardware environment. For example,

Diagnostic messaging allows you to interrogate system components such that you receive a live textual report on all interaction between that component or peripheral and the rest of the system.

  • The Proteus simulation engine will monitor your system during simulation and automatically warn you of common hardware and software errors such as timing or logic contentions between system components, writing to illegal memory addresses or trashing the stack in your firmware, etc.

  • When you set a breakpoint or pause the simulation the entire system freezes in time. This means, for example, that unlike a hardware environment your capacitors won’t discharge, your motor won’t keep spinning and lose momentum, etc. When you single step debug the PICmicro™ model will execute the instruction stepped over, the effects of that instruction will propagate through the entire design and the system will then freeze in time.

  • Testing of firmware interaction with the system is easy and obvious. If, for example, you want to test that your temperature sensor code, you simply adjust the temperature on the peripheral and examine the response of the firmware. Compare this with the equivalent effort in a hardware prototyping environment.

Timesaving Costs

All of the above mean that it’s easier to test, analyse and debug, that’s it’s easier to modify and correct and that it allows you to rapidly advance project design. This is the VSM advantage.