I am trying to use the output gain on a MSP430F5336 DAC and it isn't working. With all the settings, I am only getting a 1x gain instead of the 2x and 3x gains advertised in the users guide.
On page 792 of the SLAU208K MSP430x5xx and MSP430x6xx Family Users Guide, it has the following (with formatting errors caused by the cut and paste):
30.2.1 DAC12_A Core
The DAC12_A can be configured to operate in 8-bit or 12-bit mode using the DAC12RES bit. The full-scale
output is programmable to be 1x, 2x, or 3x the selected reference voltage via the DAC12IR and
DAC12OG bits. This feature allows the user to control the dynamic range of the DAC. The DAC12DF bit
allows the user to select between straight binary data and 2's complement data for the DAC. When using
straight binary data format, the formula for the output voltage is given in Table 30-1.
Table 30-1. DAC Full-Scale Range (Vref = VeREF+ or VREF+)
Resolution DAC12RES DAC12OG DAC12IR Output Voltage Formula
12 bit 0 0 0 Vout = Vref × 3 × (DAC12_xDAT/4096)
12 bit 0 1 0 Vout = Vref × 2 x (DAC12_xDAT/4096)
12 bit 0 x 1 Vout = Vref × (DAC12_xDAT/4096)
8 bit 1 0 0 Vout = Vref × 3 × (DAC12_xDAT/256)
8 bit 1 1 0 Vout = Vref × 2 × (DAC12_xDAT/256)
8 bit 1 x 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.
As far as I understand it, I should be able to use the internal reference block and be able to bump it by 2x or 3x to get higher reference voltages. I am wanting a 3.0 V reference and thought I could get it by setting the reference module to output 1.5V and use the 2nd entry in the table (DAC12RES=0; DAC12OG=1; DAC12IR=0) to double it to 3.0V. I am only getting 1.5V out regardless of the gain settings (with maximum settings of 4095 for the DAC12_DAT register).
In my application, AVcc is 3.3V so there is plenty of headroom for the output to reach 3.0V. I am using the 12 bit resolution setting. I also have the DAC12SREFx set to 0 to select the VREF+ reference.
Am I misunderstanding the users guide? Is there something else I need to do to get 3.0V out?
Thanks,
Brent