I am using an MCP3561 ADC (Datasheet) to convert analog readings from a load cell to digital signals to be processed by an ATSAMD20G16 Microcontroller (Datasheet). I have configured the ADC to exhibit the following properties:
Oversampling Rate: 98304
This corresponds to a sampling interval of approximately 100ms given Equation 4.3 on page 27 of the ADC datasheet and an 8 MHz master clock from the MCU. My application continuously polls the IRQ register on the ADC to check the !DR_STATUS bit. When this bit indicates data is ready, the program reads the contents of the ADC's data register and transfers it to the MCU over SPI.
I have configured my main loop to print the value of the ADC read and the time interval between reads over the serial port. I observe a consistent 98-99ms interval between samples. Occasionally, however, the inter-sample interval is doubled. The occurrence of this doubling is unpredictable; sometimes there is a cluster of double intervals in rapid succession, other times it takes 20 or 30 seconds before a double interval occurs.
I edited my ADC read function to toggle a GPIO pin on the MCU every time it reads a sample so I could correlate the serial output to a signal on the oscilloscope. Then I stripped every piece of extraneous code from my main loop, including the serial print statements, with the hopes of isolating the cause of this anomoly. Unfortunately, the behavior persisted, and I am no closer to an answer.
Has anyone experienced this behavior (or anything similar) when using this IC? If so, were you able to determine the cause/develop a solution? Any insight would be appreciated!
Thanks in advance!