Remote-processing RPC-150 Manuale Utente Pagina 13

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 26
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 12
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 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 references 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 commands used
for serial I/O. Variations for many commands not listed
here. These commands and functions are ex plained in
the CAMBA SIC Programming Manual.
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-150 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
J1 and J4 connector pin out.
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
Vedere la pagina 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 25 26

Commenti su questo manuale

Nessun commento