I have an ATxmega32E5 MCU on a custom target PCB. There is an external 2.500V reference on AREF. I wrote a test loop where an ADC conversion is started, waits until conversion is complete, then sends ASCII decimal conversion value over the UART. This repeats indefinitely unless the use hits a key.
The first 20 (or so) converted values are garbage - bouncing around and totally unrelated to the voltage applied to the ADC input. After that, everything seems to be fine. What is it that causes the first 20 conversions to be garbaged?
There is obviously some trick to using this ADC peripheral. If anyone knows what it is, I'd appreciate them sharing it.
I have gone through the documentation, such as it is. Everything seems to be configured properly, else I wouldn't be getting the correct readings (after the garbage ends).
Thanks in advance!