Pins A7, A6, no voltage output?

Using a nano i noticed that pin A7 (maybe A6 as well, don't rem) does not give an output voltage when instructed with analogWrite(A7,255);

all the other pins work. I took up a brand new nano and tested against 3 of them, same issue.

How can i get this pin to output 4-5V?

That is correct. Pin A6 and A7 are analog inputs ONLY. You cannot do anything with them other than analogRead() - this is a hardware limitation (and the only case of such weird analog-only pins in Atmel's entire atmega/attiny product line, as far as I can tell).

Actually, analogWrite() doesn't use the analog A# pins either - those pins are not capable of PWM. The "analog pins" are the ones that you can use analogRead() with. You can use digitalWrite() and digitalRead() on the "analog pins" too - except for A6 and A7.

analogWrite() will give PWM output on pins 3,7,8,9,10 and 11 (the PWM pins). Using it on any other pin, including the "analog pins" is equivilent of digitalWrite() - it writes the pin high if the duty cycle you ask for is 128 or higher, low otherwise (this is what you were doing - analogWrite(A0,255) produces the same result as analogWrite(A0,128) or digitalWrite(A0,HIGH) or digitalWrite(A0,1). )

I've always thought that the way Arduino talks about "analog pins" as if there some different kind of pin was really confusing to newbies. "Analog pins" are just digital pins with the added function that they can be used with analogRead() to measure the voltage on the pin, just like how those PWM pins I listed above can output PWM through analogWrite() in addition to being normal digital I/O pins.

Lol. Wow. THanks man.

I just printed 10 PCBs with a driver working off A7. lol. Gonna have to dig out that trace and patch it to D5 or something.

And now that I think of it, i may have ditched arduino nanos in the past thinking i burnt those pins!

At least it's only 10 boards, and you can cut-n-jump it.

Also, as an aside, when you burn a pin, 90+% of the time it shorts to ground (not floating like A6/A7)

Oh cool. Thanks