Connect with us

serial loopback test won't work.

Discussion in 'General Electronics Discussion' started by rob83ke70, Sep 15, 2012.

  1. rob83ke70

    rob83ke70

    2
    0
    Sep 15, 2012
    I need to check a serial communication circuit on a project I'm building (megasquirt 2 ecu) and I'm trying to perform a serial loopback test on the computer to verify that it is working correctly before hooking it up to the circuit board.

    I have tried two computers, one an IBM clone desktop, it has two serial ports, one DB25 and one DB9, i'm trying to use the DB9. I've opened up hyperterminal, and it has only displayed one choice of serial port. I've then bridged pins 2 and 3 together on the DB9 connector, and typed ascii text into the hyperterminal, but nothing has come back. Because I was not too sure whether this was the correct port being used by hyperterminal, and my cable is a DB9 straight through cable, I decided to try another computer.

    the second computer is a panasonic toughbook. it has both db9 and db25 connectors. there are three choices of com port in hyperterminal, so I went through each one of them. com1 and com2, with pin 2 and 3 of the DB9 connector bridged, do not display the ascii that i've typed. com5 however displays the ascii that i've typed regardless of whether pins 2 and 3 of the db9 connector are bridged or not.

    I figure, i've got to be doing something silly. can anyone shed some light on this? plenty of descriptions of how to do a serial loopback test on the internet, but i haven't seen anyone with this problem.

    are there other pins that need to be bridged? do ibm computers run protocols other than rs232? do i need to bridge the terminals before starting the computer up, or is it ok to do so with the computer running? i've got the data bits set to 8, the stop bits set to 1, no parity bit, and i've tried both xon/xoff and no flow control.

    any ideas? anyone had a similar problem?

    Robert
     
  2. gorgon

    gorgon

    603
    23
    Jun 6, 2011
    Depending on the hardware/setup, you may need to loop pins 7and 8 too. This is RTS/CTS (request to send/ clear to send) Normally the UART need to see CTS before it transmit a character.

    If you want to communicate between 2 PCs, you need to use a 'null-modem' configuration. In it's simplest form, you only cross 2and3, connect 5 to 5, and loop 7and 8 on each side. This way only 3 signals pass between the PCs, 2(Rx(2) to Tx(3)),3(Tx(3) to Rx(2)) and 5(gnd). This is only for the DB9.

    TOK ;)
     
    Last edited: Sep 15, 2012
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    I agree with gorgon's comments above. But CTS is only checked by software; a general purpose terminal emulator can transmit regardless of the state of CTS, and selecting "NO flow control" should enable this. So you shouldn't have to loop back any flow control signals. And looping things back after the machine has started up is fine.

    But Hyperterminal is horrible. I wouldn't trust it one bit. Download one of the free alternatives!

    Re COM5 on the laptop, it's probably an internal dial-up modem. Type ATA<enter>; if it clicks and makes a modem answer tone, that's it.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-