Home => Gerd's AVR simulator
(Diese Seite in Deutsch:
)
Gerd's AVR simulator
AVR assembler simulator for the stepwise execution of assembler
source code - with many extras. Click here if you hate simulators.
- Simulates AVR 8-bit microcontrollers of any type (ATtiny, ATmega, etc.) in
assembler.
- Just as if you would jump into the controller and you'll see what it does
with your source code.
- Necessary is the source code file only (in *.asm format).
- Assembles the source code with the built-in assembler gavrasm, fast and reliable.
- Allows control over registers, flags, memories, ports, timer/counters, AD converter,
etc.
- All is displayed in a convenient form and available only if really needed.
- Can be used to devellop assembler software from scratch as well as for existing
projects.
- Well suited even for older projects because of the support for all older AVR
chip types.
- Stand-alone solution: includes anything needed for all its features, no additions
necessary, no dependencies, no installation necessary. Works out of the box
"like a charm" (a new user).
- Useful to understand AVR controller's hardware and to learn assembler from
scratch: each additional codeline can be assembled and simulated, and it can
immediately be seen what it does within the controller. Forget the "Assembler
is complicated to learn!" statements: it is easier to learn than any other
language and is highly transparent with the simulator.
- Simple handling, no extended learning phase required,
- Works under Windows and Linux, 64-bit executables downloadable,
- Lazarus-Pascal source code available for free for own modifications,
- Fast and comfortable start of new assembler projects, fills in standard
text frames for structured source code in a short or in a comprehensive
format, for linear as well as for interrupt-oriented programs,
Left the comprehensive version, right with interrupt vectors,
A short version without any extras is also available,
- From Version 1.8 on a comfortable device selector is on board, that
allows to select AVRs (types and packages) by selectable hardware
requirements,
- Editor for modifying of the assembler source code with several
helpful features,
- The editor, from version 1.7 on, has a syntax highlighter which provides
multiple opportunities for its configuration:
- Forgot the mnemonic of an instruction in AVR assembler, forgot how many
clock cycles it needs or which flags are affected? No problem in avr_sim.
From Version 2.1 on an instruction list comes up and you can search and
find what you need,
- Display of header symbols, ports and interrupts of the applied AVR
type,
- Display of the hardware configuration for PDIP-/SOIC- and QFN-packages,
- Insert the hardware into the source code by simply typing F2:
- Internal assembler gavrasm for quick modification and assembling of
code,
- Comfortable setting and clearing of breakpoints, storing breakpoints in and
loading them from the project file,
- From version 2.3 on: Scan- and alarm function: counts, beeps and/or stops if a
register or a register pair, a portregister or a portregister pair, a SRAM location
or a SRAM pair is written, written with a preselected value or read,
- Control of the simulation in a simulator window,
- Simple overview over I/O ports and timers,
- Display of SRAM content,
- Display of EEPROM content as well as correct Write and Read operations,
- Display and simulation of the watchdog timer,
- Display, simulation and manipulation of ADC channels, from version 2.7 on including
configurable differential channels and temperature measurements,
und
- as extra a design aid with a 12/16-key resistor matrix and voltage input via keyboard,
from version 2.7 on including internal reference voltages,
and display of the key's voltages,
- Configurable four-channel scope for displaying polarity changes on
output compare pins or on any available I/O pin of the device,
- Scope display for R/2R analog values on ports with configurable resolution and
in up to four different channels simultanously in selectable colors,
- Scope display of internal Digital-to-Analog converters for those AVR types that
have these available,
- From version 2.8 on: scope channels can be displayed as stack, so the different
channels do not overwrite others.
You can now fix the time scale of the display.
- You need a short view some hundred lines above in your code? Just open a new codeview window,
your editor is not affected by this, try copy and paste between the two code windows,
- Simple and fast display of decimals in registers and of register pairs - place the mouse
over the register and you'll get what you need!
- From version 2.5 on: register save mode (for all changes of registers) and trace
mode (for all configurable register-, portregister- and SRAM-content) as .csv file
for export to an external spreadsheet.
- From version 2.6 on: Simple jumps (Jump to) during simulation, also as call to
a subroutine (Call) or for simulating an interrupt with cleared I-flag (Call ISR),
- New in version 2.9: avr_sim now simulates interrupt-driven transmit and receive
via the serial UART(s):
- New from version 2.9: avr_sim now performs a user statistic on the internet.
Counted are the applied AVR types and the open windows during simulation. Don't
be afraid: all is anonymous and you can see in your browser's address field, what
has been sent!
2.1 The latest version
Version 2.8 of the software fixes several minor bugs and improves
the scope display (stacked channels, fixed time scale).
My Linux version produces a strange error in the timer's prescaler
field. When this happens, TCNT is not updated any more. Please report
back if your Linux version produces the same error.
2.2 Lazarus Pascal source code
The source code is written in Pascal and compiles with Lazarus. A Windows and
Linux version of the source code are provided (if different).
2.3 Executables
Executable 64-bit versions are available for Windows and for Linux. The
Windows executable is available in a short version and in a
debug version (with range checking features enabled). If you need
executable versions for other or for older 32-bit operating systems,
compile the source code with Lazarus. The handbook describes how to do
that.
The handbooks for the different versions are available in English and in
German language. It holds relevant information for installing avr_sim, for
compiling of the program with Lazarus and describes all features provided.
A brief description of the software internals of avr_sim is added.
To the download page
4.1 Monthly accesses
This shows the monthly accesses to the avr_sim website and the
downloads of Linux- and Windows-files. It seems that the handbooks
are useful.
4.2 Accesses by versions
This shows the accesses to the different versions of avr_sim.
New releases come every three to four monthes.
4.3 Accesses by executables vs. sources
The share of self-compilators among the total downloads is
high.
5 Links to uses and users of avr_sim
The following internal webpages use avr_sim:
- The starter course here uses
avr_sim as instrument for introducing the first assembler projects and to
visualize the effect of assembler instructions.
- The micro-beginner course here
uses avr_sim to understand key AVR instruction execution and basic techniques
in assembler programming of AVRs.
- This webdocument
describes the execution of codes by an AVR and uses avr_sim to show what
is going on internally.
- This document
uses avr_sim to visualize the execution of interrupts.
- This page on
handling date and time demonstrates the handling of date and time info by
using avr_sim.
- This
demonstrates of avr_sim's built-in device selector.
- This here
uses avr_sim's ADC simulator to follow program execution with key encoders.
- This uses avr_sim's capability to
measure execution times of delay loops in LCD applications.
Anthony Peck has used avr_sim to follow his generation of random numbers with an
ATtiny13 in his
blog,
associated with a video demonstrating
the calculation process.
Please send more application reports on avr_sim to gavrasm (at) avr-asm-tutorial.net.
©2017 - 2022 by
http://www.avr-asm-tutorial.net