# Communication between 3 Atmega controllers

I am studying a bio chemistry analyzer, in which there are Main controller, printer board controller and detector board. To establish communication between these three, RxD pin of one controller is connected to same (RxD) of others and same with TxD (all ic's TxD is interconnected.

Is this type of communication possible (Normally we connect TxD to RxD and vice versa)? How they are communicating then? Which protocol is used (I2C,SPI or USART).

How will be master and slave configuration?

• If you connect all the txds to all the rxds and disable all but one txd output at a time in software in accordance with a taking turns protocol, it will work. Basically (and as far as the software is concerned) you would have something like rs485, but without the differential transceivers. – Chris Stratton Nov 20 '14 at 6:03
• I have found that sometimes RxD and TxD are labeled inconsistently; on the master TxD could mean "this is the pin on which data is transmitted," but on the slaves TxD could mean "this is the pin on which the transmitted data is ingested." I have gotten my lines crossed more than once due to this... – 2012rcampion Apr 22 '15 at 2:47

Hard to say. If these TXD and RXD pins are really dedicated to RS232 serial, then there would be a multi-driver conflict with the TXD pins. Also, they would not be able to talk to each other.

There are a couple of possibilities, though. I2C, CAN, and half duplex RS-485 are all shared busses that are connected in this way, though the pins are not TX and RX. In I2C you have clock and data. In CAN and RS-485, you have a single differential pair for the data. It's also possible they are using a UART, but they would have to have some method of crossing over TX and RX. Possibly they are disabling the UART on the transmitter end, turning the RX pin around, and bit-banging it. Or perhaps the microcontrollers can swap the TX and RX pins. Or perhaps what you said is not correct and the controller TXD is connected to RXD on the others, and vise-versa, with the TXD pins disabled when not transmitting to avoid conflicts.

• Thanks.. Alex for reply...These are port pins also .... Is this a single line communication? – Techknowlogic Nov 20 '14 at 4:20
• I have no idea. What controllers are they, specifically? Unless you can look at how the pins are configured internally or you can stick a logic analyzer on the connection, it's really hard to say. – alex.forencich Nov 20 '14 at 4:30
• How to check on DSO for communication between controller...what signal can I check? – Techknowlogic Nov 23 '14 at 9:31
• Probe the pins. See if it looks like a standard protocol. If so, see if you can figure out the bit rate. If the scope supports it, try turning on serial decode and testing some combinations of parameters. – alex.forencich Nov 24 '14 at 4:37
• But if it is used as I2C interface then there must be pull up resistor in this case. But in my application, 4.7 k resistor is connected only at RxD pin of all three controllers ( not for TxD ). Is I2C communication possible without resistor at TxD? – Techknowlogic Dec 4 '14 at 5:24

I've seen systems where RXD and TXD are all connected to a single node but only one TXD pin in the system is enabled at any time.it's not RS-232, it operates at UART voltages, CCTalk is one example of this setup.

• You're right. edited. – Jasen May 31 '15 at 0:20

I'm not entirely sure why you'd do that, but definitely I2C is an option. Most mirocontrollers nowadays have plenty of I2C libraries and peripheral implementation documentation in their resources.

Another thing you could try doing is multiplexing, so you choose only one of the 3 lines as a valid one for whatever you're communicating to.

In any case, I understand that you didn't design that but that you're only studying it right? Have in mind that communication can follow standard protocols (I2C, RS232, SPI, etc...) or you can just make your own so it all depends on how the controllers are programmed. For instance, if the three TxD are all interconnected (properly pulled up or down, and connected through buffers or resistors) but thanks to the programming only ONE can actively pull the line's voltage Up or Down, then it would work.

Try studying the data-flow a bit more, like what should be happening inside those processors and how should they be "talking" to each other, and then we can help out more