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.

DAC80508: demo code for DAC80508

Part Number: DAC80508
Other Parts Discussed in Thread: DAC60504, , DAC80504
I would like to ask the question of using DAC80508. First, let me explain that we have been using DAC60504 originally, and all the controls are smooth and normal. 
Now the same project needs to be changed to DAC80508 (actually only need to use OUT0~OUT3), but there are problems in use, " Unable to read the device ID ".

Main control IC : STM32F411
Because the OUTX of the DAC80508 cannot be controlled, the DEVICE ID cannot be obtained by reading the DEVICE ID. So Need TI tech team to help me out for it.
The ID value read back is all 00 (the same FW setting can read the ID in DAC60504). 
I don't know if there is any special attention to it? Or is there a related demo code?




  • Hi Dgin-yi,

    We will get an answer to you when we are back in office on the 3rd.

    Thanks

    Paul

  • Hi,

    Can you share the SPI frame for the read command?

    Regards,

    AK

  • Dear sir

    for your reference as below

    please let me know if there are any mistakes on it.  thank's

  • Dear sir

    until this moment, I didn't get your response for it yet.

    Please have your support to let me know it.

    tks

  • Hi,

    I am not able to decipher the scope shots. This device supports SPI mode 1 ( Data sampled on the falling edge of SCLK). Please make sure that interface supports this mode. Also you can get the device header files from the below link.

    Read command requires 2 SPI frames. First frame requires the read command with register address and second frame dummy or any command. In the second  frame SDO will get updated with the requested DATA.

    https://e2e.ti.com/support/data-converters/f/data-converters-forum/966044/faq-dac80508-faq-are-there-source-code-or-header-file-examples-for-the-dac80508-family-of-devices

    Regards,

    AK

  • I am not able to decipher the scope shots. This device supports SPI mode 1 ( Data sampled on the falling edge of SCLK).

    Please make sure that interface supports this mode.

    The same MCU, the same SPI setting is WORK in the DAC60504  setting and code as below as 

    Is there any difference between the SPI interface of DAC60504 and DAC80508?

  • Hi,

    Both device supports SPI mode 1, so no issues.

    As a debug, Can you do the following sequence.

    1. Power up the device

    2. Check you are getting reference voltage

    3. Read contents of register 0x04, read value should be 0x0000

    4. Read contents of register 0x03, read value should be 0x0000

    5. Read contents of register 0x02, read value should be 0xFF00

    6. Read contents of register 0x05, read value should be 0x0000

    7.Now write register address 0x04 with 0x08FF (Ref DIV set to 2 and gain set to 2)

    8. Read back the same

    9.Write register address 0x02 with 0x0000

    10. Write DAC A data or all DAC channels (0x8 to 0xF ) with FFFF or 8000

    11. Check output voltage.

    Regards,

    AK

  •  Dear AK:

     

    I modified the FW according to the steps you instructed and the result is as follows

     

    1. Check you are getting reference voltage 

     

    As shown in the circuit diagram below, REF (because we only use OUT0~OUT3, because it replaces the original DAC80504)

     

    1. Read contents of register 0x04, read value should be 0x0000

     

    As shown in the figure below, READ BUF all zero, but I don't think it's really the content read back from reg 0x04, but there is no return, because my gpio is set to nopull, as shown in the figure below

     

    1. Read contents of register 0x03, read value should be 0x0000
    1. Read contents of register 0x02, read value should be 0xFF00

    1. Read contents of register 0x05, read value should be 0x0000

           

            7.Now write register address 0x04 with 0x08FF (Ref DIV set to 2 and gain set to 2) 

    8. Read back the same  Read buf = 0x0000 

    9.Write register address 0x02 with 0x0000 

    10. Write DAC A data or all DAC channels (0x8 to 0xF ) with FFFF or 8000

    11. Check output voltage.

    As shown in the figure below, our application is to use DAC OUT to control the brightness of the LED, 

    and now we can not use the DAC80508 to control the brightness of the LED (the original DAC 80504 can work)

    After completing the test according to the test steps, I feel that the DAC 80508 is not working properly. Is there any other way to clarify this problem?

  • Hi,

    Are you getting reference voltage at pin 1 after power up? if yes, what is the value you are measuring?

    Regards,

    AK

  • Hi AK,

     

     I measure  PIN1 is 2.5V.

  • Hi,

    If the reference voltage is 2.5V after power up, I believe chip is fine. Can you double check the version of the device you are using  is SDO/CLR ?

    Regards,

    AK

  • HI AK:

     

    The photo of the DAC used on our board is as follows

     

    858MCTI9AJP6J3

  • Hi,

    As I can see from the photo, its written as "858MC " Which means DEVICE DAC80508MCRTER Mid Scale with Clear function, no SDO. Which explains the behavior you are getting.

    The version you are using doesn't have SDO functionality. Please see the table below.

    Regards,

    AK

  • Dear AK:

     

    I set my MCU IO settings (from MISO to GPIO OUT) and set it to HI (measured as 3.3) before operating the DAC REGISTER and keep it at HI all the time, but still it doesn't work

     

    As shown below, I try to set the value of DAC1 (reg 0x09) to 0xAA 0XAA

    No matter what value I set for DAC0~3, the DAC OUT voltage I measure does not change (almost between 0.7~04mv) 

     The measurement points are as follows in the red circle

    Is there anything else I should confirm or make a mistake?

    Please have your advice for it.

    tks

  • Dear AK:

     

    I set my MCU IO settings (from MISO to GPIO OUT) and set it to HI (measured as 3.3) before operating the DAC REGISTER and keep it at HI all the time, but still it doesn't work

     

    As shown below, I try to set the value of DAC1 (reg 0x09) to 0xAA 0XAA

    No matter what value I set for DAC0~3, the DAC OUT voltage I measure does not change (almost between 0.7~04mv) 

     The measurement points are as follows in the red circle

    Is there anything else I should confirm or make a mistake?

    Please have your advice for it.

  • Hi,

    After power up, you need to send the following commands.

    1. Set REF_DIV bit to 1 and Gain bit = 1 ( basically divide by 2 ( reference) and Gain = 2

    0x04 with 0x08FF

    2. 0x02 with 0x0000

    3. Then send DAC_DATA. Make sure /CLR pin is held high ( for better pull up this pin to 3.3V). This pin status will be checked when the device powers up. Can you please provide a cope shot of the power up and /CLR pin?

    Regards,

    AK