0
\$\begingroup\$

I'm trying to design a circuit that can convert from a two wire full duplex (think SPI), with one transmit line and one receive line, to a one wire half duplex (think i2c), with bidirectional communication over the same line, but I'm having no luck. Is there a specific chip, or a circuit I can use?

edit: the two protocols are (de-strobed and converted to single ended) SpaceWire (or at least SpaceWire hardware carrying I2C signals) and I2C. SpaceWire uses a data in and a data out pin, so I'd like to be able to send an address or command etc. to the I2C device over the DOUT wire, and receive the data through the DIN wire. SpaceWire is a difficult protocol for interface ICs, which are either non-existant or exorbitantly priced. By 1 and 2 wire I'm excluding the clock line since it will be shared between the two protocols.

\$\endgroup\$
  • \$\begingroup\$ The device you would need would have to understand the protocol of the two parties to be able to arbitrate which had Driving rights to the one wire. This makes it tricky \$\endgroup\$ – Andy aka Mar 24 at 15:04
  • \$\begingroup\$ I2C requires 2 lines... How would bus attribution work? \$\endgroup\$ – Ron Beyer Mar 24 at 15:11
  • 3
    \$\begingroup\$ Your question is too vague. Start with saying which protocol you want to convert. (If there is a single chip which can convert arbitrary duplex protocols to one wire let me know and I'll nominate it for the Nobel prize.) I suspect an X/Y problem. \$\endgroup\$ – Oldfart Mar 24 at 15:14
  • \$\begingroup\$ In order to make this question answerable, you cannot be vague with the protocol you wish to work with. RS-422 and SPI can both be full duplex but are very different (one has a clock, the other doesn't). Least of which, one has the clock and another doesn't. Also, chances are high that you will not be able to do this without the appropriate software on both sides. So do not expect a blind plug-and-play solution unless it involves processors on both ends of the line doing all the translation and management. \$\endgroup\$ – DKNguyen Mar 24 at 19:38
  • \$\begingroup\$ Sorry, I'll copy and past my edit here : the two protocols are (de-strobed and converted to single ended) SpaceWire (or at least SpaceWire hardware carrying I2C signals) and I2C. SpaceWire uses a data in and a data out pin, so I'd like to be able to send an address or command etc. to the I2C device over the DOUT wire, and receive the data through the DIN wire. SpaceWire is a difficult protocol for interface ICs, which are either non-existant or exorbitantly priced. By 1 and 2 wire I'm excluding the clock line since it will be shared between the two protocols. \$\endgroup\$ – T.S Mar 24 at 21:05
0
\$\begingroup\$

There is a protocol which is sensibly called "1-Wire" in which only a single wire is required. This protocol requires a master to provide collision avoidance. I don't know of any way around this - you must either have a single master or you must allow collisions and do collision detection.

Anyway, it is supported by a number of devices through firmware and possibly still some hardware. To replace a full duplex design, the master would have to set the rules, prompting the slave for data, and the slave would have to wait until the master allowed the transmission, but I think it could be implemented easily with the inevitable loss of data rate.

Good luck!

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Sorry, I omitted the clock lines since they'll be shared between the protocols (see my edit). I forgot to mention that. It'd be master-slaves network, with a central processor and various sensors. \$\endgroup\$ – T.S Mar 24 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.