Post Go back to editing

AD7381-4 Interface Problem.

Category: Software
Product Number: AD7381-4

Hello to everyone,

I have strange outputs when communicating with AD7381-4 and am hoping that someone can give me some tips.

First I would provide some basic information:

The data frame contains 16 bits. The MSB determines a read or write operation, followed by 3 bits of the register address. The rest 12 bits are the data to be written when the operation is a write. Details are in the following picture:

There are 5 registers available, the addresses are from 0x1 to 0x5. Details are in the following picture:

To read the registers, send a read command first, then send another command to get the register content.

Now here is my problem:

I use NRF52840 DK board to communicate with it:

The function spi sends its input to the ADC and display the received data:

When I send read commands, there is no useful data, but when I send write commands, I receive fix data:

Read register 0x1 ->  receive random numbers.

Read registers other than 0x1 -> receive 0x0.

Write anything to register 0x1 -> receive 0x800 (preset content of register 0x4).

Write anything to register 0x2 -> receive 0x7ff (preset content of register 0x5).

Write anything to register 0x4 or 0x5 -> receive 0x220.

I think the timing specification of my NRF MCU is correct, since I can somehow get fix outputs. However,  I still can't control the ADC.

So can anyone please share some tips?

Sincerely,

Yongkun

Parents
  • Hi,

    Is it possible to have some oscilloscope shot with the SPI lines? so we can asses more how the timing of the digital lines flows. What are your target applications with the AD7381-4 so we can further optimize the ADC for your system? 

    One procedure to check if the communication between the ADC and the MCU is good is to first reset the ADC and from here the default values of the registers will be applied. Now, set the register to 0x1 which is configuration 1. we will expect an output of 0x0000 from bit 0 to bit 15. Next is lets try to set the register to 0x5 which is the alert high threshold. we should expect an output of 0x07FF from bit 0 to bit 15. If these values are reflected in the actual system, digital communication is good.

    Regards,

    Andrei

  • Hi Andrei, thank you for the reply,

    sadly I have to go to the lab in the university if I want to use the oscilloscope and I will find a time slot next week to do that.

    I am now doing my final thesis and plan to use 4 AD7381-4 as the analog back end. The goal of them is to measure 16 channels output voltage from previous stage, in order to evaluate the performance of new transistors made by the research group.

    I redid the procedure you mentioned and the results are exactly the same as my original post.

    Sincerely,

    Yongkun

Reply
  • Hi Andrei, thank you for the reply,

    sadly I have to go to the lab in the university if I want to use the oscilloscope and I will find a time slot next week to do that.

    I am now doing my final thesis and plan to use 4 AD7381-4 as the analog back end. The goal of them is to measure 16 channels output voltage from previous stage, in order to evaluate the performance of new transistors made by the research group.

    I redid the procedure you mentioned and the results are exactly the same as my original post.

    Sincerely,

    Yongkun

Children
No Data