I'm trying to experiment with some digital signals. I want to take an 8-bit number and transmit it from one board to another using just three wires (signal, ground and clock).
The number is output from a chip on my first board. I want to then convert this number from parallel to a serial signal using a chip such as a DM74165 to send it over the reduced number of wires. My problem is, I do not know how then to convert this serial signal back into an 8-bit number for further processing on the second board. How can I achieve this?
Another way is to use a UART chip (used for RS-232 communication) at each end which has all the control and handshake logic built in. And it only takes two wires (signal and ground).
I always think I2C is a really bad choice for such a purpose, it's for connecting multiple ready made IC's to a common bus (initially for TV use). It's a poor (and overly complicated) method for just talking between two chips - particularly in this case, as it appears to be a non-processor application.
Maybe your right Nigel, I have been out of touch with stuff as of late. But as I recall, there are many microwire options out there. RS-232 seems rather clunky, so I would avoid that option. Just my thinking.
Maybe your right Nigel, I have been out of touch with stuff as of late. But as I recall, there are many microwire options out there. RS-232 seems rather clunky, so I would avoid that option. Just my thinking.
As I see it RS232 is nice, simple, easy to do - and perfect for the job - such things as I2C and SPI etc. are really for different specific applications, and are complicated because they 'do more', which mostly isn't needed.
Presumably the OP is doing an electronics course?, rather than an actual application, hence the use of antiquated hardware techniques.
The number is output from a chip on my first board. I want to then convert this number from parallel to a serial signal using a chip such as a DM74165to send it over the reduced number of wires. My problem is, I do not know how then to convert this serial signal back into an 8-bit number for further processing on the second board. How can I achieve this?
I've done this in the past using discrete IC chips for signals over a few feet or so (maybe 10 feet). If you can use three wires it gets really easy because you can send the data and the clock too, so as you clock new data out of the serial output you can clock the new data into the receiver so everything stays in perfect sync. A period of an unusually long 'low' signal triggers the receiver to output the parallel data to either a latch or directly to the end application, and gets everything ready for a new byte at the receiver end. This works out good too because a lot of times we'll have a little time between bytes anyway.
So the signal lines would look like this:
Code:
--->data>-----
--->clock>----
--->ground>---
At the receive end there is a little circuit to detect the exceptionally long low signal either on the clock or on the data line.
If you really need two wires only there are a few two wire protocols too. One simple one is where the clock goes low and then a short time later the receiver looks at the same line to see what the data is, high or low, and then clocks the receiver. This reduces the problem that RS232 sometimes has with clocks that are not within about 1 percent accuracy of each other. So there would be two lines, one ground and one signal. The signal line is brought low for a short time and then the data is placed on that same line, or first the data is put on the line and then later the clock, either way works really.
The 16550 is a common device and should work for you. If you do not have clocks available on the transmitter and receiver end that are within 1% frequency of each other, you can add a third line for the clock so both devices have the same clock frequency.
Thanks for all the great advice you've given me - I'm very grateful indeed. I'm trying to teach myself about the protocols used so really appreciate the help.