AnsweredAssumed Answered

AD7091R Read Write Issue

Question asked by Bhautik on Sep 4, 2015
Latest reply on Sep 7, 2015 by KarenNE

Please find attached ADC interface schematic

 

Please find below SPI communication with my PIC controller

 

I am using the 12Bit ADC AD7091R-2 for RTD and 4-20mA transducer interface.


I am not getting the Reference Output of 2.5V form the pin of REF-OUT pin of ADC

and am also not able to read the registers value on issuing the READ command.

 

2015-09-04 16_15_27-P-TWS_INTERFACE-3-1.pdf - Adobe Reader.png

 

#define RESET_ADC       0b0001011000000000      //Soft Reset ADC

#define MODE_ADC        0b0001010000000001      //Power Mode Selection: Sleep Disabled; Internal Reference Enabled

#define CHANNEL_RTD_ADC 0b0000110000000001      //Channel Enable of ADC: Two Channels Enabled

#define CHANNEL_LVL_ADC 0b0000110000000010      //Channel Enable of ADC: Two Channels Enabled

#define CH0_LOW_LIMIT   0b0010010000000000      //channel 0 Lower Limit = 00

#define CH1_LOW_LIMIT   0b0011110000000000      //channel 1 Lower Limit = 00

#define CH0_HIGH_LIMIT  0b0010111111111111      //channel 0 Higher Limit = 100

#define CH1_HIGH_LIMIT  0b0100011111111111      //channel 1 Higher Limit = 100

#define CH0_HYST_LIMIT  0b0011010000000000      //channel 1 Higher Limit = 00

#define CH1_HYST_LIMIT  0b0100110000000000      //channel 1 Higher Limit = 00

#define NOP             0b1111100000000000     

 

 

 

 

void Ext_ADC_init(void)

{

    int i = 66;

    uint16_t rcvbuf = 0;

 

 

  /* Providing 66 init pulses */

  for (i = 68; i > 0; i-- )   

  {

  CONV_WRITE = 1;

  __delay_us(2); //2 microsecond Delay

  CONV_WRITE = 0;

  __delay_us(2); //2 microsecond Delay

  }

  CONV_WRITE = 1;

 

  rcvbuf = SPI_Exchange16bit(RESET_ADC); // Reset ADC Command

    __delay_ms(10); //millisecond Delay

 

  rcvbuf = SPI_Exchange16bit(MODE_ADC);

    /* Waiting for the Reference Output 2.5V to set */

    __delay_ms(100); //millisecond Delay

 

  rcvbuf = SPI_Exchange16bit(CHANNEL_RTD_ADC | CHANNEL_LVL_ADC);   //Setting the Channel

  __delay_ms(20); //millisecond Delay

  rcvbuf = SPI_Exchange16bit(CH0_LOW_LIMIT);

  __delay_ms(20);

  rcvbuf = SPI_Exchange16bit(CH0_HIGH_LIMIT);

  __delay_ms(20);

  rcvbuf = SPI_Exchange16bit(CH0_HYST_LIMIT);

  __delay_ms(20);

  rcvbuf = SPI_Exchange16bit(CH1_LOW_LIMIT);

  __delay_ms(20);

  rcvbuf = SPI_Exchange16bit(CH1_HIGH_LIMIT);

  __delay_ms(20);

  rcvbuf = SPI_Exchange16bit(CH1_HYST_LIMIT); 

  __delay_ms(20);

}

Outcomes