Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help needed how to simulate 2 microcontrollers

Not open for further replies.


Junior Member level 2
Apr 26, 2011
Reaction score
Trophy points
Activity points
Help needed how to simulate 2 microcontrollers at same time with different hex files
only 1 microcontroling is executing program at a time in protues .
sorry for bad english :).


  • Untitled.jpg
    565.2 KB · Views: 81

please upload the proteus file and hex files to help you

same hex for both microcontroller


  • mc2.rar
    13.1 KB · Views: 62


You can actually run both MCUs simultaneously. Each MCU has to have an unique name, which you have already done. Setup simulation by right click on U1 and select program file for that MCU, then do the same for U2.

Now run the simulation.

It's that simple.

By the way, you do not have to use the same hex file, you can have a different hex file for each processor.


    28.3 KB · Views: 71
Last edited:

only 1 uc is giving display on lcd at a time with same program(2 different name hex files)

I've ran your simulation and U2 is definitely running, however LCD2 is out of sync, possible failure to initialize, and complains repeatedly about logic contentions.

The logic contentions are most likely due to the fact the LCD is trying to send data at the same time U2 is sending data.

Both the MCU and the LCD are attempting to drive the data lines at the same time.

Maybe the LCD initialization routine is cutting the necessary delays too close and LCD2 doesn't initialize before the MCU starts to write data to the bus.

Try adding a delay after the LCD initialize routine is called.

yaa lcd2 is not wotking rest of every thing is fine thankss i'll try this .

Yes, I actually connected the TX line on the U2 to the virtual terminal's RX line and the U2 sent the "HSN" to the terminal on powerup. So there was no doubt that U2 was running. After examining the debugger window for the LCD2, I can only conclude the LCD routines, specificly the initialization routine is most likely the cause of the problem.

Please let me know what you find out after introducing a delay.

ok i'll let you know by tomorrow and i have 1 more question if i replace the wire with an rf module than this program will work or not
if not than what i have to doo?

---------- Post added at 20:57 ---------- Previous post was at 20:50 ----------

and 1 more question is there is any gps in protwus for simulation?

If you use easy radio modules or Xbee they operate as a cable replacement....

xBees are duplex transceivers, typically the RF RX/TX pairs are simplex, one directional only. The xBees also have a UART, so yes they would be a virtual cable replacement. However, the RF TX/RX pairs would require an encoder/decoder scheme, such as Manchester Encoding scheme to get a reasonable BAUD rate. The encoding scheme would typically be implemented in software on the PIC.

a friend of mine is telling me if i replace wire wd zigbee rf module than this program transmitts and recive data.
is it?

soo in zigbee/xbee i dont need any encoding scheme??

No, once they are setup, it's just like a serial cable.

Checkout my new group:

Embedded Wireless Networks

I have a couple of threads packed with ZigBee/xBee information, more are being posted daily.
Last edited by a moderator:

Not open for further replies.

Part and Inventory Search

Welcome to