Atari 850 User manual

TECH
-
NICAL
MANUAL
®
)I~®
ATARI
A Warner Communications Company 0

ATARI
®
8SO
™
INTERFACE
MODULE
TECHNICAL MANUAL
)I\.
ATARI
(i)
a A Warner CommuniCai,IOns
Company
Eve
ry effo
rt
h
as
been made to ensure the acc
ur
acy of the product documen
ta
tion in this manual. However, because Atari, In
c.
iscon-
stantly improving and updating the
co
mput
er software and har
dwa
r
e,
we
are unable
to
guarant
ee
the acc
ur
acy of the printed mate
ri
al after
the date of publi
ca
tion and di
sc
laim
li
a
bilit
y for chan
ges,
errors or
omi
ssion
s.
No
reproduct
io
n of this document or any
por
tion
of
its conten
ts
is
allowed
without specific written permission
of
Ata
ri
, Inc.,
Sunnyval
e,
CA 94086.
Impo
rt
ant Info
rm
a
ti
on:
Li
ke any electri
ca
l appliance, this ATA
RI
Home
Comp
uter equipment u
ses
and produces radio fre
qu
ency
energy. If it's not in
sta
ll
ed and u
sed
prope
rl
y according to the instructions in this guid
e,
the e
qui
pment may
ca
u
se
interference
with
your
radio and television receptio
n.
It
has
been type t
es
ted and found to
co
mply with the l
imi
ts for a Cl
ass
B
comp
uting device. in acco
rd
ance
with
the specificat
io
ns in
Subpart J
of
Part 15
of
the
FCC
ru
les
. Th
ese
rul
es
are designed to provide reasonable protection
aga
inst such interference when
th
e e
qui
p-
ment is u
se
d in a r
es
idential
se
ttin
g.
However, there is no guarant
ee
that interference will not occ
ur
in a particular home or r
es
idence.
If you believe this
eq
u
ip
ment is
ca
using in
te
rference with your
te
levision reception, try turning the e
quipm
ent
off
and o
n.
If the in-
terference
prob
lem stops
wh
en the
eq
uip
ment is turn
ed
off, then the e
qu
ip
ment
is
probably
ca
using the inter
fe
rence.
With
the equ
ip
ment
turned on, you may be able to correct the pr
ob
lem by trying one or more of the fo
ll
ow
ing m
eas
ur
es:
• Reorient the
ra
dio
or
television antenn
a.
• Reposition the
eq
uipment in relation
to
the r
ad
io or television
set.
• Move the e
qui
pment away from the radio or television.
• Pl
ug
the equipment into a different wall outlet
so
the equipment and the radio
or
television are on different
branch
ci
rcuits.
If necessary, consult your ATARI Computer retailer
or
an
experienced radio-television technician for additional suggestions.
PRINTED IN U.S.A. © 1982, ATARI, INC. A
LL
RI
GHTS
RESERVED

CONTENTS
HOW
TO
USE
THIS
MANUAL
1
1
WHAT
IS
RS-232-C? 3
2 ATA
RI
BASIC
AND
THE
AT
A
RI
850
INTERFACE
MODULE
7
How
To Use the Program 8
Improving
the Program 9
Interface
Module
Capabilities
11
3
HOW
THE I
NT
ER
FACE
MODULE
INTERACTS
WITH
THE SYSTEM
13
Turn-On Operation
13
Without
a Disk Drive
13
With
a Disk Drive
13
Using a Printer
14
4
PROGRAMMING
THE SERIAL INTERFACE PORTS
15
'
Input/Output
Control Block
15
Accessing
an
RS-232-C Device
15
Step 1
-Configure
the Serial Interface Port
15
Step 2 - Using the Serial Interface Port 16
Limitations on Port Configurations
18
Restrictions 19
5 SETTING THE
BAUD,
WORD
SIZE, STOP
BITS,
AND
READY
CHECKING
21
6 SETTING THE
TRANSLATION
MODES
AND
PARITY
HANDLING
25
Types
of
Code Translation
26
Parity 27
Short
Word
Conversion 27
7
CONTROLLING
THE
OUTGOING
LINES
29
DTR,
RTS
, and XMT
29
Control Command
29
Contents iii

8 BASIC
1/0
COMMANDS
31
Opening
a Port
31
Closing a Port
31
ATARI BASIC
1/0
Statements
32
GET, INPUT, PUT, and PRINT
33
LIST,
SAVE
, LOAD, and
ENTER
35
9 STARTING
CONCURRENT
MODE
1/0
37
10 THE STATUS
COMMAND
43
Uses
of
STATUS
Command
43
Error STATUS Bits
45
Received Data Framing Error
45
Received Data Byte
Overrun
Error
45
Received Data Parity Error
45
Received Data Buffer
Overflow
Error
46
Illegal
Option
Combination
Attempted
46
External Device
Not
Fully Ready
46
Data Block Error 46
Command
Error
to
Interface
Module
46
11
SAMPLE PROGRAMS
49
Transferring ATARI BASIC Source Programs
49
Baudot Terminal Emulator
53
Programming a Printer 58
Reading a Digitizer 60
12 INTERFACE
MODULE
ELECTRICAL
SPECIFICATIONS
63
RS-232-C Standard
63
RS-232-C Specifications 63
Electrical Specifications
of
the Serial Ports 64
Printer Port Specifications
65
13 PRINCIPLES
OF
OPERATION 67
Software Operation 67
Printer Software
Operation
69
Contents
iv

t
APPENDICES
A Code Tables
B XIO Commands and Tables
C Port Diagrams and Interface
Module
Schematic
D Troubleshooting
E Error Conditions, Causes, and Corrections
F Product Specifications
INDEX
ILLUSTRATIONS
71
81
87
93
97
101
105
1-1
Communications
Hook-Up
Showing Role
of
RS-232-C 4
4-1
Block
Output
Mode
1/0 17
12-1
Timing
of
Printer Ports
66
C-1
Pin
Functions
of
Serial Interface Port 1 87
C-2
Pin
Functions
of
Serial Interface Ports 2 and 3 88
C-3
Pin
Functions
of
Serial Interface Port 4 89
C-4
Hook
Up
of
Serial Interface Port 4 for Use
With
a
20-mA Loop Device 90
C-5
Pin
Functions
of
the Printer Port 90
C-6 ATARI 850 Interface
Module
Schematic Diagram
91
TABLES
1-1
4-1
10-1
10-2
12-1
B-1
B-2
B-3
B-4
B-5
B-6
B-7
B-8
B-9
B-1
0
B-11
F-
1
The Most
Common
RS-232-C
Circuits
Available Signals on Ports
1,
2,
3,
and 4
Decimal Representation
of
the Error Bits in Location
746
Sense
Values Added Into Location 747
RS-232
-C Electrical Specifications
Baud
Rate
Specifiers
To
Add
to
Aux1
Word
Size Specifiers
To
Add
to
Aux1
Specifier
for
Two
Stop Bits
To
Add
to
Aux1
Aux2 Specification To
Monitor
,
DSR
,
CTS
,
CRX
Translation
Mode
Options Added
to
Aux1
Input
Parity
Mode
Options
Added
to
Aux1
Output
Parity
Mode
Options
Added
to
Aux1
Append Line
Feed
Options
Added
to
Aux1
Control Values for DTR Added
to
Aux1
Control Values for
RTS
Added
to
Aux1
Control Values for XMT Added to Aux1
Pin
Connections
4
18
44
48
63
82
82
82
83
83
83
84
84
84
84
85
103
Contents v

HOW
TO
USE
THIS
MANUAL
Before reading this manual,
you
should be familiar
with
the
ATARI
®
BSO
™ Interface
Module
()wners
Manual.
It tells
you
how
to
connect
the ATARI 850 Interface
Module,
the ATARI 830™ Acoustic Modem, and the ATARI 825™ 80-
Co
lumn
Printer
to
your
ATARI
Home
Computer.
While
most
of
the
information
in this technical manual covers the use
of
the inter-
face
module
,
you
'll find some instructions here
for
operating the acoustic
modem.
The
modem
cannot
function
without
the interface
modu
l
e.
Sections 1
through
3
of
the manual explain
how
the interface
modu
le
works
and
what
it can
do.
The
beginning
user may
want
to
study these sections after setting
up
·
and using the
equipment.
The advanced user should at least skim this material
before going on
to
Sections 4
through
13
,
which
provide
details
on
the
many
uses
of
the interface
module.
This manual describes
how
to
use
the
ATARI850
Interface
Modu
le
only
with
ATARI
BASIC (often referred
to
in
the
text
simply
as
BASIC). To carry
out
the operations
described,
you
must first insert an ATARI
BAS
IC
cartr
idge in the
appropriate
car-
tridge slot
of
your
computer
console.
How to
Use
This Manual 1

1
WHAT
IS
RS-232-C?
RS-232-C
is
a technical standard
of
the Electronic Industries Association (EIA).
Published in August
of
1969, it
is
titled "Interface Between Data Terminal Equip-
ment
and Data
Communication
Equipment Employing Serial Binary Data Inter-
change."
The standard specifies electrical signal characteristics and names and
defines
the
functions
of
the signal and
control
lines that make
up
a standard inter-
face called RS-232-C.
Figure
1-1
s
how
s,
diagrammatically, the kind
of
hook-up
that RS-232-C was de-
signed to
sta
ndardize. A data terminal
is
at each end
of
the
communication
link
.
The data terminal either generates
or
recei
ves
data (or does both). It
could
be a
keyboard/screen "terminal" in the normal sense
of
the
word;
it
co
uld be a
co
m
~
puter; etc. The idea isthat the data terminal
is
at the end
of
the
communication
link
- hence it is called "terminal."
However
, the data terminal need
not
really be at
the
end-
you
ca
n
think
of
"data
terminal"
as
ju
st
the name
of
one
o(the
two
ends
of
a RS-232-C
connectio
n.
At
the
other
end
of
a RS-232-C
connectio
n
is
the data
set
. In the example
of
Figure
1-1
, each data
set
takes data from the data terminal it
is
connected
to
and
sends/receives the data
over
the
communications
link. The most familiar example
of
a data set
is
the
modem
(such
as
the ATARI 830 Acoustic
Modem)
,
which
takes
data
from
a terminal and converts it for sending and receiving
over
a
telephone
line.
The ATARI
Home
Computer
with
the interface
module
should be
thought
of
as
a
unit
comprising a RS-232-C data terminal.
A
full-duplex
connection
is
one
where
data can be sent and received by both ends
of
the RS-232-C
connection
simultaneously. In a half-duplex
connection
, data can-
not
be sent by both ends at the same
time
. Therefore,
one
terminal must be able
to
tell the
other
terminal, " I' m
through
now
; it's
your
turn
."
The second terminal then
sends a signal saying, "
OK
, here I
come."
This exchange
is
called
"handshaking";
it
is
simply the sending and receiving
of
required signals
to
prepare each end
of
the
connection
for the sending
or
receiving
of
data. Handshaking can be used in full-
duplex
operation
to
tell
the
sending terminal
to
stop sending until the receiving ter-
minal can catch
up
.
What
is
RS-232-C? 3

4
What
is
RS-232-C?
The data-set/data-terminal distinction should be kept in mind because the
RS-232-C
interface
is
directional. That
is
, each line in a
RS-232-C
interface
has
a
direction -one device drives the line (sends information) and the other receives
the information.
Each
line
in
an
RS-232-C interface
is
defined
as
being driven by
either the data-set end
or
the data-terminal end.
DATA
TERMINAL
(TERMINAL)
RS
-
232-C
CONNECTION
DATA
SET
(MODEM)
DATA
SET
(MODEM)
DATA
TERMINAL
(COMPUTER)
DATA
COMMUNICATION
LINK
(
TELEPHONE
)
RS-232-C
~
CONNECTION
Figure
1-1
Communications
Hook-Up
Showing
Role
of
RS-232-C
The
RS-232-C
standard defines some 20 signaling lines,
or
"circuits"
as
the stan-
dard refers
to
them. Most
of
them are optional and rarely used.
Even
with
many
omissions and deviations from the standard, a link may
st
ill be referred
to
as
RS-
232-C. It
is
more
common
to
refer
to
the link loosely
as
"
RS-232
"
or
"
RS-232
compatible."
The most
commonly
used
RS-232-C
lines are listed in Table 1-1. The table shows
the name
of
each line in the
RS-232-C
standard and
commonly
used mnemonics.
Table
1-1
The
Most
Common
RS-232-C Circuits
LINE
(CIRCUIT)
NAME DIRECTION DESCRIPTION ABBREVIA
liON
BA
terminal-+set Transmitted data XMT
BB
terminal+-set Received data
RCV
CA
terminal-set
Request
to
send
RTS
CB
terminal+-set Clear
to
send
CTS
cc terminal+-set Data
set
ready
DSR
AB
(none) Signal ground
CF
terminal+-
set
Signal (carrier) detect
CRX
CD
terminal-set
Data terminal ready DTR
It
is
common practice to
use
common names or abbreviations for the RS-232-C
signals,
and not the two-letter names
in
the official standard.

Transmit (XMT) and receive (RCV),
for
any given device,
is
usually relative to that
device. That
is
, data goes
out
of
a device on XMT and comes in on
RCV.
To connect
two
RS-232-C devices
when
given the
common
names
of
the
signals, you should
connect
XMT
to
RCV
(in one direction) and
RCV
to
XMT (in the
other
direction). If
one
of
the devices
is
wired
as
a data set and the other
as
a data terminal, then you
should
connect
DTR
to
DTR,
DSR
to
DSR
,
RTS
to
RTS,
and
so
on. If,
on
the
other
hand,
they
are each wired
as
data terminals, you should be careful
how
things are
connected.
The Signal Ground
connection
must always be made. RS-232-C requires that the
ground potential
of
the
two
devices be equal. That
is,
their
grounds must be con-
nected together. Devices for
which
this requirement
cannot
be met cannot be con-
nected via a RS-232-C interface.
Data terminal ready
(DTR)
is
used by
RS-232
-C
to
allow
the terminal
to
signal its
readiness
to
send
or
receive data. This
is
a signal
to
automatic answering modems
that
they
have permission
to
answer the ringing
of
the telephone line.
Data
set
ready
(DSR)
is
used by the data set
to
signal its readiness
to
send
or
receive
data. This indicates that communications are established.
Request
to
send
(RTS)
is
used by the data terminal
to
tell the data set
it
wishes
to
send data. Some modems (Bell 202
for
example) require this line
to
switch
directions.
Clear
to
send
(CTS)
allows the data
set
to
signal its readiness
to
pass
data from the
data terminal.
The carrier detect (CRX) line allows the data
set
to
tell the data terminal that the
communication
link
is
established. This often differs little from
DSR
, except that
DSR
usually refers to "telephone
off
the
hook
" (answered), whereas
CRX
means
something like " I hear the
modem
at the
other
end and
we
can talk
now
."
When
CRX
goes OFF, data set ready OFF usually follows a
few
seconds later, indicating
that the other end
has
"hung up."
In normal operation, DTR,
DSR
, and
CRX
are all
ON.
For full-duplex operation
RTS
and
CTS
are also both
ON
.
However
, it
is
often unnecessary
to
have all these lines
ON
-either
one
or
the other devices on the
RS-232
-C connection does not have
all the lines,
or
it
is
all right
to
ignore them (one
of
the
properties
of
the RS-232-C
standard
is
that not all
of
it needs
to
be implemented -it's perfectly all right
to
leave parts out). To operate the ATARI 830 Acoustic
Modem
,
for
instance, none
of
the
control
lines need
to
be used. In fact, the ATARI 830 Acoustic
Modem
ignores
DTR and
RTS,
and it turns
DSR
,
CTS
, and
CRX
on and
off
together (with carrier).
Note
that the
communication
link
shown in Figure
1-1
is
not
defined by RS-232-C.
In particular, this
link
seldom
has
more than
the
"e
quivalent
"
of
XMT and
RCV-
that
is,
only
data lines and
no
control.
However
,
as
often
as
not this
link
is
a full-
duplex
link,
so
data can go both ways simultaneously. ASCII characters are the
most
common
data sent,
so
the data sent each
way
can be either
"co
ntrol" data
or
"data" data.
What
is
RS-232-C?
5

6
What
is
RS-232-C?
•
With
full-duplex
operation,
two
devices can handshake
with
data in various ways.
Common
terminals usually
do
not
have
an
internal
connection
between
the
keyboard and display (or
they
have a switch, usually called
half
/f
ull
duplex
,
to
make
or
break this internal
connection)
so
when
talking
with
a
computer
in full-
duplex
mode
(the most
common
mode),
the
computer
at
the
other
end
"echoes"
(sends back) each character
to
be displayed
as
it
is
typed. This allows
you
to
see
ex-
actly
what
the
computer
at
the
other
end receives. It also allows
the
comp
uter
at
the
other
end
to
decide
NOT
to
let you
see
what
you have
typed,
as
in
"s
up-
pressing" the
echo
of
a password.
In half-duplex
operation,
somew
here along
the
com
muni
cations path data may
pass
in
only
one
direction
at a time.
Not
all parts
of
the
co
mmuni
cations path need
be half
duplex
,
but
if
any part
is
, then the
whole
system
will
probably
have to send
data
only
one
way
at a time. In half-duplex
mode
, the
comp
ut
er at
the
other
end
does
not
echo
back
what
you type. In this case, in
order
to
see
what
you type, the
co
nnecti
on
from
keyboard to screen must be set locally; that
is
, set
your
terminal
to
"half
duplex
."
Note: The ATARI
Telelink
™ I cartridge does
not
have
the
equivalent
of
a half
/f
ull
switch.
However,
the ATARI 830 Acoustic
Modem
does have such a switch, and
when
it
is
placed in
the
half-duplex position, it echoes any data sent
out
over
the
phone
back
to
the
computer
console.
A
common
handshake that requires full
duplex
is
the
XOFF/XON (transmit
off/transmit on) handshak
e.
The receiver
of
data can send XOFF
to
the
sender
to
ask
the
sender
to
pause the data transmission and
XON
to
resume. This allows
the
user
of
a screen terminal
to
stop
the
data
so
he can read
the
screen, and it allows a
computer
that
is
receiving data
from
another
computer
to
effectively
control
the
rate at
which
it can accept data.

2
ATARI
BASIC
AND
THE
ATARI
850
INTERFACE
MODU
LE
This section
will
show you
an
example
of
how
the interface
module
is
pro-
grammed. Using ATARI
BASIC
,
two
ATARI
Home
Computer
Systems
will
be pro-
grammed to let one user talk
to
another user through ATARI 830 Acoustic Modems.
Let's start
simply-
just a program
to
send a message line, then receive a line, and
so
on. The main part
of
such a program might be:
100 INPUT MESSAGE$
110 PRINT #5;
MESSAGE$
120 INPUT #5,
MESSAGE$
130 PRINT MESSAGE$
140
GOTO
100
Here,
unit
#5
is
assumed
to
have been opened to the RS-232-C
port
attached to the
modem
. Thus, line 100 gets a line from
your
keyboard, line 110 sends it
to
the
modem
, line 120 gets a line from the
modem
, and 140 prints that on
your
television
screen.
Here's the
whole
program:
10
DIM
MESSAGE$
(120)
20 OPEN #5,
13
,
0,
"
R1
:"
30 XIO 40, #5,
0, 0,
"
R1
:"
100 INPUT
MESSAGE$
110 PRINT #5;
MESSAGE$
120 INPUT #5,
MESSAGE$
130
PR
INT
MESSAGE$
140
GOTO
100
Line 10 allows space for the variable
MESSAGE$
(used
to
both send and receiv
e).
We've
assumed the
modem
is
attached to
port
1. Line 20 opens the RS-232-C
port
1,
allowing
input
and
output,
and enabling
Concurrent
Mode
1
/0.
Concurrent
Mode
1/0
is
required for
input
(see
Sections 4, 5,
6,
9,
and 10, and
Appendix
B for
more
details about
Concurrent
Mode
1
/0)
. Line 30 turns on the
Concurrent
Mode
1/0.
Once
the
Concurrent
Mod
e 1
/0
is started, you may INPUT
and/or
PRINT at
any
time
to
the
concurrent
RS-232-C
port
;
but
no other 1
/0
to
any peripheral
is
allowed until
Concurrent
Mode
1/0 is stopped by closing the port.
Input
/
output
to
the keyboard and screen
is
allowed
while
RS-232-C
Concurrent
Mode
1
/0
is
active,
and that
is
what
we
'
re
doing
here,
so
there's
no
problem.
BAS
IC
and
the ATARI
850
Interface 7

HOW
TO
USE
THIS
PROGRAM
How
is
this program
used?
The first
thing
to
know
is
that since it
uses
an
RS-232-C
port
, the RS-232-C 1/0 handler for the RS-232-C ports must be loaded
into
the
ATARI
Home
Computer
System. This
is
done
automatically
for you by the
com-
puter
and the interface
module
,
but
you have
to
turn
on
your
equipment
in the
right order. Specifically, the interface
module
must be
turned
on before the
computer
console (or at the same instant),
or
the
computer
will
not
know
the inter-
face
module
is
there. The RS-232-C handler can
only
be loaded
when
the
computer
console
is
turned on.
See
Section 3 for
more
details.
After turning your
comp
ut
er on
correct
l
y,
yo
u
ca
n type in the program.
Or
, the
program can be loaded from tape or diskette. The person on the
other
end does all
these things, too,
but
there's one
sma
ll difference. One
of
you
has
to
write
his pro-
gram
to
listen first, and the
other
to
talk first.
One
way
to
do
this
is
by adding the
statement:
40
GOTO
120
to one
of
the programs. This
way
, the program starts reading from the
modem
instead
of
the keyboard.
You're
ready to go! Get on the
phone
to
each other.
One
of
you
sets
his
modem
to
Answer
mode
, and the
other
sets
his to Originate
mode
(it
doesn't
matter
which).
Both modems should be
set
to Full Duplex.
Note
that
when
the Answer
modem
is
turned
on, it starts
to
squeal. This
is
the same squeal you h
ea
r over
the
phone
when
you call
up
a timesharing service, and it
is
a
sig
nal
to
the
Originate
modem
to
sta
rt
communications.
To avoid the
bother
of
listening
to
this,
don't
turn
the
modem
on
until
yo
u are ready
to
start talking (only the interface
module
needs to be
turned
on
before the
computer
console-
it's.all right
to
turn
on the
modem
later).
Now
put
your
pho
n
es
in the
modem
cradle
s.
The person
with
the send-first program typ
es
a line (up
to
120 characters), e
ndin
g
with
a
i;ljil@l
. Then the
other
can answer...and
so
on.
The listener
will
notice
so
mething
odd
right away:
nothin
g appearson histelevision
sc
reen for a
while,
and then POOF!
ther
e's a message. Here's
why:
The
se
nder's
program gets
to
the INPUT statement, line 100. BASIC waits for
input
from
the
keyboard, and
doesn't
go on
to
PRINT
to
the
modem
(line 110)
until
the l;ljli@j is
typed
by
the sender.
Meanwhile
, the listener's
progr
am is also
doing
INPUT (line
130), and that INPUT
won
't
complete
until an
EOL
(
End
of
Lin
e)
is
re
ceived from
the
sender.
(EOL
is
similar
to
1;11"1;111
, and
is
used inside the
co
mput
er
to
mark the
end
of
a line
.)
EOL
is
the last character sent by PRINT in line 110.
So
the
se
nder's
me
ssage
doesn't start over the
phone
until he pr
esses
l;ljil@j, and the listener
do
es
n
't
see
the message until it's
completely
received!
How
is
the program stopped? (Note that the program is an
infinite
loop
.)
Try the
l1li!D
key. You'll find it doesn't
work
, because the
l1li!D
key
is
turned
off
whenever
Concurrent
Mode
1/0
is
activ
e.
In general,
yo
u s
hould
a
lw
ays
try the
mD
key first
whenever
you
want
to stop a BASIC program, even
if
you
don
't ex-
pect it
to
work.
But,
if
it
do
es
n't
work
,
don't
be
up
set-
just press the
ii1MM1;1}1ji
key (
Note:
On
ea
rly versions
of
the interface
module
, the
l1li!D
key
is
not
disabled
during
Concurre
nt
Mod
e 1
/0
.)
8
BAS
IC and the ATA
RI
850 Inte
rf
ace

IMPROVING
THE PROGRAM You may find the limitation
of
one
line at a
time
bothersome. Also, there
is
no way
to
interrupt
and get the talker's attention
when
you're
the listener. An improved
version
of
the program should
allow
either
of
you
to
talk at any time, and send
characters immediately
as
they'
re
typed. This
improved
program
is
somewhat
more complicated than the simple program
you've
seen, and some background
is
needed
to
understand it.
The basic idea
is
to
use
GET
and PUT instead
of
INPUT and PRINT.
GET
and PUT
work
with
single characte
rs
(rep
res
ented by the character's numeric equivalent in-
side the computer), and characters are immediately available
to
BASIC
without
having
to
wait
for the li!Jill;lli from the keyboard or
EOL
from the modem. (Note
that
when
you u
se
GET
, the l;liiil;lli key produces the code for
EOL
, but this
is
not
the same
as
"e
nding
the
input
line"
which
is
the meaning
of
l;iiii@i
when
using
INPUT.)
GET
shares a problem
with
INPUT: BASIC waits until all the
input
is
available. Ad-
mittedly
GET
is
only
looking
for
one
character
but
until it ar
ri
ves,
BASIC
waits.
So
suppose
your
copy
of
the program
is
executing the
GET
from the
modem
link to
your friend, and he
hasn
't typed anything. This means you
can't
type, because
your
computer
isn
't reading
your
keyboard!
The
trick
is
to avoid actually
doing
the
GET
until you
know
a character
is
there. For-
tunately, there
is
a way to check for a character before
GET
, both for the keyboard
and
for
the
concurrent
RS-232-C port. Thus the
"f
low
"
of
our
improved program
will
be like this:
100
IF
no
chara
cter
from
keyboard
yet THEN 200
110
GET
character from
keyboard
120 PUT
that
character to the
modem
200 get STATUS
of
the
modem
buffer
210
IF
character
not
available THEN 100
220
GET
character
from
modem
230 PUT
that
character
to
television screen
240
GOTO
100
The program
continually
alternates between checking for a character from the
keyboard and one from the
modem
, and in each
case
only
gets and sends along a
character
if
one
is
ready.
(You may
wonder
how
a character can become available even
when
BASIC
has
not
yet tried
to
GET
it. The Operating System
of
the computer, using techniques
of
"in-
terrupts" and "buffering
,"
accepts and
saves
the characters
as
they appear. Then,
when
BASIC
does the
GET
, the saved character
is
handed over
to
BASIC from the
Operating System. The keyboard
has
a one-character buffer, that
is
,
only
one
character
is
saved this way. If you press another key before
BASIC
receives the first
character,
BASIC
will
find the second character you typed and the first
is
lost. The
defauIt buffer for each RS-232-C
port
holds
32
characters; that
is
,
BASIC
can fall
31
characters behind before anything
is
lost. You can
set
up
a buffer larger than
32
if
you need it -
see
Section 9 for more details.)
BASIC
and
the ATARI
850
Int
e
rf
ace 9

INTERFACE
MODULE
CAPABILITIES
This program
ca
n be u
se
d to " talk" with a
co
mputer o
th
er than another ATA
RI
Home
Co
mputer. If
yo
u get double characters w hen
yo
u are entering data in
to
the
other
co
mp
ut
er, then delete PUT #3,
KEY
in line 110.
In effect, th
ese
two
programs have changed
yo
ur
ATA
RI
Home Co
mput
er
int
o a
tel
etypew
ri
ter, using the modem and
int
erface mo
dul
e.
W ith the la
tt
er program,
yo
u can access
co
mput
er ne
tw
orks, such
as
THE
SOURCE, AME
RI
CA'SINFORMA-
TI
ON
UTILITY* and C
OMPU
S
ERV
E*
*.
The program is not
int
ended to r
ep
lace the
Telel i
nk
™ I cartrid
ge
,
as
it
will
prin
t all the
co
ntrol characters to
yo
ur
television
sc
reen and h
as
no pr
ov
ision for using an ATA
RI
Printer.
Both
pr
ograms
ca
n be helpful in l
ea
rning
how
to u
se
, and get
mor
e
out
of, the
ATARI 850
Int
erface
Module.
The
int
erface mo
dul
e h
as
many capabiliti
es
not
me
ntion
ed in the a
bo
ve exampl
es.
The r
es
t
of
this manual c
ont
ains inf
orm
a
tion
abo
ut
the
int
erface
modul
e and how
to take ad
va
ntage of
so
me
of
th
ese
capabiliti
es.
After
you
've r
ea
d
mor
e abo
ut
the
int
erface
modul
e,
l
oo
k at the
Sec
tion 8 exa
mpl
es
of
how
to
u
se
it.
* THE SOUR
CE
and
AMER
ICA'SINFORMATI
ON
UTILITY are
se
rvice marks
of
So
ur
ce Telecomputing Corporation, a
subsidiary
of
The Reader's Digest Associa
ti
on, Inc.
~
**COMPUSERVE INFORMATI
ON
S
ERV
I
CE
is a r
eg
istered tradema
rk
of
CompuSer
ve,
Inc., an H & R Block co
mp
any.
BAS
IC
and
!he A
TAR
/
850
Interface 11

So
much
for the general
idea-
now
for the details. First
of
all, GET does
not
work
from the
Operating
System's screen editor; to use GET you must open the
keyboard (K:). For the PUT commands
to
the television screen, you can use either
the screen device
(S:)
or
the
editor
device
(E:).
(You
might
want
to
experiment
with
E:
and
S:
to
see
which
suits
your
needs
-they
differ in
their
treatment
of
the editing
keys such
as
I
mmm
I and the cursor
movement
keys.
See
the
ATARI
BASIC Reference
Manual
for details.) Here,
we
'
ll
use
the editor.
To check
whether
a key
has
been typed,
PEEK
at the keyboard buffer. It
is
in
memory
at location 764 (decimal), and
has
the value 255
whenever
a key
has
not
yet been pressed. This location
is
reset
to
255
when
you GET
from
the keyboard.
Here's the
improved
program:
10
LET
KB
= 764:
NO
KEY= 255
20
LET
MODEM=
747:
NOCHAR=
0
30 OPEN #5,
4,
0,
"K:"
40 OPEN #2, 13,
0,
"R1
:"
50 OPEN #3,
8,
0,
"E:"
60 XIO 40, #2, 0,
0,
"R1
:"
100
IF
PEEK(KB)
=NO
KEY
THEN 200
110
GET
#5,
KEY:
PUT #3,
KEY
120 PUT #2,
KEY
200 STATUS #2,
XXX
210
IF
PEEK(MODEM)=
NOCHAR
THEN 100
220
GET
#2, CHAR
230 PUT #3, CHAR
240
GOTO
100
Lines 10 and 20
of
this program
set
up
some sy
mboli
c constants. The variables (sym-
bols) are given values
which
will
not be changed
as
the program runs (they're con-
stant)-
but
see
how
much
more
readable these variables make lines 100 and 200.
Lines 30
through
60 open the keyboard (K:),
modem
(attached
to
port
R1
:), and
screen
editor
(E:),
and start
up
the
Concurrent
1/0 through
R1.
The rest
of
the pro-
gram
is
just like the
"f
low
" program shown before, except it's been
turned
into
real
BASIC.
Note
the extra PUT in 110 to place
your
keyboard typing
onto
your
own
television scree
n.
Lines 200 and 210
work
together. First 200 gets the status
of
port
R1:
(which
was
opened through IOCB #2). Part
of
the status
is
the
count
of
characters that have
been received and placed in the receiving buffer, and that
count
is
in location 747
(decimal) after the STATUS check. Line 210 checks 747 to
see
whether
it's zero
or
not
-
if
not
, line 220 gets a character from the buffer.
This program
is
used just like the simpler one. Since either
of
you can talk at any
time
, you can both use the same program -it's
not
necessary
to
modify
one
of
them to listen first. If you both type at the same time, though,
your
two
messages
will
get mixed together.
You'll
have
to
learn to take turns typing,
but
allow
for the
other
to
interrupt
if he wants.
One
character you
might
find useful
is
the bell
(buzzer),
which
is
typed
as
&I
2.
10
BASIC
and
the
ATARIBSO
Interface.

TURN-ON
OPERATION
WITHOUT
A
DISK DRIVE
WITH
A
DISK DRIVE
3
HOW
THE INTERFACE
MODULE
INTERACTS
WITH
THE
SYSTEM
The
Operating
System
(OS)
of
the ATARI
Home
Computer
does
not
contain the in-
formation
necessary to operate the interface
module
SERIAL
INTERFACE ports
or
the ATARI 810™ Disk Drive. This
information
comes from the peripheral itself.
The
computer
asks
for
the data
when
it
is
turned
on.
If
the
peripheral
is
turned on
before
or
at the same
time
as
the
computer,
it
will
answer the
computer's
request
and send the necessary
information
. This
turn-on
and
initialization
procedure
is
called
"automatic
bootstrap
,"
"a
utoboot,"
or
just
"boot."
The term comes from
the expression "
pulling
yourself
up
by
your
bootstraps
,"
indicating that you start
with
nothing
and reach
your
goal by
your
own
efforts.
The bootstrap
information
contained in the interface
module
is
called the RS-232-C
"ha
ndler
."
The disk drive
information
is
called the Disk
Operating
System (DOS).
When
the
power
is
turned on
to
the
computer
console, the
computer
issues a disk
drive
request.
If
there
is
no disk
drive
in the system (or
if
the disk
drive
is
turned
off),
the interface
module
will
respond to the disk
drive
request. The
computer
then
loads the RS-232-C handler bootstrap program from the interface
module
, just
as
though it
were
reading the program from a diskette. The bootstrap program
is
then
run, and it gets the RS-232-C handler from the interface
module
and relocates it in-
to
the
computer's
RAM. The
memory
occupied
by
the bootstrap program
is
then
freed (but the handler remains).
If
the
disk
drive
is
set
for
Drive
1, it
will
respond
to
the disk
drive
request
when
the
compute
r console
is
turned
on. The interface
module
will
not
respond. A special
start-up program
is
loaded from the diskette and this program then loads the
handler from the interface
module.
In the ATARI 810 Master Diskette, CX8104, this
job
is
handled by a file
ca
lled
AUTORUN.SYS that is supplied
with
your
DOS
II
Diskette.
Read
the instructions
supplied for details on
AUTORUN
.
SYS.
Caution: The RS-232-C handler shares RAM space
with
a
portion
of
the DOS
utilities.
When
DOS
is
called (by
typing
DOS and pressing l;ljiii;lll from
BASIC)
,
DOS
will
overwrite
the RS-232-C handler and destroy it. To protect against this, add
MEM.SAV to
your
diskette (item
Non
the DOS
Command
Menu).
Then,
when
you
call DOS, the RS-232-C handler
will
be saved
with
your
program.
Note: ATARI 810 M
as
ter Diskette,
Model
CX8101 , does
not
contain the
AUTORUN
.
SYS
file and
cannot
be used
with
the interface
module
RS-232-C
SERIAL
INTERFACE ports.
H
ow
the Interface
Modul
e Interacts
With
the System 13

USING
A
PR
INT
ER
As
a general rule,
turn
on any peripheral that
you
intend
to
us
e
with
your
ATARI
Home
Computer
before
turning
on
the
computer
. This allows those devices that
need
booting
to
do
so.
There are exceptions
to
this rul
e,
though.
For example, since an ATARI Printer does
not
use the
SERIAL
INTERFACE 1/0 ports
of
the
int
erface
module
, it can be
turned
on at any
time
,
as
can the ATARI 830 Acoustic
Mod
em.
In the case
of
the ATARI Printer,
turning
the
computer
on before
turning
on
the in-
terface
module
saves RAM,
as
the RS-232-C
handler
takes
over
1 1/2 K-bytes
of
memory.
The RS-232-C
handler
is
not needed
to
use
an
ATARI Printer attached
to
the
printer
port
of
the interface
module.
To
see
how
much
memory
can be saved,
boot
your
system with the RS-232-C
handler
and type ?
FRE
(0). This
will
give
you
the
amount
of
free
memory
with
the
RS-232-C handler loaded
into
memory.
Repeat the action without loading the RS-232-C handler. The difference
is
the
amount
of
RAM saved by
not
using the
handler
when
it
is
not
needed.
14
How
the Interface
Modul
e Interacts
With
the
Sys
tem

IN
PUT/OUTPUT
CONTROL
BLOCK
ACCESSING
AN
RS-232-C
DEVICE
4
PROGRAMMING
THE
SERIAL
INTERFACE
PORTS
As
with
any peripheral device attached
to
an
ATARI 400™ or ATARI 800™ Home
Computer, the ATARI 850 Interface
Module
requires a program
to
tell it
what
to
do
. This program may be pre-written
or
you may
want
to
use the
SERIAL
INTER-
FACE
ports from
your
own
BASIC program. In the case
of
pre-written programs,
such
as
the ATARI
Telelink
I cartridge, read the instructions for using that particular
program
with
the interface
modul
e.
Using software instructions to
set
the specific values for the parameters
of
the
port
is
ca
lled
"conf
i
gu
ring the
port."
The
conf
iguration and use
of
the
SERIAL
INTER-
FACE
ports on the ATARI 850 Interface
Module
can be
complex.
Many
details must
be remembered and
comp
licated procedures must be
followed
exactl
y.
This
sec-
tion gives
an
overview
of
the effects
of
commands and their relation to each other.
IOCB
is
an
acronym
for
Input
/O
utput
Control
Block. It
is
that
portion
of
the com-
puter's
Operating
System
(OS)
that
controls the
input
and
output
of
data
within
the
system.
An IOCB allows the
computer
to
keep track
of
the 1
/0
functions, both its
own
and
the user's. Therefore, an IOCB acts
as
an interface between the user and the com-
puter
1
/0
system.
From ATARI BASIC, the user
has
seven IOCBs available
to
use. The
se
are
numbered
1
to
7.
IOCB
#7
is
used by the OS
for
LPRINT and and IOCB
#6
is
used
for GRAPHICS
MODE
functions. These IOCBs should
not
be used
with
the inter-
face
module
if
you have graphics
or
line
printer
commands in
your
BASIC program.
To
be on the safe side, specify IOCB #5.
STEP
1
-CONFIGURE
THE SERIAL INTERFACE PORT
The first
thing
to
be
done
to
access an
RS-2
32-C device
is
to
configure the
SERIAL
INTERFACE
port
to
which
the device
is
connected by using instructions in
your
program. In
configuring
the
port
you may set the
fo
llowin
g:
• Baud rate -bits-per-second sent/received
•
Number
of
bits-per-word sent/received
•
Number
of
stop bits-per-word sent
•
Whether
the
incoming
control
signals
DSR
,
CTS,
and
CRX
are
monitored
•
Whether
input
parity
is
checked
•
Whether
output
parity
is
set
•
Whether
Line Feed
is
added after every Carriage Return sent
• Translation
of
the
word
being sent
or
received (three types
of
translation)
•
How
the
outgoing
contro
l signals DTR and
RTS
are used
These are shown
as
three groups, corresponding
to
the three configuration
com-
mand
s;
otherwise, the division
into
groups
is
arbitrary.
Pr
og
ra
mmin
g
th
e
Se
rial
Int
e
rf
ace
Ports 15

If you
do
not
configure the port, the system
sets
defauIt values
of
the
port
variables,
as
follows:
• 300 Baud
• 8 bits-per-word
• 1 stop
bit-per-word
transmitted
•
Input
parity
is
not
checked
•
Output
parity (bit
7)
is
set
to
zero
• Line feed
is
not
added after every Carriage Return sent
• Light-translation
•
Outgoing
control
signals DTR and
RTS
are set
off
If the defauIt (preset
option)
is
what
you want, then the parameters
of
the
port
con-
figuration
do
not
have
to
be set.
Each
of
these groups
of
conditions
can be changed
with
a configuration
command
and each
port
can be configured
independently.
Configuration
of
one
port
has
no
effect on the configuration
of
any
of
the
other
port
s.
The CONFIGURE
BAUD
RATE
command
is
used
to
set the Baud rate,
number
of
bits per
"wo
rd
,"
and the
number
of
stop bits
to
transmit. This
command
also
establishes the
monitoring
of
DTR,
CTS,
and
CRX.
The CONFIGURE TRANSLA-
TION
MODE
command
will
set
up
the translation
mode
,
input
and
output
parity
modes, and the
automatic
appending
of
LF
(Line Feed) after
CR
(Carriage Return).
The
CONTROL
command
will
let you
turn
the
DSR
and
RTS
control
lines on
or
off.
STEP
2-
USING
THE SERIAL INTERFACE PORT
Once
the
SERIAL
INTERFACE
port
is
configured, you can OPEN the
port
for 1
/0.
There are
two
fundamentally
different ways
of
doing
1
/0
to a
SERIAL
INTERFACE
port: Block
Output
Mode
and
Concurrent
Mode.
As
its name implies, the Block
Output
Mode
can
only
be used for
output
from the
computer
to
your
RS-232-C
compatible
device. The Block
Output
Mode
is
simpler to use,
al
lows use
of
the
DTR,
CTS
, and
CRX
monitoring
, and carries none
of
the
concurrency
restrictions
of
the
Concurrent
Mode.
Concurrent
Mode
1
/0
is
required
for
input
from the
RS-232-
C
compat
ible device and
is
required for
fu
ll-duplex (input and
output
at the same
time) operation.
Block
mode
output
is performed by simply
doing
normal BASIC PRINT
or
PUT
statements
to
the appropriate
SERIAL
INTERFACE
port
(after
opening
it,
of
course).
Your
output
characters
will
be placed in a 32-byte buffer and transmitted to the in-
terface
module
and then
to
your
RS-232-C
compatible
device. This
is
done
when:
• The buffer fills
up
• You close the chann
el
to the
RS-232
port
• A
CR
(decimal
13)
is
placed in the buffer
16
Progr
ammi
ng
th
e
Se
r
ia
l
Int
erface Ports

32-BYTE
BLOCKS
RS-232-C
COMPATIBLE
DEVICE
INTERFACE
MODULE
32-BYTE
BUFFER
PRINT
OR
PUT
Figur
e 4-7. Block
Output
Mode 110
On
occasion, you may
want
to
force the sending
of
the
information
in the buffer.
For example,
if
you have specified the
Append
LF
translate
option,
the
LF
will
be
sent at a different time, later than
the
CR.
You may
want
to
send the
LF
immediately
if the external device
is
a terminal.
As
another example,
if
you are using the DTR,
CTS,
or
CRX
monitoring
feature
to
avoid sending
more
characters
to
a device than
it can handle, you
ca
n use the
FORCE
SHORT BLOCK operation
to
send
your
characters
one
(or a few) at a time. That
way
you can ensure that the device
won
't
lose characters you send it because it became
not
ready in the
middle
of
an
output
block
.
The
FORCE
SHORT BLOCK operation
is
only
valid if you are using Block
Output
Mode.
If you are using
Concurrent
Mode
, you
cannot
use this
command.
If
you issue a
FORCE
SHORT BLOCK
command
when
the buffer
is
empty, no
action
will
be taken.
Doing
this
is
not
an
error
. Since you can alternate
output
to
two
SERIAL
INT
ERFACE
ports
when
using Block
Output
Mode
, you can also alter-
nate
FORCE
SHORT
(?LOCK
commands
from one
port
to
another
. The ports must
be opened
through
different IOCBs,
of
course. The BASIC
command
for
FORCE
SHORT BLOCK
is
listed in
Appendix
B.
Pr
og
r
amming
t
he
Serial
Int
erface
Po
r
ts
17
Other manuals for 850
1
Table of contents
Popular Control Unit manuals by other brands

ORTEA NEXT
ORTEA NEXT ICAR STR 4 NO instructions

Dakota Digital
Dakota Digital BIM-03-2 quick start guide

DSC
DSC Maxsys PC4937 installation manual

SOMFY
SOMFY CONTROL BOX 3S RTS installation instructions

Argo-Hytos
Argo-Hytos RPEX3-06 operating instructions

Dataq Instruments
Dataq Instruments DI-188 user manual