Instruction manual

AMPDIO DRIVERS
Page 172
6.4.11 Digital Input/Output Functions
6.4.11.1 Test if Digital I/O Chip is Free DIOisAvailable
Checks if a particular Digital I/O (DIO) chip is available on a board. A DIO chip may not be
available for one of two reasons:
1. the DIO chip is not provided by the board specified, or
2. the DIO chip is being used by some other function.
i = DIOisAvailable (h, chip)
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
Returns short: 0 = DIO Chip NOT Available, 1 = Available
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
See Also
6.4.11.2 Configure a Digital I/O Port for Input or Output DIOsetMode
Sets up a digital I/O port for basic input or output.
Note that all output ports on the chip will be set to logic level 0, including those not directly
configured by the function call. This is a feature of the 82C55 chip.
i = DIOsetMode (h, chip, port, isInput)
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
port short: DIO port within the chip. Port C is split
into two 4-bit nibbles, which can be
programmed independently. One of the
following pre-defined constants may be used:
PORTA = 0