Serial ports chapter 4, Serial port file numbers, Commands – Remote Processing RPC-2350 User Manual

Page 25

Advertising
background image

SERIAL PORTS

CHAPTER 4

4-6

The table below is the pin out for SPI port J11.

Pin No.

Description

1

Clock output to device

2

Serial data to external device

3

Serial data from external device

4

SPI 1 select (active low). Used for touch
screen select.

5

SPI 2 select (active low)

6

+ 5V supply

7

Ground

SPI Port connector type information
The SPI port connector header is a Molex-Waldom type.
Its part number is 22-23-2071. This is a 0.1" center,
0.025 post connector.

The m ating connec tor (ter minal hou sing) part n umber is
22-01-3077. Cr imp terminal part number s are 08-50-
0114 (tin plate) or 08-55-0102 (go ld). A low cost
crimping tool is 63811-1000. Parts and tools are
available from Digi-Key (800 344 4539 or
w w w . d ig ik e y. c o m )

Other housings and terminals are available (such as high
pressure). Refer to a Molex data book for more
information. A MP M T connectors (such as 87499-1)
can also be used. They fit, but ar e not polarized.

SERIAL PORT FILE NUMBERS

CAM BASIC refer ences the ser ial I/O ports by file
numbers. The following table lists the corresponding
file numbe r to ser ial I/O port and h ow they ar e used with
the various ports.

Description

File

Examples

C O M 1

1

PRINT "Hello"
PRINT #1," Hello"
INPUT 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. Some variations are not listed here. Refer
to the CAMBA SIC Programming Manual for more
information.

Command

Function

C L E AR C O M $

Clears serial input buffer

C O M $

Returns string from buffer

CONFIG BREAK

Prevents < ESC> from
stopping the program

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 or number
from port

LIST

Outputs program listing

O N C OM $

Calls subroutine on serial input

P R I N T

Outputs data in various fo rma ts

SPI

Serial I/O for exter nal IC’s

TAB

Tabs to predetermined positions

Advertising