ATmega328P-AU Pin22 (Arduino Pin ADC7): can we take 3.3V from it?

Hallo gentlemen, good afternoon!

I’m coding a firmware using Arduino IDE, to upload it directly by USBasp on an ATmega328P-AU 3.3V based board.

I need to feed these 3.3V also to a component on the same project, using a pin as “on/off switch”.
The current I need from this pin is about 1mA, very low.

I know I can use, for this purposes, any of the “blue highlighted” pins in the attached picture.

The question is:
Can I have 3.3V also from analog pin ADC7, using the following code?

pinMode(ADC7, OUTPUT);
digitalWrite(ADC7, HIGH);

If yes, is that a voltage of the same type of voltage coming from “blue highlighted” pins?

Thank you very much indeed.


Hello spycatcher2k, thanks for answer.
I had compiler error if I name pin ADC7.
Otherwhise, if I name pin A7, it compiles correctly, but no voltage on that pin.
It seems like thiese commands are not working.
Have you a suggestion?
Thank you.


Thank you gentleman. I would be sure, because some posts on the web speaks about it may be also a digital output. I suspected that was not true.
Have a nice future.