Maker Pro
Maker Pro

TTL / RS-232 conversion circuit

W

Will

Jan 1, 1970
0
Hi All,

I am interfacing a ham radio to a computer to program it and I have been
looking at various TTL / RS-232 conversion circuits. However I happen to
have a commercial ADMS programming cable I use with my Yaesu VX-7R radio
(ham radio). This cable also handles this type of conversion so I am
thinking why reinvent the wheel when I can utilize this existing circuit
which is already integrated into the D-sub shell of this cable.

Thus my question:

These generic circuits appear to RS-232 logic levels (+/-12VDC) on pins 2 &
3 of a DB9 connector and converts them to 0 & 5VDC. Which TTL voltage
corresponds to a logic 0 and which to a logic 1? On the RS-232 side, the
data pins use negative logic, so +3 to +12 VDC is logic 0 and -3 to -12VDC
is logic 1. Does the TTL data input use positive logic instead ( logic 1 is
+5VDC and logic 0 is 0VDC)?

What is the industry convention when terminating the TTL side of this cable
to a stereo plug. ... is the tip conductor logic 1 or logic 0? Once I
determine this, then I will use this existing conversion cable and simply
wire the stereo plug conductors to their respective TXD and RXD pins on my
Yaesu FT-857.

Lastly, what happens if one connects the TTL level TX conductor to the TXD
pin on the radio side accidentally instead of the RXD pin on the radio?
i.e. wires crossed in error

Thanks for any and all info!

73's Will
 
L

Larry Brasfield

Jan 1, 1970
0
Will said:
Hi All, Hi.
I am interfacing a ham radio to a computer to program it and I have been
looking at various TTL / RS-232 conversion circuits. However I happen to
have a commercial ADMS programming cable I use with my Yaesu VX-7R radio
(ham radio). This cable also handles this type of conversion so I am
thinking why reinvent the wheel when I can utilize this existing circuit
which is already integrated into the D-sub shell of this cable.

Thus my question:

These generic circuits appear to RS-232 logic levels (+/-12VDC) on pins 2 &
3 of a DB9 connector and converts them to 0 & 5VDC. Which TTL voltage
corresponds to a logic 0 and which to a logic 1?

Conventions differ on this between different signals
in the RS-232 standard. The modem control and
status signals are normally active low in the TTL realm.
If you want to deem that "TTL high = logic 0", that is
up to you. The data signals are normally considered
to be at the mark level for a high level in the TTL realm.
That is level usually considered a '1' when considered
to be a number at all.
On the RS-232 side, the
data pins use negative logic, so +3 to +12 VDC is logic 0 and -3 to -12VDC
is logic 1. Does the TTL data input use positive logic instead ( logic 1 is
+5VDC and logic 0 is 0VDC)?

All TTL<-->RS-232 translators that I have seen are
inverting, and they are used for both the data and the
status/control signals with every serial interface device
I have seen. Without having looked at your equipment,
I can say that if your translators invert, they are quite
likely to be doing the right thing.
What is the industry convention when terminating the TTL side of this cable
to a stereo plug. ... is the tip conductor logic 1 or logic 0?

I've not seen stereo plugs used for RS-232. But it makes
no sense to call the tip logic 1 or logic 0. Why would such
a limited number of conductors be wasted conveying a
constant value?
Once I
determine this, then I will use this existing conversion cable and simply
wire the stereo plug conductors to their respective TXD and RXD pins on my
Yaesu FT-857.

Go for it, I say.
Lastly, what happens if one connects the TTL level TX conductor to the TXD
pin on the radio side accidentally instead of the RXD pin on the radio?
i.e. wires crossed in error

No permanent harm, just some frustration and maybe
mystefication when it does not work as you want.
Thanks for any and all info!

You're welcome.
 
C

CheapscateDave

Jan 1, 1970
0
I can't say for sure if it's a standard but cables for RS232/TTL to
glucose testers use the tip as RX and small ring is TX and last is
common or ground .If you want a simple 1 chip solution look at the
DS275 from Dallas.

Dave
 
W

Will

Jan 1, 1970
0
Hi Larry / the group,

Thank you for the reply.

I've done some more experimenting with my commerical grade cable used with
the Alinco DJ-X10 wideband radio.

I've run a number of tests to using a standard 9-pin RS-232 cable (no
conversion) and measured/monitored the TXD and RXD lines on a dual channel
scope to serve as a reference.

As expected, RS-232 data lines idled in a marking state of -11V. Then using
a Windows Hyperterminal session @ 4800 bps, 8 data bits, 1 stop bit, set my
time base on my scope to reflect 208 us/DIV sweep so each bit duration
consume one graticule division. I then monitored the voltages on this line
as I held down and pressed various keys while observing their binary
equivalent on an ASCII chart. I observed 10 bits as expected (1 start bit,
8 data bits, 1 stop bit) and the levels behaved as I would expect.

I captured the screen shots of my scope for each of the characters I used.
I then hooked up my RS-232 / TTL conversion cable for the Alinco unit (not
actually connected to the radio ... hence "unloaded") and observed the
following:

1. No logical start or stop bits are observed.
2. On some keys, the binary codes produced predictable results, i.e. the
letter U which has alternate bits set (01010101). The TTL output was
comparable, but at ~ 3.5V.
3. TTL levels ranged from 0 to 3.5V unlike RS-232 levels (+/-11V)
4. Not all voltage sequences while monitoring the TXD TTL-level conductor
matched its corresponding bit sequence observed when using the RS-232 (non
conversion) cable.
5. As I recall the RS-232 standard (many years ago for me), the whole
concept of serial communicaitons was asynchronous in nature and hence each
byte was enveloped by a start and stop bit(s) to sync the tx'er and the
rx'er. However, on the TTL side, it appears as though there is no concept
of start and stop bits ( at least logically). Yes, I understand that
there's either 0 or 5V. That's it. But there is no asynchronous start/stop
bits utilized on the TTL side.
6. Since the TTL-side voltage transitions did not always correspond to the
RS-232 equivalent (ie voltage transition intervals), I am wondering if some
sort of encoding scheme is used (NRZ, NRZI, etc) ???

What should data in the RS-232 realm on pin 3 look like after being
converted into TTL level voltages? In some cases, the RS-232 logic level 1
(-11V) seemed to correspond to 0V in the TTL realm. In other cases, it
seemed to correspond to 5V. ?

-W

PS: As for the stero plug, the tip did correspond to RS-232 RXD and the
ring conductor did correspond to RS-232 TXD. Since RS-232 is full duplex
(TXD/GND and RXD/GND pairs), I guess it stands to reason that this
conversion circuit still maintains two separate and distinct paths for
sending and receiving data.

PPS: Not sure I follow about the constant voltage level waiting a conductor.
Since the TTL signals seem to correspond in some relation to the originating
RS-232 data byte, the TTL level signal was only constant in voltage for the
duration of a bit, but it changed in magnitude (0 or 5V) accordingly.
 
C

CheapscateDave

Jan 1, 1970
0
You could try a wrap jumper..With TTL side connected jumper RS232 TXD
to RXD and scope signals. Then disconnect TTL and connect RS232 and
jumper TTL TXD to RXD and scope signals. You should see the original
and converted signal in each direction.
Dave
 
L

Larry Brasfield

Jan 1, 1970
0
Will said:
Hi Larry / the group,

Thank you for the reply.
You're welcome.
I've done some more experimenting with my commerical grade cable used with
the Alinco DJ-X10 wideband radio.

I've run a number of tests to using a standard 9-pin RS-232 cable (no
conversion) and measured/monitored the TXD and RXD lines on a dual channel
scope to serve as a reference.

As expected, RS-232 data lines idled in a marking state of -11V. Then using
a Windows Hyperterminal session @ 4800 bps, 8 data bits, 1 stop bit, set my
time base on my scope to reflect 208 us/DIV sweep so each bit duration
consume one graticule division. I then monitored the voltages on this line
as I held down and pressed various keys while observing their binary
equivalent on an ASCII chart. I observed 10 bits as expected (1 start bit,
8 data bits, 1 stop bit) and the levels behaved as I would expect.

I captured the screen shots of my scope for each of the characters I used.
I then hooked up my RS-232 / TTL conversion cable for the Alinco unit (not
actually connected to the radio ... hence "unloaded") and observed the
following:

1. No logical start or stop bits are observed.
2. On some keys, the binary codes produced predictable results, i.e. the
letter U which has alternate bits set (01010101). The TTL output was
comparable, but at ~ 3.5V.
3. TTL levels ranged from 0 to 3.5V unlike RS-232 levels (+/-11V)
4. Not all voltage sequences while monitoring the TXD TTL-level conductor
matched its corresponding bit sequence observed when using the RS-232 (non
conversion) cable.
5. As I recall the RS-232 standard (many years ago for me), the whole
concept of serial communicaitons was asynchronous in nature and hence each
byte was enveloped by a start and stop bit(s) to sync the tx'er and the
rx'er. However, on the TTL side, it appears as though there is no concept
of start and stop bits ( at least logically). Yes, I understand that
there's either 0 or 5V. That's it. But there is no asynchronous start/stop
bits utilized on the TTL side.
6. Since the TTL-side voltage transitions did not always correspond to the
RS-232 equivalent (ie voltage transition intervals), I am wondering if some
sort of encoding scheme is used (NRZ, NRZI, etc) ???

What should data in the RS-232 realm on pin 3 look like after being
converted into TTL level voltages? In some cases, the RS-232 logic level 1
(-11V) seemed to correspond to 0V in the TTL realm. In other cases, it
seemed to correspond to 5V. ?

I suggest you use a dual trace o'scope. I believe you will find,
if you trigger on one signal while looking at the other, (and do
not use the "alternating" display mode that analog o'scopes
usually have), that they have the same logical state at all times
except for the effects of propagation delay.

[snip]
PPS: Not sure I follow about the constant voltage level waiting a conductor.
Since the TTL signals seem to correspond in some relation to the originating
RS-232 data byte, the TTL level signal was only constant in voltage for the
duration of a bit, but it changed in magnitude (0 or 5V) accordingly.

You asked: "What is the industry convention when terminating the TTL side
of this cable to a stereo plug. ... is the tip conductor logic 1 or logic 0?"
The question makes little sense, so neither does the answer. What you
meant to ask may have made sense, but those words do not.

[Snip confusing top-posted stuff.]
 
M

Mike

Jan 1, 1970
0
Hi Larry / group,
You asked: "What is the industry convention when terminating the TTL side
of this cable to a stereo plug. ... is the tip conductor logic 1 or logic 0?"
The question makes little sense, so neither does the answer. What you
meant to ask may have made sense, but those words do not.

Actually, I see what you mean now re: the tip. I guess it was one of those
things where its clear in my mind but not properly captured on "paper". I
should have wrote: is the tip conductor TXD or RXD. My apologies. From
my testing so far, I have found that the tip is in fact RXD, thus ring is
TXD. Sorry for the confusion!

-W
 
M

mike

Jan 1, 1970
0
Will said:
Hi All,

I am interfacing a ham radio to a computer to program it and I have been
looking at various TTL / RS-232 conversion circuits. However I happen to
have a commercial ADMS programming cable I use with my Yaesu VX-7R radio
(ham radio). This cable also handles this type of conversion so I am
thinking why reinvent the wheel when I can utilize this existing circuit
which is already integrated into the D-sub shell of this cable.

Thus my question:

These generic circuits appear to RS-232 logic levels (+/-12VDC) on pins 2 &
3 of a DB9 connector and converts them to 0 & 5VDC. Which TTL voltage
corresponds to a logic 0 and which to a logic 1? On the RS-232 side, the
data pins use negative logic, so +3 to +12 VDC is logic 0 and -3 to -12VDC
is logic 1. Does the TTL data input use positive logic instead ( logic 1 is
+5VDC and logic 0 is 0VDC)?

What is the industry convention when terminating the TTL side of this cable
to a stereo plug. ... is the tip conductor logic 1 or logic 0? Once I
determine this, then I will use this existing conversion cable and simply
wire the stereo plug conductors to their respective TXD and RXD pins on my
Yaesu FT-857.

Lastly, what happens if one connects the TTL level TX conductor to the TXD
pin on the radio side accidentally instead of the RXD pin on the radio?
i.e. wires crossed in error

Thanks for any and all info!

73's Will

YMMV, 'cause there ain't no standard that everyone adheres to.
My experience has been that I can always make radio interfaces work
with inverting ttl translation.
I also use opto-isolators with appropriate reverse protection and
current limiting. Works for low data rates and helps with my paranoia
about smoking my laptop.
mike

--
Return address is VALID but some sites block emails
with links. Delete this sig when replying.
..
Wanted, PCMCIA SCSI Card for HP m820 CDRW.
FS 500MHz Tek DSOscilloscope TDS540 Make Offer
Wanted 12" LCD for Compaq Armada 7770MT.
Bunch of stuff For Sale and Wanted at the link below.
MAKE THE OBVIOUS CHANGES TO THE LINK
ht<removethis>tp://www.geocities.com/SiliconValley/Monitor/4710/
 
Top