ElectroGeeza, on Apr 18 2009, 02:54 PM, said:
I have read about doing the loopback test, and I got the link to the "
How to Do a Serial Loopback Test" article in the
NI Developer Zone that Jaclaz posted earlier in
post # 385. But that article seem to be just too overwhelming and doesn't seem to be very relevant for this context. I mean in that article they are explaining how to do a loopback test with real serial ports (DE-9), it has no coverage on the TTL adapters we are using here, and we have already established early in this thread that attaching "pure" or "direct" RS232 cables to the disk drive won't work.
So please, can someone tell me how to do a loopback test so that I can verify that my RS232 - TTL adapter works? It would be of great help.
I understand that the TX and RX must be connected together on the TTL adapter. But how do I set it all up? How do I set up the terminal emulation software? What are the exact messages I need to send? People are talking about typing "random" characters and check that they can receive it. Is that really it? Is that all I have to type? No special commands needed for loopback testing? So I can just type
"ffkjfnl fkj knj fjn fjao3ofpe n fkdfs bla bla bla bla" et cetera and see if I get the same in return?
A terminal program converts your input on the keyboard into text that is shown in the terminal window
and to "something" that is sent to the RS232 interface (directly or through the USB adapter).
Basically a Serial port (RS232) sends the "something" through the TX cable (and can receive "something" from RX cable).
The terminal program converts back the "something" it receives from the RX to text in the terminal window.
The RS232to TTL converter converts "something" to "something else", both inbound and outbound.
You do not need to know what is the "something" or what is the "something else".
You type some text, possibly human readable one, say for example, "HELLO".
HELLO is displayed on the terminal windows and converted to "something" sent to the RS232.
If nothing is connected to the RS232 bus this "something" is lost forever.
If a converter is connected to the RS232 this "something" is converted to "something else".
If nothing is connected to the converter this "something else" is lost forever.
If you connect the TX and RX of the RS232 port together, the "something"
loops back, gets to the terminal and is translated back to "HELLO", which is displayed.
If you connect the TX and RX of the TTL converter together, the "something else"
loops back, gets to the RS232 RX, it is converted to "something" and then gets to the terminal and is translated back to "HELLO", which is displayed.
In other words, a loopback test is the same no matter how long is the "chain" involved, you type some text and the same text should appear TWICE in the terminal window.
Input: HELLO->terminal display: HELLO->sent to RS232 port->TX and RX together->
loops back to RS232 RX->terminal display: HELLO
With the TTL converter:
Input: HELLO->terminal display: HELLO->sent to RS232 port->TTL Converter->TX and RX together->
loops back to TTL Converter RX-> RS232 RX ->terminal display: HELLO
If you have previously a USB adapter:
Input: HELLO->terminal display: HELLO->sent to USB adapter->RS232 port->TX and RX together->
loops back to RS232 RX->USB adapter->terminal display: HELLO
or:
Input: HELLO->terminal display: HELLO->sent to USB adapter->RS232 port->TTL Converter->TX and RX together->
loops back to TTL Converter RX-> RS232 RX ->USB adapter->terminal display: HELLO
of course, even if everything works well, if you input "garbage"

like
ElectroGeeza said:
"ffkjfnl fkj knj fjn fjao3ofpe n fkdfs bla bla bla bla"
it is more difficult to understand if what you get back is the
same "garbage" you sent.
jaclaz