Welcome to our site! EDAboard.com 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 at same time with different hex files
only 1 microcontroling is executing program at a time in protues .
sorry for bad english .
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.
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.
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?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.