A6 and A7 as digital output

Hi all

I’ve read that A6 and A7 pins on a 328P con only be used as analog input pins (analogRead).
Is there ANY CHANCE to use them as digital output (digitalWrite)?

I would like to avoid sending 10 PCB to trash…

Regards

Is there ANY CHANCE

No

No, there are no pin drivers for those pins and no register to write to to control them. They are analog input only (I think this is the only set of pins like that in the entire AVR product line - I think the decision to add them when they made the TQFP version went like “Hm, we have 4 extra pins on TQFP 32. We can add an extra Vcc and Gnd pin, but what about the other two?” “Hey, we’ve got two extra channels on the ADC that aren’t connected to anything, why not make them available?” “Sure, why not”)

Time to respin your board or get out the razor blade and soldering iron for some cut and jump.

Substitute a 328pb, and the pins become writable. The power wiring is also different, but MIGHT BE compatible.

geologic:
I've read that A6 and A7 pins on a 328P

And there's me, thinking they only went as high as A5 anyway.

Are they pins on the chip not taken to edge of the Uno?

wilfredmedlin:
Are they pins on the chip not taken to edge of the Uno?

No. The Uno was is based on the 28 pin DIP package of the chip and A6 and A7 are not available in the package.

The Nano is based on another package (not sure of the name) with more pins (32) and A6 and A7 are available. Arduino did bring them to the edge of the board on the Nano.

TQFP-32

sterretje:
The Nano is based on another package (not sure of the name) with more pins (32)

TQFP-32. There's also a QFN-32 (or some-smaller-than-QFN package like VQFN) package (The DIP, TQFP and QFN versions are the -PU, -AU, and -MU versions; from the perspective of software, they are identical - the AU and MU versions just have the extra channels of the ADC connected to a pin.

westfw:
Substitute a 328pb, and the pins become writable. The power wiring is also different, but MIGHT BE compatible.

That would solve A6 and A7 problem, but lead to a new problem because of power pins are not the same...
But thanks anyway.