Arduino Due SPI with external ADC only reading back 2bit resolution

I am using a potentiometer that the ADC is reading values from but the values that are read back are only 0, 1.25, 2.5, 3.75, 5 V. When using a voltage divider instead of a potentiometer the value that being read back are the same. I am using the MCP3002 ADC and using the SPI functions on the Arduino Due.

please any hints will be helpful :slight_smile:

adc_test_2.ino (1.98 KB)