6-2
Programming
Data Format
The 12-bit data is written to each DAC in two consecutive bytes. The first
byte contains the four LSBs (least significant bits) of data. The second
byte contains the eight MSBs (most significant bits) of data. The format
of this data is shown in Table 6-2.
The least significant byte is usually written first and is stored in an
intermediate DAC register, having no effect on the output. When the most
significant byte is written, its data is added to the stored data from the
least significant byte and presented
broadside
to the DAC, thus assuring a
single-step update. This process is known as double-buffering.
For 8-bit operation, first write zero to the low byte, then perform all
further operations with the high byte only.
Assembly language programmers should note that if data is left-justified,
16-bit output operations can be used (for example, OUT, DX, AX), as the
data sequence is conventional Intel low/high byte.
Table 6-2. DAC Data Format
Address
D7
D6
D5
D4
D3
D2
D1
D0
Low byte (Base
Address
+Even)
B9
(LSB)
B10
(LSB)
B11
(LSB)
B12
(LSB)
x
1
Notes
1
x = value irrelevant
x
x
x
High byte
(Base Address
+Odd)
B1
(MSB)
B2
(MSB)
B3
(MSB)
B4
(MSB)
B5
(MSB)
B6
(MSB)
B7
(MSB)
B8
(MSB)
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com