Electronics > Beginners

[SOLVED] RX & TX are confusing :(

(1/2) > >>

Sudo_apt-get_install_yum:
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 that

MCU --   Device
RXD <-- RX
TXD --> TX



Pin description

MCU
"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 RX

Is the simplified schematic wrong or am I thinking wrong?

Arznei:
The shown schematic seems to be correct. The devices RX pin is described as "receive data output" while the MCUs RX pin is described as "data input".

This is a bit confusing, because the devices "RX" pin is actually its sending pin, but they labeled it RX in the sense of "connect your MCUs RX pin here".

lordium:
Usually like this:

DTE1 <-> DCE1 <======> DCE2 <-> DTE2

Usually 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

rstofer:
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.

macboy:
You need to convince yourself that Rx or Tx (and variants like RXD, TXD) are signal names, rather than indicating direction of data flow. The descriptions of 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.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod