profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/documentos/practicas... · web...

18
Arduino Simulation with Proteus We 'll show how to simulate the celebrated open-source electronics prototyping platform Arduino with Proteus .You can find other informations, project files and arduino software at its homepage . Let 's run ISIS Schematic: To simulate the core of Arduino platform we need only a few components: the atmega328P Microcontroller, a Crystal and two Capacitors.Let' s look for these devices in the library:

Upload: others

Post on 24-Apr-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

Arduino Simulation with Proteus 

We 'll show how to simulate the celebrated open-source electronics prototyping platform Arduino with Proteus .You can find other informations, project files and arduino software at its homepage.

  

 Let 's run ISIS Schematic:

To simulate the core of Arduino platform we need only a few components: the atmega328P Microcontroller, a Crystal and two Capacitors.Let' s look for these devices in the library:

Page 2: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

Click on "P" button and write atmega as keyword:

 Double click on the model and this appears under Devices panel:

Page 3: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

Same operations for the Crystal and Capacitor:

 

Page 4: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

Now we have all the components in the panel Devices:

  

Let 's click on the components and place them on the layout:

 

Page 5: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  Right click on the component and select Rotate .. to place it correctly:

  

 Double click on the crystal and set the frequency to 16Mhz:

Page 6: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

Double click on capacitors and set the values:

  

Let 's start wiring the circuit:

Click on "Terminals Mode" on the left toolbar and select the ground reference

Page 7: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

Now select the power source

  

Page 8: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

Connect the pins to the power source as in the picture below:

  

Finally we get the Arduino schematic:

Page 9: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

 After downloading the software from the Arduino site run the program:

  

The Arduino main window appears

Page 10: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

Let 's choose to load the blink example from File menu:

Page 11: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

The window shows the C code of the program:

Page 12: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

This program simply turn on and turn off a led with a period of 1 second for every function.Let's save the program in a directory of our choice:

  

Page 13: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

The program is saved in pde format:

  

Come back to the program and click on the Verify button to check the correct syntax:

Page 14: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

Once the syntax has been verified make sure that "Arduino Duemilanove or Nano w/ ATmega 328" is selected from Tools/Board menu:

  

Now click on the Upload button

Page 15: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

At the end of the process an error message appears, because Arduino board is not connected, we can ignore it:

  

Instead make sure that applet directory has been created  in the directory of the pde file:

Let's open applet directory and we can see the hex file generated:

Page 16: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

Now come back to the Arduino schematic and double click on the microcontroller, in the window that pops up select the hex file:

Page 17: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

Select the following settings:

  

Page 18: profesores.sanvalero.netprofesores.sanvalero.net/~arnadillo/Documentos/Practicas... · Web viewArduino Simulation with Proteus We 'll show how to simulate the celebrated open-source

  

We' re ready to simulate.Click on play button in the bottom left corner of thelayout:

  

license VSM for AVR is required to enable the simulation.As result of running program the pin 19 of microcontroller start blinking with a period of 1 second