User`s manual

93
9
Digital Input/Output Boards
Introduction
This section has details on using digital I/O boards in conjunction with the CYDAS UDR Library. Boards
released after the printing of this manual will be described in Readme files on the CYDAS UDR Library disk.
Basic signed integers
When reading or writing ports that are 16-bits wide, be aware of the following issue using signed integers (as
you are forced to do when using Basic):
On some boards, for example the CPDISO 16/P, the
AUXPORT digital ports are set up as one 16-bit port. When
using
cbDOut() or DOut(), the digital values are written as a single 16-bit word. Using signed integers,
writing values above
0111 1111 1111 1111 (32767 decimal) can be confusing. The next increment,
1000 0000 0000 0000, has a decimal value of -32768. Using signed integers, this is the value that you would
use for turning on the MSB only. The value for all bits on is 1. Keep this in mind if you are using Basic,
since Basic does not supply unsigned integers (values from 0 to 65536).
To fully understand and maximize the performance of this and other digital input function calls, refer to the
82C55 data sheet in the Documents subdirectory of the installation. Also refer to the 8536 data sheet (this data
sheet file is not available in PDF format).