You need to log in to create posts and topics.

Arduino in subcircuit dosn't load hex file

Hello. I've created a lab setup to study a RAM chip. For this purpose, I've created two subcircuits - Counter and RAM. The Counter works fine, but the RAM subcircuit acts weird. This subcircuit contains an Arduino Uno and SSD1306 display. When I launch the simulation inside the subcircuit, the display works. But when I use this subcircuit in another project, everything except the display works. I put my subcircuits inside the Shield folder and added entries to the shields.xml file:

<item name="Counter" info="Counter" />
<item name="ram" info="ram" />

I am using SimulIDE version 1.1.0-SR1.

In the archive, I will include the RAM_lab circuit (which uses subcircuits) and the folder with the RAM subcircuit.

What settings can I change to make the Arduino in the subcircuit load the hex file?

Display is working at cubcircuit:

Display is working at subcircuit

and not working at main circuit.

Uploaded files:

Hi.

To do what you want, you should use an Atmega328 instead or the Arduino.
Then set that Atmega328 as "exposed" as explained here:
https://simulide.com/p/subcircuits/#exposed-components

After that your board will work as an Arduino: right-click->mega328->Load_firmware

 

lastactionhero9000 has reacted to this post.
lastactionhero9000

Thanks for the advice. I will try your sollution and return with results.

Quote from arcachofo on February 26, 2025, 6:40 pm

Hi.

To do what you want, you should use an Atmega328 instead or the Arduino.
Then set that Atmega328 as "exposed" as explained here:
https://simulide.com/p/subcircuits/#exposed-components

After that your board will work as an Arduino: right-click->mega328->Load_firmware

 

Everything works now. Once more thank you for the help and awesome simulator.

So, there is no way to load hex-file automaticaly after subcircuit is added to the main circuit? 

Glad to know you got it working.

 

So, there is no way to load hex-file automaticaly after subcircuit is added to the main circuit?

Yes, just put the hex file in the subcircuit folder, and you load it from the subcicuit, and save the subcircuit.
In this case you don't need the "exposed component" stuff.