DSC06548

Serial Loopback test

If you are using UC00A, UC00B, or FTDI cable, or any UART devices, did you ask the questions:

  • Is the UART working? 
  • Is the transmit pin is transmitting data?
  • Is the receive pin receive data?

You want to check whether the UART device is working!!! The simplest method is to do loopback test.

Introduction

Serial loopback test is a test carry out to verify the communication of a device, particularly in UART. By performing loopback test, the target device sends and receives data using the same port. This technique can be used to troubleshoot serial device. We can just connect the device’s transmitter and receiver pin together to perform this test. 

In this tutorial, I am going to show you how to do the loopback test on UC00B and URS232A to verify the communication of the device using HyperTerminal software.

DSC06548

Hardware required

Software required

  • HyperTerminal (or any relevant terminal software will do)

Loopback test on UC00B

To do the loopback test on UC00B, simply connect the RXD and TXD pins together, using a female to female jumper wire as shown in diagram below.

DSC06553DSC06552

Connect the UC00B to your computer’s USB port. If this is your 1st time using UC00B, please do go through the User’s Manual to install USB driver. Open HyperTerminal, just key in any name u like and click OK.

name

Choose the port of UC00B, normally is highest number, in my case it is port 157. Click OK.

port

 

The port setting should be set as shown in diagram below. Since flow control is not needed in loopback test, choose the flow control to “None” and click OK.
flow

 

Then, click the “Properties” icon.
propertiesicon

 

Go to Settings tab and click the ASCII setup.
settingascii

 

Tick the check box “Send line ends with line feeds” and “Echo typed characters locally”. Click OK.
ascii

 

Now type any character. Any button pressed will be shown twice. The 1st character is the character computer send out via transmit pin on UC00B (it appears on HyperTerminal because we set the “echo locally”), and 2nd character is the character received by the receive pin, and send to computer. With this, the UART communication is successful, and the UC00B is working properly. If your project is not working, stop troubleshooting UC00B, troubleshoot other parts.

sentandreceived

 

Loopback test for URS232A

To do the loopback test on URS232A, you need to do exactly the same settings as you did for UC00B, connecting the TX and RX of it. Below are the pinout of RS232.
VX-001_RS-232_Pinout
What you need to do is, by any method, connect/short the TXD and RXD pin together. For me, I am soldering it temporary as shown in figure below.

DSC06556

As we know, most of computer and especially laptop does not come with COM port or RS232 port anymore. So to perform loopback test on URS232A, we can utilize the UC00B or UC00A that we verify earlier. 

First, make sure the mini jumper (tiny black plastic) on UC00B is at 5V as shown in figure below.

DSC06550

Connect URS232A and UC00B together as shown in figure below.

DSC06554

Note that the VCC, RXD, TXD and GND pins of UC00B go to +5V, DOUT, DIN and GND of URS232A respectively. (Assuming you had connect/short the TXD and RXD pin on URS232A)

Now, connect the UC00A/B to your computer. Repeat the same steps as shown previously.

  1. Open HyperTerminal.
  2. Enter the name and OK.
  3. Choose the port and OK.
  4. Flow control to “None”.
  5. Click “Properties” go to “Settings” tab and click the “ASCII setup”.
  6. Tick the check box “Send line ends with line feeds” and “Echo typed characters locally” and click OK.
  7. Type in any words to see the result.

If the character you typed appears twince on screen (one transmit and one receive), this means that the communication of the URS232A is working properly.

Summary

With loopback test, we can verify the working condition of UC00A/UC00B, and with the help of UC00A/Uc00B, we can further verify the condition of URS232A. In other words, if your project uses any of this devices, and it is not working properly, check other parts, such as baudrate, wiring polarity, etc. Hope this tutorial helps you!

If you have further inquiry, please do discuss in our technical forum as we seldom check the comments in tutorial site.

 

 

Buy

, , , ,

Related Post

feed the fish

Who is going to feed my fish?

Connection_bb

Make a Talking Dustbin

DSC01402

Demo the wireless communication distance for RFBee, both 433MHz and 434MHz, outdoor and indoor.

Featured Image

Fingerprint Reader Integrated SM630 with SM630 PC Demo GUI

Leave a Reply

Your email address will not be published. Required fields are marked *