I am trying to test out the ADC using the example driver code provided, but I am getting unexpected values from the ADC, and the most likely reason is that I've configured something wrong.
I have the ADC connected to AIN/2 (PB08). the other end is connected to a 50kohm/10kohm voltage divider sourced from the board's 3.3V output. The compare source is the internal 1V source. According to my multimeter, I'm getting the expected .559V from the voltage divider, which should give me a result from the adc of around 0x8F in 8-bit mode, but instead I'm getting values of 0x25
I've attached my project below (if there's an easier way to show START configurations, please let me know) and any help would be greatly appreciated. I have a feeling it has something to do with the channels, since I've successfully used many single-channel ADCs in the past, but this is the first multi-channel one I've ever worked with.
EDIT: I ran it again, realizing I had the compare source wrong. Now it's giving me values of 0x74, which seems closer, but is still pretty far off. Is that just how accurate the sensor is? I can't find it anymore, but I thought it said the accuracy was 1 LSB +- 5%, which this is way higher than.