Hi @PCS13,
Thank you for the project.
I have been testing it without any modifications, and it works correctly.
Please measure the input voltage at PTA0 and the VREFH reverence voltage.
You mentioned that you measure 5V input, but the ADC_VREFH macro is set to 3.3V in the project.
I would say you get the correct adcRawValue
8bit ADC: LSB = (VREFH - VREFL) / 256.
But the adcValue is incorrect because of the ADC_VREFH definition.
Regards,
Daniel