[SOLVED] RX & TX are confusing :( - Page 1
Forum section: electronics / beginners

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: March 12, 2019, 08:12:28 am
content: Hey all this is a quick and simple question!So I’m trying to communicate with a device over RS232 but the simplified schematic is confusing me.The image below is from the simplified schematic.It clearly shows thatMCU -- DeviceRXD <-- RXTXD --> TXPin descriptionMCU"RXD0: Receive Data (Data input pin for the USART0)""TXD0: Transmit Data (Data output pin for the USART0)"Device"RX, receive data output to the local controller""TX, transmit data input from the local controller"So by reading the pin descriptions I think that RXD0 should connect to TX and TXD0 should be connected to RXIs the simplified schematic wrong or am I thinking wrong?

author: Arznei
author_rank: Contributor
timestamp: March 12, 2019, 09:04:28 am
content: The shown schematic seems to be correct. The devices RX pin is described as "receive dataoutput" while the MCUs RX pin is described as "datainput".This is a bit confusing, because the devices "RX" pin is actuallyits sending pin, but they labeled it RX in the sense of "connect your MCUs RX pin here".

author: lordium
author_rank: Regular Contributor
timestamp: March 12, 2019, 09:53:39 am
content: Usually like this:DTE1 <-> DCE1 <======> DCE2 <-> DTE2Usually goes like this, DTE is computer/mcu and DCE is the modem/transceiver. Computer talk to modem, which talks to another modem though some cable, which talk to another computer. On both sides you connect TX from DTE to TX on DCE. It's a little counter intuitive, unless you remember that TX and RX are specified from the terminal equipment side. TX to RX when you want to bypass the DCE and connect DTE1 to DTE2 directly. Probably lots of exceptions to this, but this is how I think of it.(PS it's usually a DE9 connector, not a DB9! for rs232)https://en.wikipedia.org/wiki/RS-232

author: rstofer
author_rank: Super Contributor
timestamp: March 12, 2019, 02:23:12 pm
content: It is confusing. I usually look very carefully at the pin descriptions for words like 'input' and 'output'. I hook the 'input' of one to the 'output' of the other and pretty much ignore the symbols Rx and Tx. It get problematic on intermediate devices like USB->RS232 adapters.

author: macboy
author_rank: Super Contributor
timestamp: March 12, 2019, 03:00:43 pm
content: You need to convince yourself that Rx or Tx (and variants like RXD, TXD) are signal names, rather than indicating direction of data flow. Thedescriptionsof the pins in that you quoted do indicate direction by the use of the words input and output. An output generally connects to an input.When you connect an SPI "slave" and a "master" device together, you connect the MISO pins of the two devices together, likewise the MOSI pins together, and same again for the CLK. On one of those devices, each of those is an input and on the other, an output (e.g. MISO is an input on the master device and an output on the slave).Usually, when connecting a UART type perhipheral to a microcontroller (etc.), you likewise need to match signal names, so RX to RX and TX to TX. This moves the "TX" data from one device to the other. The exception is when connecting two peer devices together (e.g. the UART Tx/Rx pins of two microcontrollers so they can talk to each other). Think about why.

author: rstofer
author_rank: Super Contributor
timestamp: March 12, 2019, 03:53:04 pm
content: Sometimes it is so confusing that I use a scope to find out which pins send data. At the output side of a USB->Serial gadget, I use something like TeraTerm to send data continuously while I watch the pins. Same thing on the microcontroller end, I write a little code to continuously send data.