Programming – Measurement Computing CIO-DAC04/12 User Manual
Page 9

4. PROGRAMMING
There are three common approaches to programming the CIO-DAC04/12-HS board. They are:
O
Writing custom software utilizing our Universal Library package,
O
Using a fully integrated software package (e.g. Labtech Notebook), or
O
Direct register-level programming.
4.1 CUSTOM SOFTWARE UTILIZING THE UNIVERSAL LIBRARY
Most customers write custom software using Universal Library™. The Universal Library takes care of all the board I/O commands and
lets you concentrate on the application part of the software. For additional information regarding using the Universal Library, please
refer to the documentation supplied with the Universal Library.
4.2 FULLY INTEGRATED SOFTWARE PACKAGES (e.g., HP VEE)
Many customers also take advantage of the power and simplicity offered by one of the upper level data acquisition packages. Please
refer to the package’s documentation for setup and usage details.
4.3 DIRECT REGISTER LEVEL PROGRAMMING
Though uncommon, some applications do not allow the use of our Universal Library, and are not a good match for an upper level
package. For experienced programmers we provide detailed register mapping below.
InstaCal is a complete installation, calibration and test package. Use it to guide the installation procedure and to calibrate your data
acquisition board. InstaCal also creates a configuration file required for programmers who use the Universal Library programming
libraries.
REGISTER LEVEL PROGRAMMING INFORMATION
We recommend that users make use of our Universal Library programming interface. The following section is provided for those
experienced programmers who do not wish to take advantage of the control programs already built into the Universal Library.
Single Output:
1.
Clear the START bit.
2.
Select channel.
3.
Disable and reset interrupts.
4.
Clear FIFO.
5.
Write MSB to Base + 1, then LSB to Base + 0. DAC updates upon writing to Base + 0.
1023 samples or less:
(No interrupt necessary).
1.
Stop pacer by setting 8254 to mode 2.
2.
Clear FIFO.
3.
Disable and reset interrupts.
4.
Set channel limits.
5.
Set START bit to hold off pacer.
6.
Initialize the 8254.
7.
Load FIFO with new data.
-5-