Digital Input/Output in OS/2

Written by Stefan Zollner

Setting or reading TTL levels (throwing or reading switches) is fairly simple, if it does not need to be too fast. We use two ways to set/read TTL levels:

(i) The CIO-DAS16/M1 board from ComputerBoards has 4 bits to read and 4 bits to write.

(ii) The AT6400 indexer card (stepper motor controller from Parker Compumotor) has a number of bits that can be set or read. Using these boards, you simply need to know the port address and what to read/write. Then, you can use the OUTP* or INP* functions in ioad.dll.

There are also some special boards which can only parallel I/O, but we are not using any of these.

Digital Input/Output:

 * See analog/digital conversion (Fast (500 kHz) analog-to-digital conversion in OS/2 using the CIO-DAS16/M1).
 * See stepper motor control using AT6400 (coming soon).

DISCLAIMER: This sample code is for your information only. Do not attempt to use this code on your equipment without first inspecting the source code and making sure it does what you want. This code is supplied as is without warranty or liability of any kind. Most of the brand names on this page are registered trademarks. The authors have no connection with Computerboards, IBM, or other computer companies.