Chapter 4 serial ports, Serial port file numbers, Commands – Remote Processing RPC-150 User Manual
Page 13: Serial cable pin out

CHAPTER 4
SERIAL PORTS
RPC-150
Page 11
In this mode, you have access to the full 256 bytes.
If you don' t read the b uffer an d the buffer fills, all
subsequent characters are discarded. INKEY$(n)
m a y be u se d an y w he r e in th e pr o g ra m .
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 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 por t and how
they are used w ith the various ports.
Description File
Examples
C O M 1
1
PRINT "Hello"
PRINT #1," Hello"
INPUT A$
INPUT #1,A$
A$ = INKEY$(1)
C O M 2
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 CAM BASIC commands used
for serial I/O. Var iations for many commands not listed
here. These co mma nds and func tions are ex plained in
the CAMBA SIC Programming Manual .
Comm and
Function
C L E AR C O M $
Clears serial input buffer
C O M $
Returns string from buffer
C O N F I G BA U D
Sets serial port parameters
C O N F IG C O M $
Configures port for ON
COM $(n) interrupt
INKEY$
Returns a character fr om the
serial buffer
I N P U T
Receives string from port
LIST
Outputs program listing
O N C OM $
Calls subroutine on serial
input
P R I N T
Outputs data in various
form ats
TAB
Tabs to predetermined
positions
SERIAL CABLE PIN OUT
The following is the pin out between the IDC connector
for the SBS-150 and the DB-9 connector to the PC or
term inal.
I D C
DB-9
Description
1
4
D C D
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
J1 and J4 conn ector pin o ut.
Pin
J1
J4
Direction
1
n / c
n / c
2
RXD
RXD
Input
3
TXD
TXD
Output
4
n / c
n / c
5
Gnd
Gnd
6
n / c
n / c
7
n / c
CTS
Output
8
n / c
RTS
Input
9
+ 5V
+ 5V
source
10
n / c
n / c