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

Other Parts Discussed in Thread: ADS1248

HI,

I am working on ADS1248 ADC converter.I need to know if I can poll DRDY pin to know if new converted data is ready in ADS registers.

I am using polling method till now and no problem is coming but is it reliable method or I should use edge triggered interrupt to do so ????

  • Ankit,


    You can poll /DRDY, but you need to ensure that you poll the line fast enough and are able to clock out the data fast enough as well. I am assuming that you are in read data continuous mode (which is the default mode).

    As an example of one of the problems that might come up, if you poll the /DRDY and it is low, you need to completely clock out the data before the next /DRDY is indicated. If you start to read the data and a new /DRDY comes along, then the device updates the DOUT with the new data, and you get a combination of the first bits of the old data and the first bits of the new data. In this mode, the DOUT is automatically updated with new data every time a /DRDY is issued.

    If you are in read data continuous mode, it's better to have the /DRDY interrupt driven, so you can immediately clock out the data when you are ready.

    Instead of using read data continuous mode, you can issue an SDATAC command. This will put the device into stop read data continuous mode. In this mode, the device will not update DOUT with each /DRDY indication. To read the data, you can send an RDATA command, and read the data whenever you want and you don't need to worry about /DRDY interrupting the read.

    Also that that to read the registers you should send an SDATAC, so that the reading of the registers are not interrupted by /DRDY.


    Joseph Wu
  • Hi Joseph,

    I am not in reading data continuous mode. I have sent SDATAC command in the initial and now whenever I need to read data I just send command to read data and get 24 bit converted value. But I am using polling, should I move on with polling or change it ? what interval of polling should I keep? As of now I have not chosen any interval I just poll /DRDY in while(1) loop and I didn't face any kind of problem till now.
  • Ankit,


    If you use the SDATAC command, then you could just poll the /DRDY to get the next data. As long as you see that the /DRDY is low, then the data you read back will be a new data.

    What you use for the polling interval depends on what is important to your system. If you are concerned with getting the data out as fast as possible, making sure that the each data is new and consecutive (without missing any data in between) then you should choose a polling rate much faster than the data rate that you use. If you don't care about how fast you receive the data than you don't even need to poll /DRDY. Just read out the data at a rate slower than the data rate that you use and you should get a unique data each time.


    Joseph Wu