We can run our programs on a simulated Arduino Uno.
Create a hex file of our programOpen the Arduino IDE program and open the Blink example program. Go to the menu File->Examples->Basic->Blink. Save the sketch into the default folder.
Export a compiled binary file, either Sketch->Export compiled Binary or use the Ctrl-Alt-S keys.
Next Show Folder by pressing Ctrl-K on the keyboard.
Blink.ino is our Arduino sketch and Blink.ino.standard.hex is the compiled file that we will use in our simulation. Blink.ino.with_bootloader.standard.hex will also work in your board.
Install and open SimulIDEDownload the SimulIDE software for your computer operating system. It is a free circuit simulation program, useful and easy. Linux software managers may offer older versions.
Open a blank Circuit and look for Arduino Uno in the left side panel.
Pull the little Uno board onto the main area. Right click your mouse on the Uno image and use the Load Firmware command.
Locate the hex file we generated in the Arduino->Blink folder.
Now we add an MCU monitor to see what is happening inside the controller.
Remember that the address in RAM for PORTB is hexadecimal 0x25. When PORTB has a value of 0x20 then Pin13 of the Uno board will have a +5v voltage and the built-in LED will light. When the value is 0x00 then the pin has no voltage and the LED will be off.
Start/Stop Simulator
The red power buttons at the top of the SimulIDE panel allow us to pause or power down our simulated Uno board. Try them.
Comments