Instruction manual

Table Of Contents
PC215E Page 104
6.6.11 Switch Scanner Matrix Functions
6.6.11.1 Setup a Switch Scanner Matrix - DIOsetSwitchMatrix
Sets up one, two or three 82C55 DIO chips as a switch matrix scanning device. The order of
the matrix specified can be 12 (for a 12 X 12 matrix scanning 144 switches, using PPIX), 24
(for a 24 X 24 matrix scanning 576 switches, using PPIX and PPIY), or 36 (for a 36 X 36 matrix
scanning 1296 switches, using PPIX, PPIY and PPIZ). Group A (ports A and C-upper) are set
for output, to send test patterns to the matrix, and group B (port B and C-lower) are set for input
to read the switch status information back in. The user must ensure that the switch array is
wired correctly with suitable diodes and resistors, otherwise the board could get damaged.
See section 4.2.11 for details. Only one switch matrix implementation is available per board.
i = DIOsetSwitchMatrix (h, order)
where
h Integer. Board handle as issued by function
registerBoard.
order Integer. Order of the matrix (12, 24 or 36)
Returns Integer:
OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoard
See Also DIOgetSwitchStatus
DIOfreeSwitchMatrix