Loopback testing RS232 to TTL transceiver

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Loopback testing RS232 to TTL transceiver

Postby ElectroGeeza » Sat Apr 18, 2009 7:24 am

Hi there!

I just got my RS232 to TTL transceiver ("adapter") yesterday. It's a Sparkfun product listed as RS232 Shifter SMD in the catalog and on the Website. Since the computer I will be using has no RS232 (serial) port, I also ordered an RS232 to USB adapter cable.

Today I have tested the RS232 adapter cable and installed the drivers for it successfully. I now got myself a new COM port as seen in the Device Manager in Windows. So far so good.

Now, I want to run some simple test to verify that the Sparkfun transceiver is working properly as well. Honestly I'm a total novice on this subject, but I have read some on the Web about doing a "loopback test". It involves connecting the TX and RX together on the transceiver, and then sending some "randomly typed characters" which will be sent through TX and then if you get the same "message" in return through the RX it means that the TTL transceiver is communicating/working properly.

To make this kind of loopback test, the first thing I would need is a terminal emulation software which supports RS232 serial communication. This is in fact one of the main obstacles for me because I am using Windows Vista. As many of you probably know by now that, as of Windows Vista, the so popular terminal emulator called HyperTerminal is no longer included as part of Windows operating systems. It's a sad end for a nice software. (Damn you Microsoft!)

    What other option do I have now that HyperTerminal is no longer included in Windows Vista? I know that there is a ton of such terminal emulation softwares of many different flavors. But which one are equal or nearly equal to HyperTerminal or the commercial version of it (HyperAccess) and that is supported under Windows Vista?

    What "message" do I type and send in the terminal software? Is it OK to just type some "random" characters like "ABCD" and see if it gets bounced back to me? Or is there some special command that can be used for loopback testing? (Check this PDF file: http://www.tronisoft.com/rs232info/RS23 ... verter.pdf)


Any help is very much appreciated!

Thanks in advance!
ElectroGeeza
 
Posts: 5
Joined: Sat Apr 18, 2009 6:56 am

Postby Philba » Sat Apr 18, 2009 7:38 am

teraterm - works great. much better than hyperterm.
Philba
 
Posts: 2503
Joined: Sun Feb 13, 2005 11:33 pm
Location: Seattle

Postby ElectroGeeza » Sat Apr 18, 2009 9:15 am

Philba wrote:teraterm - works great. much better than hyperterm.


Thank you for your answer Philba!

Do you have a link to their Website? I did a search for "teraterm" in Google and got following two links.

http://hp.vector.co.jp/authors/VA002416/teraterm.html

http://ttssh2.sourceforge.jp/

Is the Sourceforge Website above the "official" Teraterm Website?
ElectroGeeza
 
Posts: 5
Joined: Sat Apr 18, 2009 6:56 am

Postby ElectroGeeza » Sat Apr 18, 2009 9:40 am

I just downloaded the version 4.62 of Teraterm I found at http://ttssh2.sourceforge.jp/. I installed all the components and plug-ins available from the installation guide.

I have connected the TX with RX on the TTL transceiver, and I have powered it with a CR2032 battery.

I then launched Teraterm, and chose "serial" and "Prolific USB-to-Serial Comm Port (COM8)" in the New Conenction dialog.

Now what?

Now, when I type something, i.e. "abcdABCD", the red and green LEDs are flashing on the TTL transceiver. Does it mean that it's working? Or am I supposed to "send" this somehow and then get the same "message" in return as a confirmation that it works, that is: will I see the same message twice? As I understand it this is what would have happened if I was using HyperTerminal. Is it just me or do I have to set up Terterm in a certain way in order to accomplish the same thing (to mimic Hyperterminal)?

I need to verify somehow that A; the TTL Transceiver is able to transmit, and B; it is able to receive commands. I need to be sure of this before I begin to use it in the real application.

Screenshots:
Windows Device Manager
Teraterm - Shot 1
Teraterm - Shot 2
Teraterm - Shot 3
Teraterm - Shot 4
ElectroGeeza
 
Posts: 5
Joined: Sat Apr 18, 2009 6:56 am

Postby felis » Sat Apr 18, 2009 10:06 am

ElectroGeeza wrote:
Now, when I type something, i.e. "abcdABCD", the red and green LEDs are flashing on the TTL transceiver.


It works, at least partially. You should see an echo of what you're typing; giving your pattern, it would look aabbccddAABBCCDD. Check Rx to TX connection, on DB-9 it's pins 2 and 3.
/felis
felis
 
Posts: 183
Joined: Sat May 27, 2006 5:43 pm
Location: 10 miles east of SFE

Postby phishguy » Sat Apr 18, 2009 10:12 am

Just a FYI. If you copy the Hyperterminal files from XP to Vista it will work. I've done it.
phishguy
 
Posts: 86
Joined: Tue Jun 24, 2008 8:11 am

Postby ElectroGeeza » Sat Apr 18, 2009 10:38 am

felis wrote:
ElectroGeeza wrote:
Now, when I type something, i.e. "abcdABCD", the red and green LEDs are flashing on the TTL transceiver.


It works, at least partially. You should see an echo of what you're typing; giving your pattern, it would look aabbccddAABBCCDD. Check Rx to TX connection, on DB-9 it's pins 2 and 3.


Yes, that's what I have been expecting to see, because that's what you would normally see in HyperTerminal. I was expecting to see an "echo" of what i type, just as you describe.

However, I disconnected the TX-RX jumper wire from the RX so that only the TX was left connected. I could have disconnected the jumper wire completely, so there's no trick here, I only left it attached so that I can connect it easily later. Well, in this state (no TX-RX connection), when I was typing in Teraterm only the green LED was flashing (transmit) but the red LED was not flashing (receive) and apart of that nothing of what I was typing was printed out in Teraterm. So, from that I am confident enough to conclude that this TTL transceiver is working properly.

The only thing is that there is no "echo" in Teraterm or "local echo" as it is called in Hyperterminal where it is set to active as default. So is it possible to activate "local echo" in Teraterm?

phishguy wrote:Just a FYI. If you copy the Hyperterminal files from XP to Vista it will work. I've done it.


Yeah, I have heard about that. It's not uncommon that Windows users talk about this kind of "methods" of ripping off old legacy software applications from old Windows versions to the new ones. But I have personally never done such thing, mostly because I never needed to. But I would like to know how to copy Hyperterminal from XP to my Vista machine.

So, I have three questions.
    Do you know exactly what files I need to copy in order to compile a complete and functional copy of Hyperterminal?

    Does this "method" work only when you have Windows XP installed, or is it also possible to rip these files directly from a Windwos XP disc?

    Is it by any chance possible to download a standalone version of Hyperterminal from i.e. Microsoft Download Center?
ElectroGeeza
 
Posts: 5
Joined: Sat Apr 18, 2009 6:56 am

Postby felis » Sat Apr 18, 2009 10:45 am

ElectroGeeza wrote:The only thing is that there is no "echo" in Teraterm or "local echo" as it is called in Hyperterminal where it is set to active as default. So is it possible to activate "local echo" in Teraterm?


You're right, what you saw on a screen was actually an echo from the far side.
/felis
felis
 
Posts: 183
Joined: Sat May 27, 2006 5:43 pm
Location: 10 miles east of SFE

Postby ElectroGeeza » Sat Apr 18, 2009 11:18 am

Thanks a lot guys! I really appreciate it!

About the echo setting. I looked around a little bit in the settings of Teraterm and I finally found the setting I was looking for. It took me a while because I didn't expect to find it under the "Terminal" section for some reason so I started at the bottom section. Just like in Hyperterminal, it's called "local echo" in Teraterm as well. Anyway, after activating "local echo" I was able to get those double messages.

Overall, Teraterm looks and acts pretty good to me. In my opinion it's only a good thing that it doesn't have "local echo" active as default. It's usually not something that you would want to have active. So for those users who are new to Hyperterminal where you have "local echo" set to active as default you always had to explain to them how to deactivate this thing. Otherwise, Teraterm is not so much unlike from Hyperterminal. I think it's one good if not the only replacement for Hyperterminal. When I say this I have already tested another terminal emulator called PuTTy. But unlike Teraterm, PuTTy is divided in these several different small applications like "Pageant", "PSFTP" and "PuTTy" where "PuTTy" is the main application for serial port communications. But when I launch PuTTy it doesn't seem to recognize my COM port and doesn't prompt me to chose one, so typing anything in it has no response at all, so I can't even use it. It may be a matter of settings only or maybe it doesn't recognize virtual COM ports, but I still find Teraterm better.

So, if you're looking for a replacement for Hypertereminal and are using Windows XP or Vista, I would say go for Teraterm!

I said it once, and I'll say it again - I really appreciate your help! Thanks a lot! Now I am finally ready to start using this TTL transceiver in the real application, which happens to be recovering my bricked Seagate Barracuda 7200.11 from the BSY (bussy) state and hopefully getting back access to my data on it. Wish me luck.

Screenshots:
Teraterm - Shot 5
Teraterm - Shot 6
ElectroGeeza
 
Posts: 5
Joined: Sat Apr 18, 2009 6:56 am

Postby Philba » Sat Apr 18, 2009 2:00 pm

glad you got it working.

The reason I dump hyperterm was because HT baud rate changes didn't take effect immediately. I lost track of the number of times that bit me so I dumped it. TT has been really good to me.
Philba
 
Posts: 2503
Joined: Sun Feb 13, 2005 11:33 pm
Location: Seattle


Return to PIC Microcontrollers - Software and Hardware

Who is online

Users browsing this forum: No registered users and 0 guests