I’m looking for ways to serialise an I/O data bus write. This is for an x86 embedded system, where I have several on-board devices (accessed via I/O ports) that I want to situate some distance away from the main system, with minimal cabling.
This isn’t a student/homework question, despite it perhaps looking like one.
In a computer, software can instruct a CPU to write a byte (or larger) to an I/O port. This results in data on 8 signal lines (a data bus) that can be connected to a data latch within a peripheral.
I’d like to relocate this peripheral some distance from the CPU. Rather than having 8 data lines (wires) plus ground running over several metres, the data should be sent serially over a smaller number of lines (data, clock and ground as a minimum), and converted back to 8 bits in parallel at the far end.
I’m interested in a generic solution, not something that connects a known computer to a known peripheral where a proprietary solution may already exist. And discrete logic is preferable, at least to start with.
I wondered if I could use something like a 74HC165 to take an 8-bit input and serialise this, and a 74HC595 to convert that serial stream back to 8 bits in parallel. I’ve seen some examples of these being used with Arduino kit.
My simplistic use case above is write only. But a more generic solution would be bidirectional. And there would need to be some kind of acknowledgement signal so that a subsequent write operation wasn’t attempted until the previous one was completed fully. While my question above is for just 8 bits, I’d then scale this up to 32 bits or more.
Are there any approaches out there that might satisfy this requirement? Is what I’m describing already solved by SPI or I2C? I’ve yet to find an SPI data latch (e.g. a SPI-enabled 74HC373 type latch). A fully-fledged networking solution isn’t appropriate.
Adding to the question, following some comments: I have an initial use case in mind, where a legacy CPU board has an on-board header that connects to an on-board control/sensor device. I'm looking for a serialisation solution that goes between the on-board header and the control/sensor device that can then be relocated off-board, i.e. 2m to 5m away. While I can modify the software/firmware, I can't alter the existing hardware.
- There's no DMA or DRAM concerns (no DMAC, SRAM only, it's not a PC).
- I don't need to hold the bus. Having written to the port (e.g. out dx, al) I can wait (via software) until the far end has received the 8 bits and processed them
– David00 Jan 19 '24 at 17:14Are you familiar with these parts to the extent that you know whether they can provide the sort of serialisation I'm asking about? I did look at the associated App Note for interfacing to a matrix keyboard, but that's only half of the solution. Same as the Arduino examples above, they rely on a CPU providing the serial data.
Also, I noticed that these require configuration. That's fine for the CPU end. But in my scenario, the far end (e.g. a 16 bit sensor) is dumb, there's no option to configure anything.
– David00 Jan 19 '24 at 17:32