beautypg.com

6 register architecture – Measurement Computing CIO-DAS160x/1x User Manual

Page 23

background image

6 REGISTER ARCHITECTURE

There are three common approaches to generating software for the CIO-DAS1600. These are:

1. Writing custom software utilizing our Universal Library package
2. Using a fully integrated software package (e.g. Softwire)
3. Direct register level programming.

CUSTOM SOFTWARE UTILIZING THE UNIVERSAL LIBRARY
Most users write custom software using our 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

FULLY INTEGRATED SOFTWARE PACKAGES (e.g. Softwire)
Many users 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.

DIRECT REGISTER LEVEL PROGRAMMING
Although uncommon, some applications do not allow the use of our Universal Library, and are not a
good match for an upper level package. For these situations, detailed register mapping follows. This
chapter is intended for experienced programmers only.

6.1

CONTROL & DATA REGISTERS

The CIO-DAS1600 is controlled and monitored by writing to and reading from 24 distinct I/O addresses.
The first address is referred to as the BASE ADDRESS (BADR) and is set by a bank of switches on the
board. All other addresses are located at the BASE ADDRESS plus a specified offset. In particular, the
main analog I/O functions are controlled by the I/O addressees from BADR to BADR +15h and BADR
+404h through BADR +407h. The additional 82C55 based digital I/O uses four consecutive I/O
addresses at BASE ADDRESS + 400h (the -P5 versions do not include this 82C55).

Registers are easy to read from and write to, though to create a complete data acquisition software
program at the register level is a significant undertaking. Unless there is a specific reason that you need
to write your program at the register lever, we highly recommend the use of our Universal Library.

The method of programming required to set/read bits from bytes is beyond the scope of this manual. It
will be covered in most Introduction To Programming books, available from a book store. The remainder
of this chapter is included for those experienced programmers who wish to write their own register level
programs.

In summary form, the registers and their functions are listed on Table 6-1 following. Within each
register are eight bits which may constitute a byte of data or be eight individual bit set/read functions.

19