Hi Rob and all.
Just an enquiry to see if the multiplex library is what I need.
Need to import into Arduino a existing datastream from a vintage TMS1000, I have the format etc.
Then on a new datastream built on Arduino add a new very small addition to the original datastream. This datastream sends data to up to 16 receivers
This new datastream is to add new addresses (say up to 17-64 addresses) on the bus (over and above 16 addresses from the vintage TMS1000, Say to add #21 . New receivers will be built to receive the new addresses.
Datastream #2 to be inserted into #1, and then returned from Arduino to original data bus.
Just want to get an idea if this is feasible to do using the 'Multiplex' library from Rob Tillaart.
From figure 4 the format of the data period I see that the MultiPlex library is not suitable.
The MultiPlex lib is used to multiplex serial streams which have a HIGH(1) and LOW(0) value
with a fixed duration per bit.
Your stream has a pulse per bit and the encoding is in the duration of the pulse. SHORT = 0 and LONG = 1. The library does not handle this type of data.
I assume that the 10 milliseconds in FIG4 is an estimate as you do not know how many 1's and 0's there are.
That said, I think it is possible to create a multiplex for this kind of data stream if I understand the requirements correctly.
I would use a MCP23S17 (the SPI based) that could send out 16 bits in parallel, put 4 of them side by side and you have 64 channels. If the MCP23S17 meets the timing requirements is to be tested.
I think maybe you are misunderstanding/misusing the terms "datastream" and "multiplexing".
I think what you want to do is translate the data packets into a new format which is largely the same as the original packets but with extra bits inserted to increase the number of receivers that can be addressed?
If so, the extra data is not a second datastream, and does not need to be multiplexed with the original. The process you want is to receive & translate the packets into a new format and transmit them.
But this could be what is known as an "X-Y" problem. If you explain in more detail what you need to do and explain the wider project, maybe the forum can suggest an easier way to achieve it.
Are you trying to emulate on an Arduino the functionality of the program (firmware) which runs on a TMS1000 and then enhance it ? That is, you ultimately intend to replace the TMS1000 on that board with an Arduino.
If the TMS1000 is the large IC towards the top left of your "yellow" diagram, then it looks like it is interpreting a keyboard or switch matrix amongst other things. It will certainly be an interesting reverse engineering process to derive the original specification of the firmware running on the TMS1000 such that an Arduino can the programmed from it.