beautypg.com

Measurement Computing CIO-DAS08/JR/16 User Manual

Page 9

background image

BASE ADDRESS + 1

A/D7

A/D6

A/D5

A/D4

A/D3

A/D2

A/D1

POL/OVR

MSB

0

1

2

3

4

5

6

7

READ: The most significant A/D byte is read.

WRITE: Any write to this register causes an immediate A/D conversion.
A note of caution: Read EOC between consecutive A/D conversions to avoid over-running the A/D converter.

POL/OVR: The POL/OVR bit indicates the polarity of the signal, and may be used to detect an overrange signal, and determine the
value of that signal up to 192 counts over full scale.

To understand the operation of this bit, lets examine the process of making an A/D conversion.

1. To initiate a conversion, a write operation is performed on Base +1. The value of the data written does not matter. It is the toggling
of the chip select line and the write signal that cause the conversion to start.

2. The End Of Conversion (EOC) bit must be monitored (bit 7, Base +2). To monitor this bit, read Base +2. Mask all but bit 7, and
test for true (1) or false (0). While the bit is true, conversion is in progress. When it goes false the conversion is complete.

3. To read the converted signal value, read the LSB from Base +0 and the MSB from Base +1. The first time Base +1 is read, bit 7
will contain the polarity of the signal; true (1) for positive and false (0) for negative.

4. To check for an overrange condition, read Base +1 a second time. If bit 7 is true (1), the signal exceeds the full scale of the input. If
false (0), the signal is within the range of the converter.

6.3 STATUS AND CONTROL REGISTER

BASE ADDRESS + 2

This address has two registers, one for reading and one for writing.

READ = STATUS

ChAdd0

ChAdd1

ChAdd2

X

X

X

X

EOC

0

1

2

3

4

5

6

7

EOC = 1 the A/D is busy converting and data should not be read.

EOC = 0 the A/D is not busy and data can be read.

ChAdd 2 to ChAdd 0 is the current analog input multiplexer channel. The current channel is a binary-coded number between 0 and 7.

WRITE = CONTROL

ChAdd0

ChAdd1

ChAdd2

X

X

X

X

EOC

0

1

2

3

4

5

6

ChAdd 2 to ChAdd 0. Set the current channel address by writing a binary-coded number between 0 and 7 to these three bits.

5