
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,port B,port C
Where: configuration n = port configuration per tables below.
port A = Digital I/O port A output data
port B = Digital I/O port B output data
port C = Digital I/O port C output data
Function: Configures digital I/O ports for inputs and outputs.
Mode: Command, Run
Use: CONFIG LINE 0,1,128
CONFIG LINE 100,3,255,0,240
Cards: All. Check line ranges for your card.
DESCRIPTION
Upon pow er up or reset, digital I/O port J3 (lines 100-123) are configured for inputs. Lines 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 card. Line number 0 is used to s pecify these lines. port C simply specifies which lines are high
and low.
The second digital group is specified as line 100 and determines the configuration for digital I/O port J3. An
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 programmed 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 inputs or a ll outputs.
The following table is used for the configuration 0 or 1 parameter. It determines which port, or part of a port,
is an input and output.
configuration 0 Lines 4-7 Lines 0-3 (Upper and lower Port C)
0 Output Output
1 Output Input
2 Input Output
3 Input Input
Komentáře k této Příručce