analogReference() doesn't work as expectedd

I have a Pro mini and I’m running Arduino 1.0.6.

By the time I’m calling analogReference() once, I dont’ have any signal on the AREF pin witch is pin20 of the Atmel 328p (The Pro mini doesn’t have an AREF pin, you need to get it directly on pin 20 of the uC)

To get back the DEFAULT, (Vcc = 5V), I must do:
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);

If I want INTERNAL (1.1V), I must do :
ADMUX = _BV(REFS0) | _BV(REFS1) |_BV(MUX3) | _BV(MUX2) | _BV(MUX1);

:confused: :confused:


The analogReference() does not do anything. It sets the variable 'analog_reference' which is used with analogRead(). The reference is set when calling analogRead(). I forgot why it is like that.