Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual
Page 143

RPBASIC-52 PROGRAMMING GUIDE
2-124
CONFIG LINE
Syntax:
CONFIG LINE 0,configu ration 0,p ort C
CONFIG LINE 100,configu ration 1,p ort A,por t B,port C
Where: configuration n = p o rt c on f ig u ra t io n p er t ab l es b e lo w .
port A = Digital I/O p ort A output data
port B = Digital I/O p ort B output da ta
port C = Digital I/O p ort C output da ta
Function:
Configures digital I/O ports for inputs and outputs.
Mode:
Comm and, Run
Use:
CONFIG LINE 0,1,128
CONFIG LINE 100,3,255,0,240
Cards:
All. Check line ranges for your card.
D E S C R IP T I ON
Upon pow er up or reset, digital I/O po rt J3 (lines 100-123) are c onfigured for inputs. Lin es at P6 are
configured for inputs (L0-L3) and outputs (L4-7). Outputs L4 and L5 are low and L6 and L7 are high. The
status of these lines is changed using this command.
There are two digital I/O line number groups on the RPC-320. One group, 0-8, access lines at the terminal
strip on the ca rd. Line num ber 0 is u sed to s pecify these l ines. port C simply specifies which lines are high
a n d lo w .
T h e se c o nd d ig i ta l gr o up i s s p e ci f ie d a s l i ne 1 0 0 a n d de t er m i ne s th e c on f ig u ra t io n fo r di g it a l I / O p o rt J 3. A n
82C55 is used to interface the 24 digital I/O lines. The 82C55 consists of 3 ports organized as follows:
Port A
Eight lines that can be programm ed as all inputs or all outputs.
Port B
Eight lines that can be programm ed as all inputs or all outputs.
Port C
Eight lines which can be programmed in one group of eight lines or two groups of four lines
as all in puts or a ll outpu ts.
The following table is used for the configuration 0 or 1 paramete r. It determines w hich port, or part of a port,
is an input and ou tput.
configuration 0
Lines 4-7
L i n es 0 -3 ( U pp e r a n d lo w e r P o rt C )
0
Output
Output
1
Output
Input
2
Input
Output
3
Input
Input