The 328p datasheet does not explain what it means by "voltage reference selection". I want to connect a potentiometer to the Arduino Uno R3, how do I do it? The three pins to GND, 5V and (for instance) ADC0? Or GND, AREF and ADC0? Or 5V, AREF and ADC0? Impossible to know.
Secondly, how do I read the value of the ADC? The ADCL and ADCH (low, high?) have some disclaimer to them, is it a good idea to set ADLRA in ADMUX? (see below)
Basically, how does the correct code to get the ADC working look? Preferably interrupt driven. I saw the tutorial on this site but they lied and it didn't work (EDIT of course not, turns out the ADRF bit is replaced by ADATE, then it works!). All examples on the internet are bogus aswell, even Atmel themselves can't provide correct code. I've sat here for a while now, I wouldn't ask you if I hadn't given up.
Thanks so much and for enduring my grumpiness!