EasyManua.ls Logo

Radio Shack TRS-80 Model 3 - Page 55

Radio Shack TRS-80 Model 3
276 pages
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...
If
the Computeris using the
Don't
Waitprocedure, then control will return to BASIC
even
if
no
characterwas received.
If
the Computer is using the Wait procedure,
control will return to
BASIC after a characteris received. Press
(BREAK)
to interrupt a
WAIT and regain keyboard control
of
the Computer.
4.
To
make this characteravailable to BASIC, execute a BASIC statement like:
A$ = CHR$(PEEK(16872))
which stores the string value in A$. Remember,
if
A$
= CHR$(O), then no
characterwas received.
5. Repeat Steps
3 and 4 until you are through receiving data.
To Changethe RS-232-C Characteristics
If
the TRS-80's defaultcharacteristics do not match the requirements
of
the other
device, youcan change some
or
all
of
themby using
('
'calling'
')
an initialization
subroutinethat is stored in
ROM.
Before calling $RSINIT, you must store the desired characteristics in certain RAM
locations:
Address
16888
16889
16890
Contents
Transmit/Receive BaudRate Code
Parity/WordLength/Stop Bit Code
Wait/Don't-WaitSwitch
Transmit/ReceiveBaudRate Code
TheTRS-80 RS-232-C allows you to receive and transmit at differentrates. For most
applications, the rates will need to be the same.
Instead
of
storing the actual baud rate, you store a codefor the value, taken from the
table below. You selectthe appropriate codes for send and receive rates, and then
"pack" theminto memory address
16888 as follows:
Send/Receive Code = (Send Code *16) +Receive Code
Forexample, suppose we want to send and receive at
110
baud. Using the table on
the next page, we find thatthe code for
110
baud
is
2. So:
Send/Receive Code =
(2
*16) +2 =
34
8/5

Related product manuals