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.

ADS1220: is there any buffer (for sending data over SPI) inside ADS1220?

Other Parts Discussed in Thread: ADS1220

Hi,

I am building a really simple data collection system using two sensors (one of the two is ADS1220), Bluetooth module, and Arduino UNO R3. 

The other sensor generates six digital data (2-byte each) at every 1ms (i.e., 1kHz sampling), and it sends them via I2C (400kHz) to Arduino. When Arduino receives the data, it sends them to a Bluetooth module using serial communication @ 230400bps. Arduino codes and libraries are not optimized yet, so it cannot handle/finish all the necessary work within 1ms. So I accumulate data using 1024 bytes of FIFO buffer within the sensor, and when the FIFO reaches 48 bytes of data (4ms of data), Arduino reads those 48 bytes from the FIFO, and sends them to BT module without any issues.  That is, I am handling the data at every four seconds using the FIFO inside the sensor. 

When it comes to ADS1220, I also set it to sample the analog input at 1kHz, and Arduino currently can read the data at up to around 300Hz, discarding around 2 out of 3 data readings. Now, I am trying to read all data (1000 samples per second), and I used DRDY_ pin for interrupt. Problem is, Arduino cannot handle all the work due to this 1ms-periodic interrupts from ADS1220. I am trying to optimize all the codes and libraries, but I wonder whether of not ADS1220 has 64 bytes or so FIFO buffer to store data temporarily before it sends them out via SPI. Or does SPI have some FIFO buffer that I can use? If so, I think I can use the FIFO to give Arduino some more time to handle all the other tasks. Your help will be greatly appreciated.  

* Currently, I am using continuous conversion mode. 

Thanks, 

J

  • Hi Jun,

    Welcome to the forum!  The ADS1220 has no built in buffer for storing unread data.  It appears that you have many slow communications interleaved with the devices requiring faster or more frequent updates.  It sounds like you would benefit from the use of a RTOS (like freeRTOS) where you can set priority to specific operations.

    You have not identified your sensors connected to the inputs to the ADS1220.  Do you need to truly read the data at 1ksps?  Many sensors can't change that quickly and you can actually benefit with better resolution by using a slower data rate.

    Best regards,

    Bob B