Programmingthe RS-232
..
C Interface
In
this section, we will treat the RS-232-C
just
like any otherinput/output device, and
will explain how your
BASIC program can use it. In Technical Information, we
explainhow to use it in a machine-language
(IZ-80") program.
For details about the
RS-232-C signal conventions and theory
of
operation, see the
Appendix.
Selectingthe RS-232-C Characteristics
Beforeusing the RS-232-C interface to communicate with another device, you must
be sure your
RS-232-C is setup to match the requirements
ofthe
other device.
So startby getting the following information about the other device. In the right
column, we list typical values used.
Characteristic
BaudRate
TypicalValues Used
110,150,300,600,1200,
2400,4800,9600
WordLength (bits)
Parity
Stop Bits
5,6,7,8
Even, Odd, None
1,2
When you startthe Computer, the RS-232-C is initialized to the following" default
characteristics',:
None
300
8
BaudRate
WordLength (bits)
Parity
StopBits
In
addition, the RS-232-C is initialized to wait for completion
of
characterI/O before
returning. Thatis,
if
you attempt to receive a character, the Computerwill wait
until a characteris received; it will neverreturn to you without a character.
Similarly,
if
you attempt to senda character, the Computerwill waituntil the
receiving device is able to accept the character.
Toregain control
of
the Computerduring a wait, hold
(BREAK)
until READY returns.
8/3