For education reason, I tried to show the UART signals on the RX/TX pin but i realized, that these signals are missing. At least I was not able to visualize anything on PD0 and PD1 of the atmega328 on a scope (PD0 and PD1 should show RX / TX).
As far as i know simavr does not implement uart at the pin level.
PIC mcus have it implemented, if that helps...
With only ome mcu in the circuit , it was not really needed. Now with multi-mcu this is one of the issues that need a solution. And it is still an open question how to implement it:About inter-mcu communications:
As i see it there are 2 main ways to solve this:
connecting pins and implementing everything at the pin level.
I see this is needed for educational purposes: watching the actual signals in each pin.
But can be a little over-killing it, if you only need information flowing.
- High level
: Just information transfered (no pins connected, just a "conceptual" connection).
This is how Serial monitor and Serial port works right now.
Fast and efficient if you only need communications working.
Could also be implemented for inter-mcu communication.
I think both modes should be available:High level
mode is the first step planned.
The main issue to solve is the method to connect 2 mcus, like "drawing a line" you mentioned:
In order to connect 2 MCUs via UART it would be great to enable this connection be set by "drawing a line".
This needs to be defined in detail.. how exactly it should work.
My idea is not yet clear, but I was thinking in expanding or adapting the current "Serial Port" component:
Currently you select an mcu uart and a serial port (in your computer).
This could be expanded to select any uart in any mcu in the circuit or serial port in the computer.
So it would be possible any kind of connection betwen mcus or mcu-pc.
It could even be expanded to a generic communication component, not only uart.
So the user could select uart, spi, i2c...Realistic:
mode will take some more time:
Additionally, instead of the individual serial port for each MCU it would be great to have a individual serial port component with an output. By this it would be a bit more nearer to reality.
You mean with output pins to connect to mcu pins? ... like Realistic:
mode i mentioned above?In a broader context:
Currently there is lot of redundant code in mcus: communication modules, adc, eprom,etc. Each simulator: gpsim, simavr and simulide, implements it's own versions. Also each one has it's own event loop and so on.
The idea in the long term is merging all simulators into just one.
Just one event loop, one i2c module, one uart, etc. hopefully increasing efficiency, speed and code simplicity.
So this issue should be solved in that direction.
This means creating an uart module that could be used by all mcus, simulide serial port and any other future component that needs uart.