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