Post Go back to editing

What is the correct way to read the ADC4004

Category: Datasheet/Specs
Product Number: AD4004

Hi Community,

I am working with the AD4004, I feel the need to ask the Analog Device technical team directly since I don't know if I am doing something wrong or if I am simply overlooking something. I am following the documentation presented, there any noticeable difference in the functionality for revision C compared to revision F?

1). When implementing the SPI using STM32 when restarting the AD4004 and using the read command 0x5400 I get the default value or reset of the register map equivalent to 0xE1, only when resetting, but if I read it again this value changes, so I tried to configure it using the configuration command 0x14, appending the configuration data it remains 0x14E1 I do not get 0xE1 again what could be going wrong? Are the commands correct?.

  

2). One of the reading tests that is being performed uses a potentiometer to vary the input voltage to perform the conversion, data is entered from 0v to 3.3v, for example I give it 0.6v and it reads 0x0006, but not every time I read the data because on certain occasions it reads 0x0014, is it correct to read the result of the conversion using the write command 0x14 followed by the configuration value command sending 0x14E1?

  

This still happens, but when reaching a voltage greater than 1.5v it adds an additional value in the cases a 0x80 sharing the additional 0x0014 in some readings, but it still reads the voltage delivering 2.1v and reading 0x8015 where 0x0015 refers to 21, but this should not be the case because it must be 16 bits.

  

3). The above was also tested taking into account the incompatible readings as mentioned in, but it must also be 16 bits, so reading and writing were also tested, obtaining in the same way the problem that it does not deliver the 0x00E1 in its configuration even if that value is configured again through 0x14E1.

I would like to know if I am doing something wrong, and if the writing and reading procedure is well planned, because I feel that when writing the configuration is not being applied, and when reading there should not be much mystery, I am attentive to any information, thank you very much.

  • Hi,  .

    ppending the configuration data it remains 0x14E1 I do not get 0xE1 again what could be going wrong?

    Can you try expounding this more? You are correct on how you read the device. It returned the E1 from your command, 0x5400. On the other hand, when you write, instead of 0x14, can you try writing 0x1401? From its timing diagram, B7 to B0, from the 9th SCK, is where you should configure the device. Can you try checking if you will see some changes?

    This still happens, but when reaching a voltage greater than 1.5v it adds an additional value i

    Is your VREF 5V? If your input is 1.5V, you are receiving a conversion of 0x8014, did I understand this correctly? I tried converting this hex into voltage and it shows a 2.5V result. It seems that from your input of 1.5V there is a 1V offset. For this, can you try grounding the input instead of getting 0V from the potentiometer? This is to check if the offset is still present. At least, we can easily check on this since the conversion we expect is low. On the other hand, while getting the conversion of the analog signal, can you try not doing anything with its SDI? 

    Regards,
    Jo

  • Hi  ,

    Can you try expounding this more?

    Thank you very much for answering and starting the help, I appreciate it, of course to explain a little better I send the 0x14E1 after reading through the 0x5400 to maintain the default configuration of the device that is supposed to be the 0x00E1 I am sending the 16 configuration bits first the write command and then the configuration for that the 0x14E1, later I read it again but as I mentioned this configuration is not being applied.

    can you try writing 0x1401?

    I tried what was suggested of applying the 0x1401 in for the configuration but it seems that the information is being sent but the same response 0x8161 is still received.

      

    Is your VREF 5V?

    My reference is 3v, if it is correct, when reading voltages from 1.5v it adds 0x80 to the beginning of the data, and when reading 3v it delivers 0x801F, the 0x001F the value is 31 but in the same way being a 16-bit value should give me values ​​according to the reading if I give it 3v and 3v is the reference should it give 0xFFFF? or how should it give me the data correctly according to its operation?

    can you try grounding the input instead of getting 0V from the potentiometer?

    Of course I connect it to ground, it correctly reads the reading at 0x0000 respectively On the other hand, there are times when the present data is read at 0x0014 and in others if the data is read, for example, 0x0000. Why is it that on some occasions it always reads 0x0014? Am I using the read and write commands correctly? ? I mean, to configure and read the converted data, 0x14 is used? And to read the current status or configuration of the register map, 0x54 is used? Or am I confused?

       

  •  Hello good morning, any new information about what I answered previously? I am looking forward to any information, thank you very much,

    On the other hand, they have also collaborated with me from the email through technical support regarding this problem, they have indicated the following: when I get the sequence 0x8161 or similar to 0x80, this part should be ignored and the data from the other 8 bits should be taken, that is, for example 0x811F where 0x1F is the data of the conversion performed, is this correct or is there some additional point of view, because on other occasions I read 0x8014 where 0x14 cannot be the value of the conversion since it is not close to the real value and is always the same regardless of the reading voltage.

      

  • Hi,  .

    Apologies for missing your reply. I will look into this and get back to you.

    Regards,
    Jo

  • Hi CamiloDSD,

    can you check you have configure correctly CPOL=0 and CPHA=0, data is latched on each SCK rising edge.

    The interface of this device is a little bit tricky and you need to make sure you are meeting the time specs specified in the datasheet.

    The conversion signal of the ADC is used as CS when reading the data and you need to ensure the SDI level is on the desired level in the rising

    edge of the CNV:

    Which mode are you using for reading the data? CS MODE, 4-WIRE TURBO MODE?

    Regards

    Joan