Instruction manual
AMPDIO DRIVERS
Page 174
ERRCHAN
Prior Calls registerBoardEx
See Also DIOsetMode
6.4.11.4 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. For a channel width of 12, port C-Upper forms the upper 4 bits of channel 0 and
port C-Lower forms the upper 4 bits of channel 1. Note that the three ports (A, B, C-Upper and
C-Lower) must be set up correctly for input or output accordingly by calling the DIOsetMode
function for each.
i = DIOsetChanWidth (h, chip, numBits)
where h short: board handle as issued by the
registerBoardEx function.
chip short: address offset of the DIO chip. One of
the following pre-defined constants may be
used:
PPIX = 0
PPIY = 8
PPIZ = 16
numBits short: 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 channels per chip
1 24
4 6
8 3
12 2
16 1
24 1
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoardEx
See Also DIOsetMode
DIOsetData
DIOgetData