I've been writing code for an alarm clock based on the Arduino Uno, and then uploading it to a simulation in Proteus to test it out. Everything was working perfectly until I decided to try changing the Uno for a Mega2560.

I didn't even finish connecting the Mega before deciding against it, and used Ctrl+Z to return to the working state with the Uno, but it just stopped working completely.

At first it was giving me an invalid opcode error 0x9419. This error has now stopped showing but now a different error comes up. It says can't load the .elf file into the arduino. I've tried several times, and tried using a hex file too, but nothing works.

I can still write my code but now I can't test as I'm going along, so anybody with any experience in Proteus I would be very appreciative if you could help.

Edit: the opcode error has now come back and the .elf error has disappeared, even though I've not changed anything. The full error is "Invalid opcode 0x9419 at PC=0x16A0"

  • \$\begingroup\$ I suggest to not using ICS with Proteus , it has hard time with that. Maybe your clock time is so fast it can't process it ? In my opinion use virtual generator for simulate and don't use capacitors or indictors when frequency high , Proteus can't handle that. \$\endgroup\$
    – Mordecai
    Commented Oct 30, 2019 at 10:52
  • \$\begingroup\$ The only other simulator I've used before is multisim and I just really preferred proteus. What's ICS? The opcode error has now returned and the full error is "Invalid opcode 0x9419 at PC=0x16A0". \$\endgroup\$
    – MendelumS
    Commented Oct 30, 2019 at 11:08
  • \$\begingroup\$ ICS stands for integrated circuits such as arduino , ne555 , op-amps etc. I don't say don't use the Proteus, just use another software for arduino and record the inputs and outputs then make virtual generator for simulate same effects. I never saw this error before but I assume Proteus can't handle your code, as I said it doesn't like ICS. I remember I made ne555 circuit and Proteus gone mad, yesterday I spent 2 hours to fix my circuit the I realized problem is Proteus don't recognize the components I used. Good program but don't push too much \$\endgroup\$
    – Mordecai
    Commented Oct 30, 2019 at 11:10
  • \$\begingroup\$ @Mordecai once you get familiar with Proteus, it works great. I've never had issues using the IC libraries. You may be having different issues in the way you build your circuits (for example, it can be a bit funny if you don't put a ground connection). As for this issue, instead of using Ctrl+Z, just delete the part, then put it back in and reload the code. that should do it. If not, shut down the program and open it back up. See if that works \$\endgroup\$
    – MCG
    Commented Oct 30, 2019 at 11:37
  • \$\begingroup\$ Yeah if you delete the ground and Ctrl+Z the new ground sometimes not recognize . I had that problem before . About IC thing, I don't know if my Proteus have a problem but in IC and capacitor & inductor circuits causing timing error (so small to calculate) so I thought maybe this causing it. \$\endgroup\$
    – Mordecai
    Commented Oct 30, 2019 at 12:08

1 Answer 1


Create a firmware project in Proteus , and choose Arduino UNO, after that, click on the ATMEGA328P and choose the file debug.hex to simulate from


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.