MCP3208 SPI readings on ESP32-S3 show missing LSB patterns

Hello everyone,

I am working on a project using an MCP3208 (12-bit, 8-channel SPI ADC) connected to an ESP32-S3. I have a stable analog signal (~1400–1500 range), but when I read the ADC values via SPI and send them over RS485, I notice a very strange pattern:

  • Some values are never read. For example: 1467 and 1468 appear normally, 1469 and 1470 almost never appear, then 1471 and 1472 appear again.
  • Observing the 12-bit binary representation, the last two bits are always equal. Any value where bit1 ≠ bit0 disappears.
  • This pattern repeats across the entire measurement range.
  • When the values are lower (~1200), the readings are stable with only small tolerances (~20 units).
  • At higher values (~2000+), missing values and spikes increase, but only in the negative direction (values are lower than actual, never higher).

My setup:

  • MCP3208 powered at 5V
  • ESP32-S3 logic at 3.3V
  • SPI clock = 1 MHz
  • SPI mode = 0
  • CS held low for a single transaction of 24 clocks
  • No FreeRTOS tasks used

I have tried multiple ADCs, and the problem persists. I suspect it may be related to SPI bit alignment, logic level mismatch, or Vref decoupling, but I am not sure.

Has anyone encountered a similar pattern when reading MCP3208 on ESP32? Any suggestions on the correct SPI read sequence, or how to avoid missing LSBs / negative spikes at higher ADC values?

Thanks in advance!

Probably all of the above.
First obvious problem to correct is the incompatible logic levels. You will need level translators.

thanks for your reply. do you mean translating 5 volt of mcp3208 to 3.3 volt? how can I do it should I add any components? I have a pcb board.

and 3.3V ESP to 5V MCP

To go from 3.3 to 5V use:
74HCT125 powered by 5V

To go from 5V to 3.3V use:
SN74LV125 powered by 3.3V

What are you using for Vref?

Welcome!

The MCP3208 operates over a voltage range of 2.7V to 5.5V Is there a special reason for running it at 5V?

Post your annotated schematic showing exactly how this project was wired.