
CHAPTER 4 SERIAL PORTS
RPC-2300 Page 11
In this mode, you have access to the full 256 bytes.
If you don' t read the buffer and the buffer fills, all
subsequent characters are discarded. INKEY$(n)
may be used anywhere in the program.
3. COM$(n) retrieves all characters in the buffer,
including < cr> ' s and other control co des. This
function is commonly used with ON COM$
multitasking statement. You can retrieve 128 of the
256 bytes in the serial buffer at one time.
SERIAL PORT FILE NUMBERS
CAM BASIC II refer ences the ser ial I/O ports by file
numbers, similar to DOS. The following table shows
the corresponding file number to serial I/O port and how
they are used with the various ports.
Description File Examples
COM1 1 PRINT "Hello"
PRINT #1," Hello"
INPUT A$
INPUT #1,A$
A$ = INKEY$(1)
COM2 2 PRINT #2," Hello"
INPUT #2,A$
A$ = INKEY$(2)
COM1 is J1, the console port. COM2 is J4, the primary
port.
COMMANDS
The following is a list of CAMBASIC II commands used
for serial I/O. Variations for many commands not listed
here. These commands and functions are ex plained in
the CAM BASIC II Program ming M anual.
Command Function
CLEAR COM$ Clears serial input buffer
COM$ Returns string from buffer
CONFIG BAUD Sets serial port parameters
CONFIG COM$ Configures port for ON
COM $(n) interrupt
INKEY$ Returns a character from the
serial buffer
INPUT Receives string from port
LIST Outputs program listing
ON COM$ Calls subroutine on serial
input
PRINT Outputs data in various
formats
TAB Tabs to predetermined
positions
SERIAL CABLE PIN OUT
The following is the pin out between the IDC connector
for the SBS-2300 and the DB-9 connector to the PC or
terminal.
IDC DB-9 Description
1 4 DCD
2 3 RXD
3 2 TXD
4 1 DTR
5 5 Ground
6 n/c DSR
7 8 CTS out
8 7 RTS in
9 n/c +5 V
10 n/c RI
Not all pins/functions on the VTC-10 are used by the
SBS-2300. See Technical Information for specific J1
and J4 pin outs.
Komentarze do niniejszej Instrukcji