This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1248: Never data ready

Part Number: ADS1248

Hello.

I'm using a pic24EP64GP206 to controll the adc over spi.

After some work and validation, spi seems work fine, but never getting a data ready from the adc, i just tryed all i getting nothing.

Here is a photo from my SPI (just sending 0xAA to make sure it's well configured)

And here is my code for configuration and data aquisition. (there is no CS signal in the code, but by hardware is fixed low)

void InicializaADC(){
    
    DELAYADC(10);   //Delay 10ns
    SPI1_send(0b00000110);    //Send reset
    DELAYADC(600);   //Delay 0.6ms
    //SPI1_send(0b00000000);    //Send WakeUp
    SPI1_send(0x16);    //Send SDATAC
    DELAYADC(600);   //Delay 0.6ms
    //SPI1_send(0b00010100);    //Send RDATAC
    
    //Send WREG
    
    SPI1_send(0x43);	//write to SYS0 to change SPS
    SPI1_send(0x00);
    SPI1_send(0x52);

    SPI1_send(0x42);    //write to MUX1 to set up internal reference
    SPI1_send(0x00);
    SPI1_send(0x30);
    
    SPI1_send(0x40);    //write to MUX0 register to change channels
    SPI1_send(0x00);
    SPI1_send(0x01);    //+AIN0, -AIN1
    //SPI1_send(0x13);  //+AIN2, -AIN3
    //SPI1_send(0x25);  //+AIN4, -AIN5
    //SPI1_send(0x37);  //+AIN6, -AIN7
    
    SPI1_send(0x04);    //Send SYNC
    SPI1_send(0x04);
    DELAYADC(2);   //Delay 6ms
    SPI1_send(0x14);    //Send RDATAC
}

ulong getADCSample(){
    FastTriggerSet(&timeoutADC,200000); //timeout 200ms
    
    while(DREADY_ADC){  //wait until data ready or timeout
        if( FastTriggerActivado(&timeoutADC) )
            return 99999;
    }
    DELAYADC(20);       //Delay tcssc
    
    SPI1_send(0x12);    //Send RDATA
    SPI1_send(0xFF);    //Send NOP x3
    SPI1_send(0xFF);
    SPI1_send(0xFF);
    

    
    DELAYADC(2);        //Delay tsccs

    return SPI1_recive();
}

  • Hi Josep,

    Thanks for your post and welcome to the forum!

    The ADS1248 will not start conversions or write registers if the START pin is not held high.

    I do not see it in this portion of your code, but the device requires 16ms after the power supplies have stabilized before communicating with the device. Please see section 10.1.8 for clarification.

    Additionally, check your MCU to ensure that the pin monitoring /DRDY is not reserved or a in forced state.

  • Josep,


    One other line to check is the /RESET. In this device this pin is active low and should be high to stay out of reset.

    Just looking at the scope photo, it looks like you are using the wrong SPI mode from the microcontroller. The data should be setup on the rising edge of SCLK and the data should be clocked into the device at the falling edge of SCLK.

    If you line up the edges, it looks like you have it set up with the data set up at the falling edge of SCLK, and are trying to clock in data at the rising edge.

    Verify the microcontroller SPI mode is mode 1 as I’ve described and check to see that you get a response from the device.


    Joseph Wu
  • I just fund it yesterday, please correct your datasheet, since RESET  tipicaly make the device active on low, not on high, and that make's me waste 1 week of work.