Post Go back to editing

AD7714 vanish DRDY pulses

AD7714 vanish DRDY pulses after chip init

I try init my chip and if I do this there are no pulses on the DRDY pin.

If I bypass init function I can read ADC values

void main()

{

   resetAD7714();

   spiInit();

   initAD7714();

   while (1)
    {   
          // Place your code here       

          if(DRDY == 0){  
              spiWrite( 0x5C );        
              displayAD7714Result(spiWrite( 0xFF ), spiWrite( 0xFF ), spiWrite( 0xFF ));
           }
          delay_ms(10);                    
    }
}

void spiInit(void)
{
//      /* Set MOSI, SCK, SS as output */          
        DDRB = ((1<<SPI_DDR_MOSI) | (1<<SPI_DDR_SS) | (1<<SPI_DDR_SCK));
        PORTB &= ~((0<<SPI_PORT_MOSI) | (0<<SPI_PORT_SS) | (0<<SPI_PORT_SCK));
     
        /* Enable SPI, Master, set clock rate fck/16 */
        SPCR |= (1<<SPE)|(1<<MSTR);//|(1<<SPR0);
//      SPDR = 0b00000000;
}

 

void initAD7714()

  spiWrite( 0x24 ); /* set the channel AIN1-AIN2 and set the next operation as write to the filter high */

   spiWrite( 0x6F ); /* set Bipolar mode, 24 bits, boost off, all 4 MSBs of filterword to 1 */

   spiWrite( 0x34 ); /* set the channel AIN1-AIN2 the next operation as a write to the filter low register channel AIN1/AIN2 */

   spiWrite( 0xA0 ); /* max filter word allowed for low part of the filterword */

   spiWrite( 0x14 ); /* set the channel AIN1-AIN2 the operation as a write to the mode register.*/

   spiWrite( 0x20 ); /* set gain to 1, burnout current off, no filter sync, and do a self calibration */

}

unsigned char spiWrite(unsigned char cData)
{   
     /* Start transmission */
    cs_Low();
    SPDR = cData;
    /* Wait for transmission complete */
    while(!(SPSR & (1<<SPIF)));    
    cs_Hight();
    
    return(SPDR);    
}

Parents
  • Hi, 

    Just to check if this is a code issue and not an ADC issue. Can you stop writing or reading to SPI interface? Just power up the device supply the appropriate MCLK, Reference and Analog Inputs and then pull /CS monitor if the DRDY pin is pulsing at default ODR (I think it is 60SPS but you can double check). 

    And one more thing, this is a very old part and not recommended for new design. I'd suggest to check AD7124-4B It has all the building blocks of AD7714 but with more advanced features. 

    Thanks,

    Jellenie

Reply
  • Hi, 

    Just to check if this is a code issue and not an ADC issue. Can you stop writing or reading to SPI interface? Just power up the device supply the appropriate MCLK, Reference and Analog Inputs and then pull /CS monitor if the DRDY pin is pulsing at default ODR (I think it is 60SPS but you can double check). 

    And one more thing, this is a very old part and not recommended for new design. I'd suggest to check AD7124-4B It has all the building blocks of AD7714 but with more advanced features. 

    Thanks,

    Jellenie

Children
No Data