The datasheet says that AREF/PD7 can be used as a GPIO but it doesn't list a "D" number to use in the pinMode and digitalWrite functions. How do I setup and use this pin?
You will need to use MCUdude's MegaCoreX or some other third-party boards package, the Arduino megaAVR boards package does not appear to support that usage of the AREF pin. It would then be digital pin 39 or analog pin A8. Alternatively, you could control the port directly by the registers in the processor.
3 Likes
Fantastic, thank you. MegaCoreX works fine and I can use 39 as normal.
Also, in case anyone else is reading this and using the same solution and gets stuck uploading, make sure to use JTAG2UPDI as the programmer.
2 Likes
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.