Instruction manual

Table Of Contents
Page
101
PC215E
6.6.10.3 Re-define Channel Width within a Digital I/O Chip - DIOsetChanWidth
Redefines the number of bits per DIO channel to be used in subsequent calls to the
DIOsetData and DIOgetData functions. The default channel width is 8-bits, and this can be
changed to 1, 4, 8, 12, 16, or 24. After calling this function, the chan argument in the
DIOsetData and DIOgetData functions refers to the group of bits of width
numBits
, starting at
Port A bit 0. Note that the three ports (A, B, C-upper and C-lower) must be setup correctly for
input or output accordingly by calling the DIOsetMode function for each.
i = DIOsetChanWidth (h, chip, numBits)
where
h Integer. Board handle as issued by function
registerBoard.
chip Integer. Address offset of the DIO chip. Use
one of the following pre-defined constants:-
PPIX = 0
PPIY = 8
PPIZ = 16
numBits Integer. Bit width to be used in subsequent
calls to functions DIOsetData, DIOgetData and
TCsetDCO. Valid widths are 1, 4, 8, 12, 16, or
24.
numBits
1
4
8
12
16
24
channels per chip
24
6
3
2
1
1
Returns Integer: OK
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoard
See Also DIOsetMode
DIOsetData
DIOgetData