This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DAC63204-Q1: PWM Output Control

Part Number: DAC63204-Q1

Tool/software:

Hello,

I am using the DAC63204-Q1 in another application where I want to drive the outputs as PWMs.  I'd like to be able to set the PWM duty cycle and frequency for the outputs.

I have set up my circuit as follows:

- OUT0 = PWM output #1

- OUT1 shorted to FB0 and FB1

- OUT2 = PWM output #2

- OUT3 shorted to FB2 and FB3

The reference voltage should be set to VDD supply.

Can you please advise how to configure the DAC so that I can control the outputs as PWMs?  

Thank you and best regards.

  • Hi Jessica, 

    Generic commands:

    Power on all channels in voltage mode: 0x0249

    Set the gain and reference for each channel in the DAC-X-VOUT-CMP-CONFIG register. 0x0400 for VDD reference. 

    OUT1 and OUT3 are the PWM output channels per your configuration and should be configured in the same way: 

    Configure the function generator settings for both channels. Waveform settings should be set to triangular or sawtooth. Code-step and slew-rate should be set to achieve the desired frequency. 

    The margin high and margin low registers should be set to achieve the desired frequency: 

    If you choose triangle mode the frequency calculation is: 

    And sawtooth is:

    Start the PWM output in the COMMON-DAC-TRIG register. To update the frequency, you will have to stop the PWM in this register by writing a 0 to each bit, and then restart in by writing a 1 to each trigger bit. 

    OUT0 and OUT2 will be used to control the duty cycle. Use the DAC-X-DATA registers to set the output voltage of these channels: 

    The duty cycle is calculated with the margin high and low codes of the PWM output channel, and the dac data code of the voltage output channel connected to the FB pin of the PWM channel (VFB in this equation):

     

    Best,

    Katlynne Jones

  • Thank you very much!  This is exactly the information I needed.