Chapter 6: Software; Visualbasic™ Utility Driver - ICS Advent AOB8/16 Product Manual

Table of Contents

Advertisement

Chapter 6: Software

The AOBx/16 cards are straightforward to program. The following example is in BASIC, but for
languages such as C or Pascal the procedure is simplified by their support of two-byte output
operations:
To output an analog value with 16-bit resolution, a corresponding decimal number N between
0 and 65536 is calculated (2^16 = 65536).
N/65536 = V(out)/V(full scale)
Then the number is split between high and low bytes, as follows:
H% = INT (N / 256)
L% = N - (H% * 256)
Next the data are written to the selected analog output channel. (See the preceding I/O Address
Map.) In this example, we will assume analog output on channel zero (AO 0).
OUT (BASE + 0), L%
OUT (BASE + 1), H%
For simplicity, it was assumed that the simultaneous-update capability was not used.
Examples of this routine are found on the sample disk along with examples in other languages.
VisualBASIC™ Utility Driver
Extensions to the Standard Edition VisualBASIC language are provided on the diskette provided
with your card. The extensions are in a directory named VBACCES. These extensions are in the
form of a .DLL, a .GBL, and a VisualBASIC sample. Together these files allow you to access the
port and main memory space in a fashion similar to BASIC, QuickBASIC, Pascal, C/C
bly, and most other standard languages.
Manual Number: 00650-010-6
++
, Assem-
Page 13

Advertisement

Table of Contents
loading

This manual is also suitable for:

Aob16/16

Table of Contents