arduino simulation with proteus.doc

20
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: Click on "P" button and write atmega as keyword:

Upload: ramon-martinez

Post on 30-Oct-2014

314 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Arduino Simulation with Proteus.doc

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:

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

Page 2: Arduino Simulation with Proteus.doc

 

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

  

Page 4: Arduino Simulation with Proteus.doc

Now we have all the components in the panel Devices:

  

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

 

 

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

Page 5: Arduino Simulation with Proteus.doc

  

 

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

  

Double click on capacitors and set the values:

Page 6: Arduino Simulation with Proteus.doc

  

Let 's start wiring the circuit:

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

Page 7: Arduino Simulation with Proteus.doc

  

Now select the power source

  

Page 8: Arduino Simulation with Proteus.doc

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

  

Finally we get the Arduino schematic:

Page 9: Arduino Simulation with Proteus.doc

 

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

  

The Arduino main window appears

Page 10: Arduino Simulation with Proteus.doc

  

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

Page 11: Arduino Simulation with Proteus.doc

The window shows the C code of the program:

Page 12: Arduino Simulation with Proteus.doc

  

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: Arduino Simulation with Proteus.doc

  

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: Arduino Simulation with Proteus.doc

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: Arduino Simulation with Proteus.doc

  

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: Arduino Simulation with Proteus.doc

  

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: Arduino Simulation with Proteus.doc

  

Select the following settings:

  

Page 18: Arduino Simulation with Proteus.doc

  

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

  

 

Some Arduino examples are available in the microcontrollers category