
TRS-80
RS-232-C
—
"\
Interface
Catalog
Number
26-1
145
Radio
/hack
TRS-80
MICRO
COMPUTER
SYSTEM
^ J
CUSTOM
INTRODUCTION and Discussion of Digital Signals
INSTALLING and Checkout
THEORY
TERMinal Program and
DECWRITER
Required Equipment:
TRS-80,
Expansion Interface with
RS-232-C Installed
MANUFACTURED
OPERATION
OF
Listing
Application Program
Level II
IN
THE USA FOR
with
RADIO SHACK
16K RAM
J^
A DIVISION
OF TANDY CORPORATION

To Our Customers
What
is an Interface?
It's
a
generalized means of communication
between
your TRS-80
and
some external
device,
providing
the necessary
conventions
regarding
data-identification, transmission
rates, send-receive
sequences,
error-checking techniques, etc. However, an Interface does
not
provide the programming necessary
to use any
particular TRS-80/
external
device system.
For example,
having
the Interface installed
does
not automatically
enable
you to
send BASIC programs
from one TRS-80
to
another; to
output to a
line printer via
the Interface;
etc.
Such applications
require
"driver programs" which
must be
custom-designed
for
the
equipment
you intend
to use.
In this manual you'll find listings for two
such
"driver programs".
One
allows
your
TRS-80
to
function
as a
terminal,
the
other
allows your
TRS-80 to output to
a
popular serial interface line
printer, the
DECWRITER.
The Radio Shack RS-232-C Interface is designed to meet the
EIA
standards.
However, we cannot
guarantee that it
will work with
all
so-called
"RS-232-C
compatible" devices.
Nor do
we
commit
ourselves to
provide engineering
and
programming support
for such
applications, or other special custom-use situations.
We
do,
however, guarantee that our Interface will function
correctly
with all our own RS-232-C equipment.
©Copyright
1978,
Radio
Shack, A Division
of
Tandy Corporation,
Fort
Worth, TX. 76102 U.S.A.

Introduction
The
term
RS-232-C refers to a
specific EIA (Electronics Industries
Association) standard
which defines a widely accepted method
for
interfacing
data terminal equipment
with
data
communications
equipment.
The RS-232-C
Interface is
by
far the most universally
used
standard for interfacing data
processing equipment. Most
video
terminals,
modems, card readers,
line
printers, mini-microcomputers,
etc.,
utilize the
RS-232-C standard for data interchange
between
devices.
The
addition of
the RS-232-C to the
TRS-80 Expansion Interface
opens up a whole
new world of
compatibility. The RS-232-C
Interface is
designed
to
mount inside the
TRS-80 Expansion
Interface.
For example, the external
equipment could be
a
serial
line
printer, a
Radio
Shack
Telephone
Interface, or a video
terminal,
etc. The point is this, now
you can interface with any equipment
which
is
RS-232-C compatible.
A most
useful application
program of the
RS-232-C Interface will
permit you to
connect your
TRS-80
via
a Telephone
Interface to
time
sharing computer system. This
TERM
program is supplied
(on cassette tape)
with the RS-232-C Interface.
Many TRS-80 owners
would like to
be able
to
use their serial
printers
with the
LPRINT command in
LEVEL II BASIC. With the RS-232-C
Interface
installed in the
Expansion Interface, you can do
that. A
programming
example and listing
for this application is
provided
in
this
Manual.

Transmission of Digital Data
transfer
The
accomplished
pair to
wire
two general
synchronous.
or
system is
technique, we'll not
does not
and, the
data
of
gaps
individual
The bits
bits in
each character as
to
zero
logic
The
stop
character. The stop
the next
length
depends
2.0
or
stop bits).
2.0
defines the
transmitted.
transition and
of digital data
sending data in
by
connect the
transmission
The
asynchronous-bit-seriai.
require
varying lengths
a
characters need
characters.
which comprise a
length) and
data
(0)
element is a
character is
of the
stop
on system
data-bit intervals
The
location of
A clock
is used to
over relatively
transmitting and
techniques is
transmission
mention it
synchronizing
not
may be
data
synchronizing
shown in
bit that is
logic one
element is
transmitted.
element.
characteristics.
negative-going
the data bits in
source at the
Figure 1
added
However, there
(although most
locate the
long
distances is generally
serial form using a single twisted
receiving
devices. One of
commonly used, asynchronous
technique used in the Radio Shack
we don't use the synchronous
Since
again.
present
character (generally from
(1)
maintained
Asynchronous transmission
clock to
be
be transmitted with the
contiguous.
This means that
between transmission
start and
to
that is
stop elements are added
The start element
.
the front of each
assed to the end
until the start element of
five
is a
character.
of
There is no upper limit to the
is a lower limit that
Typical
lower
limits are
1.0,
modem systems use 1.0
transition of the start element
character
the
receiver is
center of each data bit.
reset
being
by this
of
to eight
single
each
1.42
or
There are several good reasons
transmission system.
with the data,
need to be sent
don't
they become
from manual-entry
data
disadvantage
significant portion
and stop
thus, equipment is
available.
of
elements.
,
A clock signal does
all at one
This
input devices (e.g. a
asynchronous transmission is
of the
communications bandwidth for start
^T^zzO^—
START
ELEMENT
ONE
BIT CHARACTER
8
(11001000)
FIGURE
for using
simpler. Also, the characters
time; they can be transmitted
particularly useful when transmitting
is
the asynchronous
not need
STOP ELEMENT
START
ASYNCHRONOUS DATA
1.
to be transmitted
keyboard).
that
it
1 /
ELEMENT
data
The major
requires
L
-^D==
ONE
as
a
8
BIT
(00100000)
=
CHARACTER
STOP
rL—
r
ELEMENT

The
rate at which
asynchronous data is transmitted
is defined
as
the
baud
rate. Baud
rate is the inverse
of the time
duration
of the
shortest
signal
element. Normally,
this
is one
data bit interval.
The
baud rate
is equal
to the bit rate if one
stop bit is used; but for
systems
which
use more
than one
stop bit, the
baud rate does not
equal
the bit
rate.
Asynchronous
transmission over
a simple twisted
wire
pair can
be
accomplished
at moderately
high baud rates (10K
baud
or higher,
depending
on the
length
of wire, type of drivers,
etc.).
Transmission
over
the
telephone network
is generally limited
to approximately
2K
baud
and a modem
is required to convert the
data pulses
to
tones that
can be
transmitted
through the telephone
network.
Radio
Shack's
Telephone
Interface is the ideal
modem
for this
RS-232-C
Interface.
Signal Conventions
The E.I. A. RS-232-C electrical
specification defines
voltage levels
and corresponding logic
conventions
associated with data and control
information
transmitted
between equipment. For
data
interchange,
the signal is considered in the marking condition when the
voltage
measured at the interface point is more
negative
than
—3
Volts(with
respect to signal ground). The signal is considered in the
spacing
condition when the
voltage is
more positive than
+3
Volts(with
respect
to
signal ground).
The marking condition corresponds
to a logic one
(
1
)
and the space
condition corresponds
to a
logic
zero
(0).
For
timing and control
interchange circuits,
the function
is
considered
to
be"on"when the voltage on the
interchange
circuit
is more positive than
+3 Volts(with respect
to signal
ground);
and is considered to
be"off"when the voltage is more negative than
—3
Volts(with respect to signal
ground). The "on"condition
corresponds to
a logic
zero
(0)
and the"off"condition corresponds
to a logic one
(1).
Table 1
summarizes this information.
NOTATION
INTERCHANGE VOLTAGE
Negative Positive
Binary State
Signal Condition
Function
1
Marking
OFF
Spacing
ON
TABLE
1.
ON/OFF CONDITION

Pin
Designations and
Signal
Descriptions
The
mechanical
specification of the RS-232-C requires
a
25-pin
connector
(called
a
DB-25).
Table
2
specifies the
pin assignments
and signal descriptions
as they apply to the Radio Shack
RS-232-C
Interface.
Pin Number
Abbreviation Description
1 PGND Protective
Ground
2
TD Transmit Data
3
RD Receive Data
4
RTS Request-to-Send
5
CTS Clear-to-Send
6
DSR
Data Set Ready
7
SGND Signal
Ground
8 CD
Carrier Detect
20
DTR Data Terminal
Ready
22
Rl
|
Ring
Indicator
TABLE
2.
PEN
DESIGNATIONS AND SIGNAL
DESCRIPTION
Protective Ground:
This must
be bonded to the chassis
or
equipment
frame. It may
also be
connected to Signal Ground.
Transmit Data: Direction-to
data communication
equipment. Signals
on this
circuit
are
generated
by
the
data
terminal
equipment for
transmission of data
to
remote equipment.
This signal should
be
held in the marking
condition during intervals between characters
and at all times when
no data is being transmitted.
Received Data: Direction-from
data communication equipment.
Signals on this
circuit are received from remote equipment which
transmits data
to the terminal. This
signal
should
be
held
in the
marking condition during intervals
between characters and at all
times when no
data is being received.
Request-to-send:
Direction-to data communication equipment.
This
signal is required
by
the terminal equipment
to
control
the
direction of data transmission
by
the
data
communication
equipment.
On one-way
or duplex channels, the "on" condition maintains the
data communication
equipment in the transmit mode. The "off"
condition
maintains the data communication equipment in the
non-transmit mode.
On a half
duplex
channel, the "on" condition maintains
the
data
communication equipment
in
the transmit mode
and inhibits the
receive mode.
The
"off" condition maintains the data communication
equipment in the receive mode.

Clear-to-Send:
Direction-from
data communication equipment.
This
signal is generated by
the
data communication equipment and
indicates whether
or
not the data set (modem)
is
ready
to
transmit
data. The "on"
condition
is
an indication to the data terminal
equipment
that the
data set can accept
data on the Transmit
Data
circuit.
The "off
condition
is an indication
to the data terminal
equipment
that
it
should
not
transfer
data to the data set.
Data Set Ready:
Direction-from
data communication
equipment.
This
signal indicates the
status of the local
data set to the
data
terminal equipment.
The
"on" condition of this circuit
indicates
that the
data communication
equipment
is not in test,
talk or dial
mode and has
completed
any timing functions
required to complete
call
establishment
(answer
tone, etc.). The
"off condition will
appear at all other
times and
indicates that
the data terminal should
accept only Ring Indicator
signals and ignore all other
signals
(appearing
on any other
interchange
circuit).
Data Terminal Ready:
Direction-to
data communication
equipment.
This
signal is used to control
the
switching
of the data communi-
cation equipment
to the
communications
channel. The
"on"
condition
indicates to
data communication
equipment that it
should connect
to the
communications channel
and that it should
maintain the
connection
as long as the "on" condition
is present.
The "off
condition
causes the
data communication
equipment
to be removed from
the
communications channel
following any
in-process
transmission
of data.
Ring
Indicator:
Direction-from
communication
equipment. The
"on"
condition of the
circuit indicates
that
a ringing signal is being
received
on the
communications
channel. In
general, this means
that the
data
set is being
polled
and that data communication is
desired
by the polling
device.
The
"off condition
is
held
during
the
off segment of the
ringing
cycle
(between actual rings)
and at all
other times when ringing
is not being
received.
Carrier
Detect
(Receive Line
Signal Detector):
Direction-from data
communication
equipment.
When
"on", this signal indicates
that
the data
set is receiving
a carrier from a remote data set via the
communications
channel.
The
"off condition indicates that
no
carrier
is being received
or that the signal quality
is
unsuitable for
data demodulation.

.
Installing
of the first
Note:
If
nector,
1
2.
3.
4.
Some
manufactured
RS-232-C Interface). If your Expansion
incorporate this
installation
install this
to
all warranly.
Expansion Interface
your
install the
Position the
remove the
Remove two
nector.
Position
connector
Interface
screws.
Position
from
40-pin
edge
downward.
desired
the
the
the
connector
connector
Modem
RS-232-C
TRS-80 Expansion
Expansion
machine
RS-232-C
mounting holes
Printed
RS-232-C
center
Connect the
The
TRS-80
with
a 42-pin
connector,
of this
of the
which
or
connector
connector on
Door.
screws and
Interface as
Circuit
as shown
Expansion
the cable
of
will
other
Printer, etc.
Line
RS-232-C
Expansion
connector (required lor
must
you
Hie
and
own will
your
incorporates
Interface as
Interface as
with the
Board.
supplied
exposed;
be
end
the
follows:
washers
shown.
screw
Fasten with
(front
below
Interface.
with
the
of the
were
Interface
return it for
units
Inierface does not
proper
RS-232-C. Any at
aulomalically void
necessary
shown
from the
Line up
holds in
two
view).
Carefully
the
flat
cable
42-pin con-
Figure
in
42-pin
the
RS-232-C
the
washers and
Remove
press
RS-232-C
must
cable
(DB-25)
42-pin
to the
the
tempi
2
con-
cover
the
over the
extend
and
FRONT
VIEW
EXPANSION
EXPANSION
OF
INTERFACE
INTERFACE
EXPANSION
CARD
PORT
BOARD
EDGE-J1

EXPANSION
DOOR
MACHINE
SCREWS
*
WASHER
VIEW
OF
FLOOR
WITH
42
CONTACT
CONNECTOR
INSTALLED
TRS-80
EXPANSION
INTERFACE
FIGURE 2. RS-232-C INSTALLATION

Checkout
1 . Set the
RS-232-C Sense Switches (listed
in Table 3 on
Page
13)
for
the desired Baud Rate, Parity, etc.,
as
shown in the
following
example;
Switch
S8
S7
S6
S5
S4 S3 S2 SI
Baud Rate
=
300
CLOSED
CLOSED OPEN
One stop bit and
parity enabled
CLOSED CLOSED
Word length
=
7 bits
of data plus one
parity bit
CLOSED OPEN
Even
parity
OPEN
Also, set TERM/COMM Switch to TERM
(assuming
you
are
connecting to a Modem).
2. Load the cassette
tape
via
the Level 11
BASIC "System" command
using "TERM" as the
label. Type
a slash
symbol
(/)
and press
13^13;!
to activate
the program
(which
is located at 5000-Hex).
3. Correct activation
of the TERM
tape
will be indicated
by a clear-
ing of the Video Display
Screen; the
cursor
will
be
at the upper
left corner of
the Video
Display screen.
Note:
If you
connect
together
pins 2 and 3 of the
25-pin connector
tCDB-25)
on
the
RS-232-C
cable]
,
the
keyboard
output will be
"echoed"
back to the Video Display
Screen,
indicating
correct
operation
of the Interface
and TERM
program.
4. Replace
the
Expansion
Door.