Electronic – MCP3561 Sampling Interval

adc

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:

Prescaler: 2
Oversampling Rate: 98304
Gain:1
Continuous Conversion

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!

Best Answer

Voice of (painful) experience: when using Microchip products, always check out the errata sheet. Your issue and a workaround are described in http://ww1.microchip.com/downloads/en/DeviceDoc/MCP3X5X-Family-Data-Sheet-Errata-DS80000845B.pdf .