Home => Gerd's AVR simulator => Simulator-haters    (Diese Seite in Deutsch: Flag DE) Logo


I hate simulators, why should I use this one?

Now, simply speaking: because it is very useful also for many other purposes than only for simulation.

Useful: the editor

If you work with other editors, temperary use of avr_sim's editor can be useful. You have all relevant include files in the tabulator on top, no messing around with opening and closing the different editor files.

And: syntax-highlighting is simple and effective in avr_sim's editor. Quick changes to colors and text formatting can be made and those can be stored and recovered.

The F2 key brings an ASCII picture of the chip, so you can simply paint a schematic of your hardware. No messing around when writing source code with un-identifiable port pins, anything is available right on top of your source code.

Also useful: assembling with a click

avr_sim assembles your source code with the build-in gavrasm assembler. The detected errors can immediately be corrected with two clicks. No messing around with assembler batches, with extra listings where you don't find the associated source code lines. Anything is immediately at hand.

Very useful: the device selector

On start-up of a project it is useful to find out, which of the more than 400 AVR types fit to the hardware needs. No problem, avr_sim's device selector provides a tool for the selection, without having to consult Microchip's large excel files to find out what is the most effective device for those needs.

You just need a view on the pin numbers of your selected device? Starting avr_sim, clicking "New" and "Device selector" and to click on your device and its package is much faster than downloading the device's databook (or otherwise search for it in your harddrive), opening it and going 15 pages down to see the pin names and numbers. Once installed, already that saves lots of wasted time.

Also useful: assembler source code templates

On starting an assembler project, you'll have to write standard start-up text to structure your source code. With or without interrupts, a short test or a large project with lots of ISRs and includes, etc.. All that typing consumes wasted time that you should rather use for genius ideas in your project than for just typing in semicolons and lines with asterisks as headers or to generate an interrupt vector jump table for the selected device. avr_sim relieves you from typing all that in standard templates. With a click on "New" and with a few additional entries you'll get a source code template that fits exactly to your needs, with a complete interrupt vector table (only if needed) and all the standard headers. Even if you then save the template and close avr_sim and work with another editor and this template: the time that you saved, already with one such template, is balancing the time for downloading avr_sim and unzipping by far, and even re-compilation of avr_sim with Lazarus is shorter than the saved time by having one such template.

You are on a different operating system besides Windows and Linux?

If so, re-compile avr_sim's source code with Lazarus for your operating system. avr_sim then also runs on all Lazarus-supported systems ("Write once, compile everywhere"). No need to download 1 GB large installation software like ATMEL's Studio, married with an equally large NET environment, no need to mess around with virtualization to run the Studio in other environments, no need to start sitting around with question marks in your eyes after the USB drivers fail to install in your virtual machine (some of them even fail within a native Windows environment), etc. etc. Anything runs correct and you can focus on the AVR instead of those artificially generated by-product-problems.

You need to know which value a symbol has in the device's include file?

No problem with avr_sim: Just open the "View" and "Symbols" and type in (parts of) its name in the search field. Must faster than to download the include file with downloading 1 GB Studio software with Microsoft's NET package, searching for the include file, to open it in an editor and to search for it's name. Immediately at hand here.

Forgot a mnemonic

If you already opened an asm file with avr_sim ("New from asm"), you re-open the project at any time and, by clicking into the editor's text with the right mouse button (if you are a right-hander) you can search the complete list of assembler mnemonics, with all flags, clock cycles, etc.. Just copy it into your source and save the file. The other editor should realize that the file has been changed and to reload it. No need to click through lots of unneeded menu entries of the Studio to find the mnemonics list there.

Conclusion: Try it out.

No need to simulate something, there are enough reasons to use it even if you still hate simulation. Probably you simulate a project then, and you'll find out that it runs smoothly in the simulator or why the timer interrupts do not work in your case. No need to add a LED and a resistor to your hardware and to change the Interrupt Service Routine in your source code to blink it, simply to find out that you forgot to init the timer's interrupt enable or that you switched on the prescaler value on another timer but not your desired one.

No need to get addicted to avr_sim and simulation, just another simple tool to debug.

Try it out, and if it solves more problems than it creates it will be of value for you.

©2020 by http://www.avr-asm-tutorial.net