EasyManua.ls Logo

Commodore Plus 4 - Page 218

Commodore Plus 4
234 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SECTION
13
Introduction
RS-232
Interface
Opening
The
RS-232
Channel
Your
Commodore
Plus/4
has
a
built
in
RS-232
interface
for
connection
to
any
RS232
modem,
printer,
or
other
device.
To
connect
a
device
to
your
Plus/4
requires
a
cable
and
some
additional
programming.
The
Commodore
modem
connects
directly.
RS-232
on
the
Plus/4
is
standard
RS-232
format,
bat the
voltages
are
TTL
levels
(0 to
5V)
rather
than
the
normal
RS-232
-12
to
12
volt
range.
The
cable
between
the
Commodore
Plus/4
and
the
RS-232
device
should
accommodate
the
necessary
voltage
conversions.
(The
Com
modore
RS-232
interface
cartridge
handles
this
properly.)
The
RS-232
interface
software
can
be
accessed
from
BASIC
or
from
the
KERNAL
for
machine
language programming.
This
section
ad-
dresses
the
use
of
RS-232
from
BASIC.
For
more
detailed
information,
and
for
use
from
machine
language,
consult
the
Commodore
Pius<'4
Programmers
Reference
Guide.
RS-232
from
BASIC
level
uses
the
normal
BASIC
commands:
OPEN,
CLOSE,
CMD,
INPUT#.
GET#,
PRINT#,
and
the
reserved
variable
ST.
INPUT#
and
GET#
recall
data from
the
receiving
buffer,
while
PRINT#
and
CMD
place
data
into
the
transmitter.
Only
one
RS-232
channel
should
be
open
at
any
time;
a
second
OPEN
statement
causes
the
receive
buffer
pointer
to
be
reset,
causing
any
characters
in
the
buffer
to
be
lost.
Up
to
4
characters
may
be
sent
in
the
filename
field.
The
first
two
are
control
and
command
register
characters;
the
other
two
are
reserved
for
future
system
options.
Baud
rate,
parity,
and
other
options
can
be
selected
through
this
feature.
Basic
Syntax:
OPEN
if.
2,0,<"
>control
register
command
register<">
EXAMPLE:
OPEN
2,2,0,
CHR$(5)+
CHR$(15)
/f—Normal
logical
file
id.
(1
-255).
If If
>
127,
then
linefeed
follows
carriage
return.
control
register—Single
byte
character
(see
Figure
1)
(required
to
specify
baud
rate)
command
register—Single
byte
character
(see
Figure
2)
209

Other manuals for Commodore Plus 4

Related product manuals