LTC1804 with strange behavior

Hi, i'm using a LTC1804-12

From my µC I start a single conversion via SPI every 62,5us, the ADC is working and i get data.

But the sampled data is not the actual value, it is always one behind.

My code

// SPI with 8 MHz, 16 Bit transfer and FIFO
   register volatile unsigned short *dr, *sr;
   dr = (unsigned short*)&LPC_SSP0->DR;       // Data Register
   sr = (unsigned short*)&LPC_SSP0->SR;       // Status Register
   CONVERT_HIGH();
   *dr = 0xFFFF;   // send 96 dummy Bit
   *dr = 0xFFFF;   //
   *dr = 0xFFFF;   //
   *dr = 0xFFFF;   //
   *dr = 0xFFFF;   //
   *dr = 0xFFFF;   //
   CONVERT_LOW();
   while ((*sr & 0x04) == 0) {}; data1 = *dr;   
   while ((*sr & 0x04) == 0) {}; data2 = *dr;
   while ((*sr & 0x04) == 0) {}; data3 = *dr;
   while ((*sr & 0x04) == 0) {}; data4 = *dr;
   while ((*sr & 0x04) == 0) {}; data5 = *dr;
   while ((*sr & 0x04) == 0) {}; data6 = *dr;

Do you have any idea?

    •  Analog Employees 
    on Mar 1, 2019 6:27 PM over 1 year ago

    I am going to assume you are referring to the LTC1408-12. The LT1804 is an op amp. If you look at the LTC1408-12 timing diagram on page 10 of the data sheet, it quite clearly states that SDO represents the analog input from the previous conversion at CHX. The LTC1408 uses the SCK to signal to both perform the conversion and shift out the data. Therefore it has one cycle of latency.