I have two nano's.
I am interested to know if they are both duff or if a6 and a7 can't be used as outputs.
If I tell a5 to go high
pinMode(A5,OUTPUT);
digitalWrite(A5,HIGH);
I get 5v on the pin but nothing on pins 6 or 7 if I do
pinMode(A6,OUTPUT);
digitalWrite(A6,HIGH);
or
pinMode(A7,OUTPUT);
digitalWrite(A7,HIGH);
(I didn't put them in code it takes much more space.)
Do I have duff nano's or is this how they are?
thanks,
Bob.
A6, A7 -- only as inputs (like the ProMini).
And only analogue inputs on top of that.
I suggest that OP reads the datasheet of the 328P processor and looks at the drawing of the pinout of the TQFP package. Pins 19 and 22 are marked as ADC6 and ADC7, not as PCx/ADCx. Comparing the two, one can see that ADC6 and ADC7 are missing the 'PC6' and 'PC7' which indicates that they are analogue inputs only (not digital ports).
Thank you runaway_pancake.
I'm pretty sure those two pins are literally the only analog-input-only pins in the entire AVR product line...
As far as I can tell, the TQFP32 came after they were already selling them in DIP-28... we have 4 extra pins? Well might as well add an extra power and ground... can't go wrong with that, but we don't need two pairs. Saaay, that analog mux has 8 channels internally (probably after some internal change to standardize their peripherals), and there's nothing keeping someone from setting the mux to those pins.... so they just did it. But they couldn't add registers to control them as digital pins without breaking compatibility, hence wacky analog only pins.
They fixed that with the (later) ATtiny88/48 (it lost a pair of power and ground pins, and gained a new 4-pin port), and the later, strictly-better, and cheaper, 328PB... I'm annoyed that I can't buy 328pb nanos and pro mini clones... (it's got IIRC 2 more of the 16-bit "good timers", a second UART, and for reasons I never really understood, an extra SPI and I2C peripheral too)...
Yet I CAN buy LGT not-quite-328p based clones (the chip is actually really epic, only one extra timer, but it's got a few 80mA high current pins, internal oscillator good enough for UART and good to 32MHz @ 5v, and the flash is memory mapped, but because the Arduino package piggybacks off the '328p, you still have to use F() macro and the progmem crap... some day I'm going to modify the compiler package to use the mapped flash automatically for const variables, and have a single file for the io.h - basically treat it like a first class citizen, even though I hate WAVGAT for confusing so many newbies with them)