ZHCSRA2 December 2022 DAC53204W , DAC63204W
PRODUCTION DATA
VSET is controlled by the DACx3204W to adjust the current output. RSET sets the output range of the current source. Choose a small VSET so that the power dissipation across RSET is minimum. Equation 9 calculates RSET.
A 0.6-V max VSET is used in this example. Equation 10 shows that RSET is calculated to be 3 Ω. Choose an RSET with a power rating of at least 120 mW.
Equation 11 shows how to calculate the DAC code for a given output voltage, reference, and gain setting.
Equation 12 calculates the DAC code for an output voltage, VSET, of 0.6V, the internal 1.21-V reference, and the 1.5 × gain setting.
The GPIO pin can be configured as an input to trigger the DACx3x04W output to turn on and off, which turns the current source on and off. Configure the GPIO in the GPIO-CONFIG register. The GPI-EN bit enables the GPIO pin as an input. The GPI-CH-SEL field selects which channels are controlled by the GPI. The GPI-CONFIG field selects the GPI function. 表 7-18 defines the functions for the GPI-CONFIG field. Choose the trigger margin-high or margin-low function if programmable slew is needed, or VOUT power up or down if programmable slew is not needed.
The programmable slew is configured by the CODE-STEP and SLEW-RATE fields in the DAC-X-FUNC-CONFIG Register. The programmable slew is only available when toggling between two values stored in the DAC-X-MARGIN-HIGH and DAC-X-MARGIN-LOW Registers. Section 7.4.5.1.2 discusses how to set the programmable slew. This application example uses a SLEW-RATE of 8 µV/s and a CODE-STEP of 8-LSB to achieve a 1.36-ms slew time.
The pseudo code for this application example is as follows:
//SYNTAX: WRITE <REGISTER NAME (Hex code)>, <MSB DATA>, <LSB DATA>
//Set gain setting to 1.5x internal reference (1.8 V) (repeat for all channels)
WRITE DAC-0-VOUT-CMP-CONFIG(0x3), 0x08, 0x00
//Power-up voltage output on all channels and enable the internal reference
WRITE COMMON-CONFIG(0x1F),0x12, 0x49
//Configure GPI for Margin-High, Low trigger for all channels
WRITE GPIO-CONFIG(0x24), 0x01, 0xF5
//Set slew rate and code step (repeat for all channels)
//CODE_STEP: 8 LSB, SLEW_RATE: 8 µs/step
WRITE DAC-0-FUNC-CONFIG(0x06), 0x00, 0x52
//Write DAC margin high code (repeat for all channels)
//For a 1.8-V output range, the 12-bit hex code for 0.6 V is 0x54A. With 16-bit left alignment,
this becomes 0x54A0
WRITE DAC-0-MARGIN-HIGH(0x01), 0x54, 0xA0
//Write DAC margin low code (repeat for all channels)
//The 12-bit hex code for 0 V is 0x000. With 16-bit left alignment, this
becomes 0x0000
WRITE DAC-0-MARGIN-LOW(0x02), 0x00, 0x00
//Save settings to NVM
WRITE COMMON-TRIGGER(0x20), 0x00, 0x02