Search code examples
microcontrollerspiadc

Analog digital conversion with AD7091 on SPI


I am trying to use AD7091R-8 ADC chip with SPI. Procedure for getting converted value is described inside Datasheet and says:

  1. Reset chip
  2. Bring CONVST line low for 600ns and then get it high.
  3. For enabled channels inside Channels register (I have enabled last 3 chans) start clocking out data which is contained in 2 bytes.

So I bring CONVST line for 1ms then up and wait for 1 ms and start clocking out data by enabling CS then clocking 16bytes and then bring CS up. In those 16bits that clocks out I should get inside first 3 bit channel id and I got it but only the first one. Other 2 frames are without channel id which gives assumption that something got bad.

Does chip after starting CONVST and clocking out data autoincrements ADC results or somehow ADC channel result should be addresed?

Could someone please give hint on how should data be retrived from this ADC after doing CONVST?


Solution

  • If you look at the diagram on page 36 of the datasheet (Channel sequencer), you will find your answer. You need to do the following sequence:

    • Toggle CONVST
    • Tie CS low, write the channel register on SDI, ignore SDO, Tie CS high

    Then for each channel that you want to read:

    • Toggle CONVST
    • Tie CS low, read operation of NOP regiter on SDI, next channel on SDO, Tie CS high