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.

  • Resolved

DAC60004: Issue with DAC60004

Prodigy 110 points

Replies: 8

Views: 633

Part Number: DAC60004

Hallo everybody,

my problem is, i can't connect my DAC4006 with a Arduino Micro over SPI. I have tried to change the output voltage with the code i found here .    

In the picture below you can see my measurements of the clock(yellow), MOSI(blue) and MISO(purple). In this picture i was trying to read out the status register of the DAC60004. Since the Arduino can only send 1 byte SPI information, i am sending 4 bytes one after another, thats why you can see the pauses between the clock-cycles. I was sending the 4 bytes/32 bit (0x1D,0x00,0x00,0x00) to be able to read the status register, followed by 4 dummy bytes to read in the answer of the chip. (In the picture you can only see the first 5 bytes).  Note that the MISO line looks very sketchy and is at only about 2 Volts instead of 5V.

 

My questions:

Does this chip need a continuous clock signal for the whole 4 bytes?

Should MISO look like this?

Is my schematic wrong?

2021.Schematic.pdf

  • Hi Samuel,

    Welcome to E2E and thank you for your query. I have two questions before we can debug the issue further:

    1. How is the CS waveform?
    2. have you enabled SDO?

    Regards,
    Uttam Sahu
    Applications Engineer, Precision DACs
  • In reply to Uttam Sahu:

    Hello,
    first of all thanks for the quick reply.

    1. I can not send you a picture right now, but the chip select(CS) is low during the whole transmission of the 8 byte.

    2. I did try to enable SDO with the following Byte sequence: 0x08, 0x00, 0x00, 0x02, but i did not get a reasonable answer out of it. Once i enable SDO, and the chip is not power cycled, will SDO stay enabled?
  • In reply to Samuel Harder:

    Hi Samuel,

    I am assuming the 8-byte chip select is a typo because it should be 4 bytes without any toggling in between. If you could upload a zoomed-in scope shot that captures the SCLK transition and SDI, it will help us understand the SPI mode.

    Another question is that - is the SDO being shared by some other device?

    Regards,
    Uttam
  • In reply to Uttam Sahu:

    Hello Uttam,

    no 8-byte was not a typo, i was sending the 4 byte register followed by 4 dummy bytes to read out the answer, without toggling CS in between. Here are two scope shots. In the left one i was monitoring a 1-byte sequence of the first byte,which was 0x03. On the right side is the transition between the first and the second byte. 

    Yellow - SCLK
    Purple - MOSI
    Light Blue - MISO (2V/Division)
    Blue - CS (2V/Division)

    As you can see there is a lot of noise on the CS line, whenever the clock is active. I can also measure this noise between the GND of my Arduino and the GND of my own PCB.

    Yes SDO is shared with an ADC. The ADC is powered up, however the CS line of the ADC is tied high.

  • In reply to Samuel Harder:

    Update:

    I reduced the frequency of the SPI signal to 125kHz to get rid of the noise and to get a much cleaner continuous signal.

    Sadly I am still not getting anything on my outputs.

    I am sending 0x03,0x07,0xD0,0x00, to set a output voltage on channel A.

  • In reply to Samuel Harder:

    Hi Samuel,

    You can update the following 2 points and check again:
    1. Use CS for 4 bytes only. If you use more than that the data will shift out of the register. For read, use another NOP command as shown in Fig 54. Do not use a continuous CS
    2. The SDIN is sampled at the falling edge of SCLK (CPHA = 1). Your waveform shows that it is happening at rising edge. Please correct it

    Hope that will fix your issue.

    Regards,
    Uttam
  • In reply to Uttam Sahu:

    Hello Uttam,

    it works now :)

    I had to change the SPI Mode to CPHA=1 and now it works fine.

    Thank you very much for your help.

    Greetings,
    Samuel
  • In reply to Samuel Harder:

    Thanks for the confirmation.

    Regards,
    Uttam

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.