ATTINY 84 Aref pin?

I want to program an ATTINY84 microcontroller using Arduino UNO as an ISP. In my program I need to use the AREF pin that is located at pin P0 on ATTINY84. I know that I can call analogReference() on Arduino UNO ATMEGA328, but what about the ATTINY84? Do I have to program the IC with some fuses?

• Are you intending to use the ADC? (Why else would you be worried about the AREF pin...) The only reasons should you need to mess with the fuses for programming with ISP is to change the clock speed if you are using an external crystal or clock source. – Kurt E. Clothier May 13 '13 at 21:31

For reference, here's a link to the ATTiny84 datasheet.

Bit 7 6 5 4 3 2 1 0
0x07 (0x27) REFS1 REFS0 MUX5 MUX4 MUX3 MUX2 MUX1 MUX0


If REFS1=0 and REFS0=1, the ADC will use the external reference on pin PA0.

These registers can be modified in code, here's an example using AVR-C:

ADMUX = 0x40;


Note that this will mess up the MUX settings, there are other ways to do this if you don't want to mess up the mux settings using bitwise operands:

ADMUX = (ADMUX & 0x7F) | 0x40;