Post Go back to editing

AD5732 not responding

I'm working on making this thing work for the last couple of days but nothing helps. I double and triple checked the electrical connections and I am 100% positive they are OK.

 

My host MCU is an Atmel 8bit.

 

My send "word" function looks like so:

 

CS_LOW

spi_send_byte(data1);

spi_send_byte(data2);

spi_send_byte(data3);

CS_HIGH

LDAC_LOW

_delay_ms(1);

LDAC_HIGH

CS_HIGH

 

CS is typed to the SYNC pin, LDAC -> LDAC.

 

Following data words were sent (in this order):

dac_send_word(0b00001100,0b00000000,0b00000101); -- set range

dac_send_word(0b00010000,0b00000000,0b00010101); -- power control

dac_send_word(0b00000100,0b11111111,0b11111110); -- dac register

dac_send_word(0b00011101,0b00000000,0b00000000); -- control register


If someone can find a fundamental flaw in this I would like to hear! Thanks!

  • Hi t.stern,

    I am not an expert at programming, so I cannot help much with the code.

    Just a quick comment: Do you bring SYNC low before you start writting to the part to set the range,,..?

    From your code, it seems like you maintain SYNC high, or it could be a typo here:

    LDAC_LOW

    _delay_ms(1);

    LDAC_HIGH

    CS_HIGH

    CS is typed to the SYNC pin, LDAC -> LDAC.

    Following data words were sent (in this order):

    dac_send_word(0b00001100,0b00000000,0b00000101); -- set range

    dac_send_word(0b00010000,0b00000000,0b00010101); -- power control

    Do you have a timing plot that shows how the data is sent to the part?

    Regards,

    Estibaliz

  • The actual sequence is as follows:

    CS_LOW

    spi_send_byte(data1);

    spi_send_byte(data2);

    spi_send_byte(data3);

    CS_HIGH

    LDAC_LOW

    _delay_ms(1);

    LDAC_HIGH

    CS_HIGH

    So SYNC is brought low (CS_LOW macro) before sending 3 x byte commands via spi_send_byte(). After these are sent (finished), SYNC is brought up (CS_HIGH macro). After that LDAC is pulled low (LDAC_LOW macro), after a short delay LDAC is brought up high again. The last CS_HIGH is a mistake in the code, however does not do anything as the pin is already high.

    To get a real timing diagram I would need to wire the rig to my logic analyzer. I might get around doing so but it will take a while.

  • This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin