Hi D,Stopping a device from sending, depends on the device. There were several different protocols for controlling a serial data stream. But both sides must agree to the protocol.
In early RS232, special signals separate from the data stream were used. Look up RTS/CTS if you’re curious. This technique is rarely used today.
Then there was XON/XOFF, where a reserved character was sent to start/stop transmission. The remote device would have to support these protocols.
Do your devices support flow control? Then whatever they use, you code for.
Software serial libraries do support multiple data streams, but usually restrict communications to one virtual port at a time.
Can any of your devices support a retransmit request? You can code collision detection and request retransmission in case of a collision (garbled reception = collision)
It comes down to what your remote devices support. If they don’t support flow control or retransmission requests, there may be no solution.
You may be able to compensate by extrapolating or interpolating the missed data. If that satisfies your requirements.
Otherwise, I don’t have an answer.
The GPS for example, can be programmed.. I know they are set to transmit once/sec, but can be programmed to five times/sec, and possibly add a stop sending bit, but I haven't looked into that so far..
That leaves them set to their default of once/sec.
If the program only used one INPUT at the UART, it waits for the [ $ ] at the beginning of every sentence, and finalises at the end of the sentence by [ LF or ? ]
We have two UART INPUTS so I added a switch chip to the PCB called DATASWITCH which can be switched by the program.
It is set to switch after a full sentence has been READ and it's information saved.
The REMOTE program has a [ $ and ? ] at the beginning and end of every SENT sentence, so that the program can collect it in the same way as above.
Actually the program works, but sometimes the program stops, this is why I'm testing HSERGET.
Thanks,
C.