Texas Instruments MSP430x1xx Computer Hardware User Manual


 
DAC12 Operation
19-4
DAC12
19.2 DAC12 Operation
The DAC12 module is configured with user software. The setup and operation
of the DAC12 is discussed in the following sections.
19.2.1 DAC12 Core
The DAC12 can be configured to operate in 8- or 12-bit mode using the
DAC12RES bit. The full-scale output is programmable to be 1x or 3x the
selected reference voltage via the DAC12IR bit. This feature allows the user
to control the dynamic range of the DAC12. The DAC12DF bit allows the user
to select between straight binary data and 2’s compliment data for the DAC.
When using straight binary data format, the formula for the output voltage is
given in Table 19−1.
Table 19−1.DAC12 Full-Scale Range (Vref = V
eREF+
or V
REF+
)
Resolution DAC12RES DAC12IR Output Voltage Formula
12 bit 0 0
Vout + Vref 3
DAC12_xDAT
4096
12 bit 0 1
Vout + Vref
DAC12_xDAT
4096
8 bit 1 0
Vout + Vref 3
DAC12_xDAT
256
8 bit 1 1
Vout + Vref
DAC12_xDAT
256
In 8-bit mode the maximum useable value for DAC12_xDAT is 0FFh and in
12-bit mode the maximum useable value for DAC12_xDAT is 0FFFh. Values
greater than these may be written to the register, but all leading bits are
ignored.
DAC12 Port Selection
The DAC12 outputs are multiplexed with the port P6 pins and ADC12 analog
inputs. When DAC12AMPx > 0, the DAC12 function is automatically selected
for the pin, regardless of the state of the associated P6SELx and P6DIRx bits.