Post Go back to editing

AD5593r DAC Configuration and Value Setting

Product Number: AD5593

I have a few issues regarding to AD5593 DAC, for which I need clarification.

First, for DAC pin configuration, pointer byte is: 0000 0101, followed by 0000 0000 and 0000 0001, if I want IO1 as DAC pin. This is clear, isn't it?

For DAC write operation, pointer byte is: D7~D4: 0001 (DAC Write), D3:0, D2~D0: 001 (IO1 pin). For data MSB, D15: 1, D14~D12 (001), the DAC address appears again. Is it correct?

My second question is regarding to ADC conversion, which is illustrated quite clearly in Figure 40.

My question is: if REP bit is not set, and my I2C function tries to read 6 or 8 bytes, are the values from byte 5 to 8 all 0?



Moved to correct forum and added product number tag.
[edited by: emassa at 3:23 PM (GMT -5) on 18 Nov 2022]
  • 1. For I/O1 as DAC, it is 0000 0101 0000 0000 >> 0000 0010. Refer to Figure 40.

    2. For Data, D14-D12 is don't care, as you have already provided the address in the pointer byte.

    3. Please see the latest DS Rev F. If the REP is not set, any ADC conversion read byte 5 to 8 will be random, mostly 0xFFFF.

  • I have downloaded Rev F DS.

    For ADC, I have a few questions.

    1. In Figure 42, why is there step 3?
    2. If there is more than one ADC pin/channel, paragraph 3 in page 26 says "converts all selected channels sequentially in ascending order". That means Ch0 conversion occurs before Ch7 in the case of Figure 42. However, when using I2C to read data, ADC7 comes first. Is there enough time?
    3. When writing to ADC conversion register, ADC7 always comes before ADC0, because bit 7 always comes before bit 0. Right? "The ADC sequence can be changed by writing new sequence" on the same page is confusing, isn't it? Unless we use two separate commands to write the sequence: first ADC0 only, second ADC7 only. Am I right?
  • Hi

    1. Step 3 is an ADC data read pointer byte command.

    2. Thanks for bringing this to our notice. I will get back to you on this. The amount of time for an ADC conversion per channel is 2us, which is what you need to ensure before reading out the data. This time is already met once you issue an ADC data read pointer byte command.

    3. If you wish to abort the ongoing ADC conversion, and restart a new sequence, you can always write to the ADC sequence register and change the ADC sequence. This will ignore the existing ADC conversion sequence irrespective of how many channels have already converted and how many are pending conversion.

  • I want to use I/O 1 & 4 as GPIO output, so I write 0x08, 0x0, 0x12 to AD5593.

    Next I write 0x09, 0x0, 0x12 to set those two pins High.

    However, I cannot measure high voltage at those two pins. What went wrong?

    I believe that my I2C functions are working because by following procedures in Figure 42, I can get some ADC readings on I/O 0,3,5,6. Although I am still trying to figure out whether or not those readings are as expected, at least I2C calls can go through.

  • I write 0x04, 0x01, and 0x69 to set ADC pins: I/O 0,3,5,6 and enable temperature in ADC readings;

    then 0x02, 0x02, and 0x69 to set REP bit.

    However, after read 10 bytes, there is no temperature reading.

    For the first four bytes, I can get ADC pin number: 0,3,5,6, yes in that order, in the first 4 bits of every two bytes.

    In byte 9, the first 4 bits is 0b1110, not 0b1000. WHY?

    My observation seems contradicting to what is showed in Figure 42, where ADC7 result comes before ADC0. 

  • It should be as follows

    0x04 0x00 0x69 (Note : 0x04 points to ADC_CONFIG and ADC_CONFIG does not have a temperature bit)

    0x02 0x03 0x69 (Note. ADC_SEQ has a temperature bit and you have not enabled it yet.)

    I will get back to you on Figure 42. Based on your observation, it seems that Figure 42 has to be updated with ADC7 swapped with ADC0 in step 4.

  • How are you trying to measure the high voltage on these two pins?

  • Regarding to Figure 42, I did quite a few resets of hardware, i.e. same code, just power off and on hardware: most of the time the channel sequence is 0,3,5.6. Sometimes it did not appear that way. I got 6,0,3,5 one or two time. So it seems not fixed. It does not matter that much, does it? As long as there is ADC number in the returned two bytes.

  • Hi

    As long as you are checking the ADC channel number, it should be fine.

    Channel sequence should always be 0,3,5,6. What is the SCL frequency?

  • Yes, you are right. Sequence is always 0,3,5,6. 

    In the case of not in that order, the reason is I did not try to read multiple of 8 bytes.