Proteus Arduino Simulation: Library, .hex File, LCD and Motors
Proteus Arduino simulation: add the Arduino library, export the .hex from the IDE, set a 16 MHz clock; LCD, LM35, servo and virtual terminal examples.
A Proteus Arduino simulation is one of the most detailed ways to run Arduino code on your computer without building the circuit or buying a single part. Proteus is Labcenter Electronics' software for schematic capture, circuit simulation and PCB design. You load the .hex file compiled in the Arduino IDE into the Arduino or ATmega328P model in Proteus; the program runs instruction by instruction just like on a real board, the LED lights up, the LCD shows text, the motor turns and you see the serial output in the virtual terminal.
In this guide you will learn step by step how to add an Arduino library to Proteus, how to get the .hex file with Export Compiled Binary in the Arduino IDE, and how to set the clock frequency, the place where simulations break most often. Then we will run three ready-made sketches that simulate a 16x2 LCD with an LM35 temperature sensor, the virtual terminal, a servo and a DC motor. The last section compares Proteus, Tinkercad and Wokwi in a table and lists fixes for common errors such as hex file not found.
What is Proteus and how does Arduino simulation work?
The schematic part of Proteus (formerly called ISIS) is where you draw the circuit, and the simulator called VSM (Virtual System Modelling) models the inside of the microcontroller and runs the machine code you load. In other words, Proteus does not compile your Arduino code; the Arduino IDE compiles it and Proteus executes the resulting .hex file. Resistors, transistors and op-amps around the microcontroller are calculated by a SPICE-based analog engine, so Proteus gives more realistic voltages and currents than Tinkercad and Wokwi. The program runs only on Windows and is paid; Labcenter's demo version is limited when it comes to saving and simulating. It is widely used in schools and university electronics courses, so it is often required for assignments and project submissions.
| Proteus concept | What it does |
|---|---|
| Schematic Capture | The sheet where you draw the circuit and run the simulation |
| Pick Devices (P key) | The window where you search the library and add parts |
| Terminals Mode | The tool for adding POWER (5 V) and GROUND symbols |
| Virtual Instruments Mode | Instruments such as the virtual terminal, oscilloscope and voltmeter |
| Program File | Path to the .hex file loaded into the microcontroller |
| Play, Pause, Stop | Simulation buttons at the bottom left of the screen |
| PCB Layout | Switch from the same schematic to designing a printed circuit board |
Adding an Arduino library to Proteus
There are three ways to use an Arduino in Proteus. Newer versions of Proteus 8 ship with an Arduino Uno model; if it shows up when you type ARDUINO in the Pick Devices window, you need no extra library. If it does not, or if you want other boards such as the Nano or Mega, you install a third-party Arduino library: these usually consist of a .LIB and an .IDX file that you copy into Proteus' LIBRARY folder. Where that folder is depends on the version: in older Proteus 8 releases it is Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY, in newer releases it is the hidden ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY folder. The third way is the most robust: use the bare ATMEGA328P model from the library. It is the heart of the Uno anyway; its pins are labelled with port names such as PB5 and PD2, so you only need to know that D13 = PB5 and A0 = PC0.
- Close Proteus.
- Open the archive you downloaded and take out only the files with the .LIB and .IDX extensions.
- Copy them into Proteus' LIBRARY folder; if you cannot find the folder, turn on show hidden items in Windows Explorer.
- Restart Proteus and open a new schematic.
- Press P and type ARDUINO in the search box; you should see the Uno, Nano or Mega models in the list.
- Place the model on the sheet, double-click it and check that the properties window has a Program File field.
Getting the .hex file from the Arduino IDE (Export Compiled Binary)
The file Proteus runs is the Intel HEX file that the Arduino IDE produces at the end of compilation. With Arduino Uno selected as the board, click Sketch > Export Compiled Binary. In Arduino IDE 2 the files are written to the build\arduino.avr.uno folder inside your sketch folder; in Arduino IDE 1.8 they go straight into the sketch folder. Two files are created: one holds only your program, the other, with with_bootloader in its name, also includes the bootloader. For Proteus choose the one without the bootloader. The same folder also contains an .elf file; some versions of Proteus let you debug step by step in the source code with it. When you change the code, just run the menu command again; Proteus reloads the file from disk every time the simulation starts.
| Arduino IDE version | File location | File to give Proteus | Version with bootloader |
|---|---|---|---|
| Arduino IDE 2.x | SketchFolder\build\arduino.avr.uno\ | sketch.ino.hex | sketch.ino.with_bootloader.hex |
| Arduino IDE 1.8.x | SketchFolder\ | sketch.ino.standard.hex | sketch.ino.with_bootloader.standard.hex |
| arduino-cli | The folder you pass with --output-dir | sketch.ino.hex | sketch.ino.with_bootloader.hex |
Step by step: your first Proteus Arduino simulation with an LED and a clock test
- In Proteus create a new project with New Project and continue with the schematic-only option.
- Press P and add the Arduino Uno model or the ATMEGA328P, then the LED-RED and RES parts.
- Double-click the resistor and set it to 220R; connect pin D13 (PB5) to the resistor, the resistor to the LED's anode and the LED's cathode to a GROUND symbol.
- Open the test sketch below in the Arduino IDE and create the .hex file with Export Compiled Binary.
- Double-click the Arduino model, select the .hex file in the Program File field with the folder icon and check that the clock frequency is 16MHz.
- Press the Play button at the bottom left; the LED should blink once a second.
1// Proteus saat testi: LED 1 sn yanık, 1 sn sönük olmalı
2// Proteus clock test: the LED should be on for 1 s, off for 1 s
3const int LED_PIN = 13; // D13 + 220 ohm + LED-RED
4
5void setup() {
6 pinMode(LED_PIN, OUTPUT);
7 Serial.begin(9600); // Sanal terminal 9600 baud / virtual terminal 9600 baud
8 Serial.println("Proteus Arduino testi basladi / test started");
9}
10
11void loop() {
12 digitalWrite(LED_PIN, HIGH);
13 Serial.println("LED ON");
14 delay(1000); // 16 MHz değilse süre yanlış olur / wrong timing if the clock is not 16 MHz
15 digitalWrite(LED_PIN, LOW);
16 Serial.println("LED OFF");
17 delay(1000);
18}This small sketch is really a clock test. If the LED is on for one second and off for one second, Proteus is running the processor at the right frequency. If it changes only every 16 seconds, the model is running at 1 MHz; every 2 seconds means 8 MHz, and you need to fix the settings in the next section. The status bar at the bottom shows simulation time and CPU load; when the simulation runs in real time, the time advances at the same speed as a clock.
Clock frequency and fuse settings
The ATMEGA328P model in Proteus comes with factory fuses, just like the real chip: the internal RC oscillator runs at 8 MHz and the divider (CKDIV8) is on, so the processor runs at 1 MHz. Arduino code, however, is compiled for 16 MHz; as a result delay(1000) lasts 16 seconds, millis() counts slowly and serial communication runs at the wrong speed and produces garbage in the virtual terminal. The fix is to double-click the part and correct three fields in the properties window: set the CKDIV8 divider to off (Unprogrammed), choose an external crystal or external clock for CKSEL Fuses, and type 16MHz in the Clock Frequency field. Field names may differ slightly between Proteus versions. In Arduino library models these values are often preset, but check them anyway. In the simulation you do not have to draw the crystal and 22 pF capacitors; the clock comes from the properties window.
| Setting | Correct value | What happens if it is wrong? |
|---|---|---|
| Program File | .hex without bootloader (or .elf) | The simulation does not start or reports hex file not found |
| Clock Frequency | 16MHz | delay() and millis() give wrong timing |
| CKDIV8 | Unprogrammed (no division) | The clock is divided by 8 and the code runs 8 times slower |
| CKSEL Fuses | External crystal or external clock | The internal 8 MHz RC is used or you get a no clock frequency warning |
| Virtual terminal baud | Same as Serial.begin in the code (e.g. 9600) | Garbage characters appear in the terminal |
Wiring table: LCD, sensor, motors and virtual terminal
| Component | Proteus part name | Arduino Uno pin | ATmega328P pin |
|---|---|---|---|
| Red LED + 220 Ω | LED-RED, RES | D13 | PB5 |
| 16x2 LCD RS, E | LM016L | D12, D11 | PB4, PB3 |
| 16x2 LCD D4, D5, D6, D7 | LM016L | D5, D4, D3, D2 | PD5, PD4, PD3, PD2 |
| LCD RW and VSS | LM016L | GND | GND |
| LM35 temperature sensor VOUT | LM35 | A0 | PC0 |
| Potentiometer wiper | POT-HG | A1 | PC1 |
| Servo signal | MOTOR-PWMSERVO | D9 | PB1 |
| DC motor driver EN1, IN1, IN2 | L293D + MOTOR-DC | D10, D7, D8 | PB2, PD7, PB0 |
| Virtual terminal RXD / TXD | VIRTUAL TERMINAL | D1 (TX) / D0 (RX) | PD1 / PD0 |
LCD and sensor simulation: LM016L and LM35
In Proteus the HD44780-compatible 16x2 LCD is called LM016L. The contrast potentiometer of a real circuit is not needed in the simulation; you can leave the VEE pin open or connect it to GND. Always connect the RW pin to GND, otherwise the LCD switches to read mode and the screen stays blank. With the small arrow buttons on the LM35 model you can change the temperature while the simulation is running; the sensor outputs 10 mV per degree, so at 25 °C the output is 250 mV and the Uno's 10-bit ADC reads about 51. The sketch below shows the temperature on the LCD, writes it to the virtual terminal once a second and switches to Fahrenheit if you send the letter f from the terminal. You can see how the LCD is wired on a real board in the 16x2 LCD parallel wiring guide and the LM35 formula in the LM35 guide.
1// Proteus: LM016L LCD + LM35 sıcaklık sensörü + sanal terminal
2// Proteus: LM016L LCD + LM35 temperature sensor + virtual terminal
3#include <LiquidCrystal.h>
4
5LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // RS, E, D4, D5, D6, D7
6const int LM35_PIN = A0; // LM35 VOUT
7unsigned long lastPrint = 0;
8
9void setup() {
10 lcd.begin(16, 2);
11 lcd.print("BlueGrays");
12 lcd.setCursor(0, 1);
13 lcd.print("Proteus LCD");
14 Serial.begin(9600);
15 Serial.println("Komut / command: 'c' = derece / Celsius, 'f' = Fahrenheit");
16 delay(1000);
17 lcd.clear();
18}
19
20bool useFahrenheit = false;
21
22void loop() {
23 if (Serial.available()) { // Sanal terminalden gelen tuş / key typed in the virtual terminal
24 char k = Serial.read();
25 if (k == 'f') useFahrenheit = true;
26 if (k == 'c') useFahrenheit = false;
27 }
28 int raw = analogRead(LM35_PIN);
29 float celsius = raw * (5.0 / 1023.0) * 100.0; // LM35: 10 mV / °C
30 float shown = useFahrenheit ? celsius * 9.0 / 5.0 + 32.0 : celsius;
31
32 lcd.setCursor(0, 0);
33 lcd.print("Sicaklik/Temp: ");
34 lcd.setCursor(0, 1);
35 lcd.print(shown, 1);
36 lcd.print(useFahrenheit ? " F " : " C ");
37
38 if (millis() - lastPrint >= 1000) { // Saniyede bir terminale yaz / print once a second
39 lastPrint = millis();
40 Serial.print("ADC: ");
41 Serial.print(raw);
42 Serial.print(" T: ");
43 Serial.println(shown, 1);
44 }
45 delay(100);
46}The virtual terminal as a Serial Monitor
Proteus has no Serial Monitor like the Arduino IDE; you use the VIRTUAL TERMINAL instead. Pick the terminal from the Virtual Instruments Mode icon, place it on the sheet and wire it crossed over: the Arduino's TX pin (D1) goes to the terminal's RXD input and the RX pin (D0) to the terminal's TXD output. Double-click the terminal and set Baud Rate to the same value as Serial.begin in your code; the default is 9600 baud, 8 data bits, no parity and 1 stop bit. When the simulation starts, the terminal window opens; if you close it, you can reopen it from the Debug menu. Characters you type after clicking in the window are sent to the Arduino; to see what you type, right-click and enable Echo Typed Characters. If you want to talk to a real COM port, the COMPIM model connects the simulated serial line to your computer's port. For serial basics see the Arduino Serial Monitor guide.
Motor simulation: servo and DC motor
Proteus has MOTOR-PWMSERVO for servos, MOTOR-DC for DC motors and MOTOR-STEPPER for stepper motors. The servo model's properties window lists the minimum and maximum pulse widths; these are usually 1 ms and 2 ms. Arduino's Servo library uses 544–2400 µs by default, so angles look off in Proteus. Writing servo.attach(9, 1000, 2000) in the code makes both sides match. Do not connect the DC motor directly to an Arduino pin; use an L293D driver as you would in a real circuit: connect VSS to the 5 V logic supply, VS to the motor supply (for example 12 V) and feed PWM to EN1. In the simulation the motor shows its speed and direction live. Read about real motor driving techniques in the DC motor and L298N guide and how a servo works in the what is a servo motor article.
1// Proteus: potansiyometre ile servo açısı ve L293D üzerinden DC motor hızı
2// Proteus: servo angle and DC motor speed (via L293D) from a potentiometer
3#include <Servo.h>
4
5const int POT_PIN = A1; // POT-HG orta ucu / wiper
6const int SERVO_PIN = 9; // MOTOR-PWMSERVO sinyal / signal
7const int EN_PIN = 10; // L293D EN1 (PWM)
8const int IN1_PIN = 7; // L293D IN1
9const int IN2_PIN = 8; // L293D IN2
10
11Servo servo;
12
13void setup() {
14 servo.attach(SERVO_PIN, 1000, 2000); // Proteus modelinin 1-2 ms aralığı / the model's 1-2 ms range
15 pinMode(EN_PIN, OUTPUT);
16 pinMode(IN1_PIN, OUTPUT);
17 pinMode(IN2_PIN, OUTPUT);
18 Serial.begin(9600);
19}
20
21void loop() {
22 int pot = analogRead(POT_PIN); // 0-1023
23 int angle = map(pot, 0, 1023, 0, 180); // Servo açısı / servo angle
24 servo.write(angle);
25
26 int speed = map(pot, 0, 1023, -255, 255); // Ortada dur, iki yöne dön / stop in the middle, both directions
27 if (abs(speed) < 30) speed = 0; // Ölü bölge / dead band
28 digitalWrite(IN1_PIN, speed > 0);
29 digitalWrite(IN2_PIN, speed < 0);
30 analogWrite(EN_PIN, abs(speed));
31
32 Serial.print("Aci / angle: ");
33 Serial.print(angle);
34 Serial.print(" PWM: ");
35 Serial.println(speed);
36 delay(200);
37}Proteus vs Tinkercad vs Wokwi
| Feature | Proteus | Tinkercad Circuits | Wokwi |
|---|---|---|---|
| Price | Paid, limited demo version | Free | Free basic use, paid plans |
| Where it runs | Installed on Windows | Browser | Browser and VS Code extension |
| Arduino code | Compiled in the IDE, .hex loaded | Written and compiled in the browser | Written and compiled in the browser |
| Boards | Arduino models, AVR, PIC, 8051, some ARM chips | Arduino Uno, ATtiny, micro:bit | Uno, Mega, Nano, ESP32, Raspberry Pi Pico, STM32 |
| Analog accuracy | High, SPICE-based | Medium, with multimeter and oscilloscope | Limited, has a logic analyzer |
| Instruments | Oscilloscope, logic analyzer, virtual terminal, voltmeter | Multimeter, oscilloscope | Logic analyzer, serial monitor |
| Wi-Fi and ESP32 | No | No | Yes, with virtual Wi-Fi |
| PCB design | Yes, in the same program | No | No |
| Best for | School assignments, analog circuits, moving to PCB | First steps, block coding, classrooms | ESP32 and IoT projects, quick sharing |
Which one should you choose? If you want analog circuit behaviour, oscilloscope signals and a design that will later become a PCB all in one place, Proteus is the strongest option. If you are just starting and want nothing to install, Tinkercad Arduino simulation with its block coding is the easiest start. For projects that need an ESP32, a Raspberry Pi Pico or Wi-Fi, Wokwi simulation has no rival, because Proteus does not simulate the ESP32.
Common errors and how to fix them
| Error or symptom | Likely cause | Fix |
|---|---|---|
| Hex file not found (Could not open / Cannot find file) | Wrong Program File path, file moved or the path contains non-English characters | Run Export Compiled Binary again and put the file in a simple folder such as C:\Proteus\hex |
| LED changes only every 16 seconds | Clock at 1 MHz, CKDIV8 on | Set Clock Frequency to 16MHz and CKDIV8 to Unprogrammed |
| CKSEL fuse bits specify external oscillator but no clock frequency is specified | External clock selected but frequency empty | Type 16MHz in the Clock Frequency field |
| Garbage characters in the virtual terminal | Baud rate mismatch or wrong clock frequency | Match the terminal baud to Serial.begin and check the clock |
| Black boxes or a blank LCD | RW not tied to GND, pin order differs from the code | Connect RW to GND and compare RS, E and D4–D7 with the table |
| No model specified for ... | The part has no simulation model, only a PCB footprint | Pick a part with a simulation model in Pick Devices |
| Servo angle is off | Pulse ranges do not match | Use servo.attach(9, 1000, 2000) |
| Code changed but the simulation is old | Hex was not exported again | Run Export Compiled Binary again, stop and restart the simulation |
Proteus is a powerful tool for trying Arduino code before moving to a real circuit, especially for seeing how analog parts and motor drivers behave; with the right .hex file and a 16 MHz clock setting, most simulations work on the first try. When you want to build the LED, LCD, LM35 and servo circuits you simulated with real parts, the BlueGrays app gives you step-by-step circuit diagrams and commented code for these projects.
Frequently asked questions
How do you simulate an Arduino in Proteus?
You write the code in the Arduino IDE and create a .hex file with Sketch > Export Compiled Binary. In Proteus you double-click the Arduino or ATmega328P model, select this file in the Program File field, set the clock frequency to 16MHz and press Play.
Where do I copy the Proteus Arduino library?
The .LIB and .IDX files go into Proteus' LIBRARY folder. In older Proteus 8 versions this folder is under Program Files (x86), in newer ones it is in the hidden ProgramData folder; restart Proteus after copying.
Where is the hex file in the Arduino IDE?
In Arduino IDE 2, Export Compiled Binary writes the files to the build\arduino.avr.uno folder inside your sketch folder; IDE 1.8 saves them straight into the sketch folder. For Proteus use the file without with_bootloader in its name.
Why does my Arduino run slowly in Proteus?
The most common reason is the clock setting: the ATMEGA328P model runs at 1 MHz by default, so the code looks 16 times slower. Set Clock Frequency to 16MHz and CKDIV8 to Unprogrammed; if the status bar shows a CPU load warning, also remove unnecessary instruments.
How do I open the Serial Monitor in Proteus?
Proteus uses the VIRTUAL TERMINAL instead of a Serial Monitor. Connect the Arduino's TX pin to the terminal's RXD input and the RX pin to its TXD output, and set the terminal's baud rate to the same value as Serial.begin in your code.
Can Proteus simulate the ESP32?
No, Proteus does not simulate the ESP32 or Wi-Fi; some third-party ESP32 libraries only provide a schematic symbol. For ESP32 and IoT projects, the browser-based Wokwi is a better choice.
Projects to build after reading this
See all projects
LED Blink
The very first hello of electronics: switching a single LED on and off. The Arduino keeps the LED on for one second and off for one second, so you can easily follow every blink.

Traffic Light
A tiny copy of the traffic light you see on the road every day. Red stays on for two seconds, yellow flashes for a moment, green stays on for two seconds, then it goes back to red through yellow…

Print Message on 2x16 LCD Screen
Your first step to writing text on a screen. The two-line LCD screen first shows a waiting message, then writes a greeting on the top line and types a word letter by letter on the bottom line like a…

Using LCD Screen with I2C
Give your Arduino its own screen and make it write its first message. The two-line LCD screen hooks up with just a few wires; a greeting appears on the top line, then a second message on the bottom…

Using a Servo Motor
The arm of a small servo motor turns to three positions in turn: all the way to the start, right to the middle and all the way to the end, waiting two seconds at each stop.

Servo Motor Operation with Potentiometer
As you turn the potentiometer knob, the servo motor's arm turns right along with it: one end of the knob means zero degrees, the other end means half a turn.

Temperature Measurement with NTC and 2x16 Lcd Display
Measure the temperature around you with a sensor that looks like a tiny bead. This part, called an NTC, lets electricity through more easily as it warms up; the Arduino reads that change, turns it…

HC-SR04 Distance Measurement (Serial Display)
The HC-SR04 sensor works just like a bat finding its way in the dark: it sends out a sound you cannot hear, listens for the echo and measures how far away the object in front of it is.
More articles
BlueGrays app
Build this circuit step by step on your phone
Wiring diagram, code and parts list on one screen. 500+ Arduino, ESP32, ESP8266, Pico, mBot and micro:bit projects ready to build.
Scan with your phone
Point your camera at the code and your phone's app store opens.
or open the store

