Monday, October 19, 2015

ARDUINO PROTEUS ISIS SIMULATION

How To Simulate Arduino With Proteus

Some Arduino boards can added to the most common and powerful simulation software for electronics hobbies which is Proteus from Labcenter Electronics. Here are steps for adding Arduino library for Proteus ISIS.
Step 1: Download the following zip file DOWNLOAD
Step 2: Extract the zipped file and you will find two files ( ARDUINO.IDX and ARDUINO.LIB ).
Step 3: Open Proteus ISIS and go to System ---> System Settings
arduino proteus simulation
Then you will get the following window, right click at Library folders: and choose Browse in Windows Explorer, and that folder will opened then copy both two files you get (ARDUINO.IDX and ARDUINO.LIB) to that folder.

arduino proteus simulation

 Step 4: Restart Proteus ISIS and search for Arduino or simply go to Emulator

arduino proteus simulation

Step 5: Build your Proteus ISIS circuit,
For example I am going to simulate LED blink circuit on Proteus, the circuit is as shown below:

arduino proteus simulation

Step 6: Run Arduino software and go to File ---> Preferences as shown below:
arduino proteus simulation
Then you will get the following window just check compilation which allows the Arduino IDE software to generate and save .HEX file of the code.

arduino proteus simulation

Step 7: Write your code and click on Verify then copy (CTRL + C) the address of the HEX file as shown below:
arduino proteus simulation

Return to your circuit in Proteus ISIS and double click on the Arduino board and past what you have copied as shown on the following image:

arduino proteus simulation

Step 8: Simulate your circuit ............ enjoy!!
Arduino Proteus simulation example:
Let us return to our LED blink example, the circuit is shown above and the code is from Arduino examples:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}


Arduino Proteus simulation video: