Download and install SimulIDE electronics simulator IDE interactive development environment. Select Windows, Linux or MacIntosh 32bit or 64bit software. Donations are welcome.
Open a blank circuitYour cursor adjusts the windows all the way to the edge of the screen. Tutorials available to explain right and left clicks, menus, cursor indications.
Click File Explorer - Examples -> Micro -> Arduino. We see a list of example circuits for Arduino with written sample.ino sketches. Open arduino_music.
Pull arduino_music.sim1 into the blank circuit area or double-click.
Click the red ON/OFF button at the top of the screen. Sound should come out your computer speakers.
Click the pause II button. Sound will stop. For safety the circuit will shut down when you change components or software. Click ON/OFF to restart.
Notice in File Explorer we see files for the simulated circuit, an executable hex file and the arduino sketch arduino_music.ino.
Right Click MenuRight click directly on the Arduino Uno image and we see a menu of extremely useful commands.
Technical details. We see arduino_music.hex is the loaded Firmware. Arduino Uno boards use an oscillator circuit, a piece of crystal, Atmega328 chips have a 16MHz circuit that you do not need to enable.
Hex file arduino_music.hex loaded when the circuit started. We can reload with this command or find other hex files that will work. SimulIDE comes with many hex files compiled for the Atmega328p processor and example circuits for AVR.
Arduino IDE generates hex files you can copy and use with the menu command Sketch-> Export compiled Binary. You can setup SimulIDE to compile hex files using assembler, C/C++, WinAVR. Hex files from MPLab, Code::Blocks and Atmel Studio will work.
Right-click on the board to get menu. Load Firmware and navigate to hex file.
MCU MonitorWe see inside the processor. This arduino sketch modulates PWM output pin 9 so type PORTB into the Name column. Watch the digits change.
Just like with a real board. Our simulated arduino can receive on the UART circuit and transmit out to our PC. Edit arduino_music.ino sketch and turn on debug option to see the notes being played.
The editor closes into the right margin. Open the editor. Double click on the sketch file arduino_music.ino or open file. You can setup SimulIDE for Arduino to edit sketches here, compile and upload.
Right-click directly on the speaker icon and select properties. Default is to simulate an 8ohm electromechanical speaker but we can change impedance and select buzzer type component.
Comments
Please log in or sign up to comment.