Capturing multiple serial protocols on the same line

I have an old satellite TV card here, which has two components to it - the microcontroller and the ASIC. The two communicate via a single, synchronous serial communication at 38400 baud.

The issue is that they communicate using different protocols. The ASIC transmits to microcontroller using 8 bits with parity and 3(!) stop bits. Ergo the microcontroller receives data using the same config.

The ASIC receives (and micro transmits) using 9 bits without parity and 2 stop bits. The 9th bit is used as a routing bit (it dictates whether the byte is destined for the ASIC or pass it on). It's an odd config.

The question is:- how can I capture valid data sitting on the same line? I am able to mostly see 8 bit data. 9 bit data is trickier but is sort of doable with modded Hardware Serial library. It doesn't seem that easy due to different protocols. I don't want to have to resort to capturing raw bits and processing them offline but could be done I guess.

I could technically also sit between the two components rather than ON the wire but I am still left dealing with different protocols on the same line.

I am using Arduino Mega if that makes any difference.

I'd run two serial ports, configured differently, both listening. However, then you need a slice of code to interleave the two streams of data. If they're overlapped, you'll need to timestamp both streams, once you can figure out the data framing.

1 Like

Yeah it's what I am thinking as well. It would be doable where I know the sequence and direction of byte flows but trickier where I don't. With two serial ports I could alternate which port I am printing data to screen from.

I think sitting in between and handling traffic myself (resending data as needed) might be somewhat easier? Not sure yet...

It seems that both protocols use a total of 11 bits to send the data. Could you not grab 11 bit values using a modded software serial library? You could put the 11 bits into a 16 bit int, then look at the 9th bit. If that bit is a zero, it's ASIC data, of it's a 1, then it's microcontroller data.

That would be much simpler if that was the case! From what I am reading, it's 12 and 13 bits.

Start bit, routing bit, 8 bits, parity, 2x stops = 13 bits

The other is start bit, 8 bits data, 3x stops = 12 bits

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.