Sereyvath
Sereyvath

Reputation: 21

Arduino program does not work with Proteus

I wrote an Arduino program for the simulation in Proteus. I have an Arduino mega 2560 board and 7-segment cathode. I want the 7-segment to show number "8". I already compiled Arduino program and copied the path of .hex file to put on the board. When I run the simulation, the 7-segment does not light up; however, the simulation was running with no errors. I am very new to this. help me please.

Proteus, Arduino mega 2560, 7-segment cathode

void setup() {
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
}
void loop() {
  digitalWrite(0, 1);
  digitalWrite(1, 1);
  digitalWrite(2, 1);
  digitalWrite(3, 1);
  digitalWrite(4, 1);
  digitalWrite(5, 1);
  digitalWrite(6, 1);
}

Upvotes: 0

Views: 1051

Answers (2)

raspiduino
raspiduino

Reputation: 681

Mine worked very well, have you chosen the Atmega2560 processor in Arduino IDE? Arduino IDE

This is the picture of a working schematic: Proteus

Why isn't it working on your device?

Upvotes: 1

DonnC
DonnC

Reputation: 67

Can you check on proteus pins indicators to see if there is any power or flushing on them. Its a quick to troubleshoot and see if your digitalWrite() functions are indeed writing to those pins

Upvotes: -1

Related Questions