Mega2560 pin question

Standard Mega2560 has only up to 70 usable pins (including analog pins) but the chip itself has up to 86 pins. If I used Mega2560 in Arduino IDE, will it correctly map D70 to D85 or do I still need to install a core like MegaCore on Github to use the extra 16 pins correctly?

I am doing a project that needs 74 pins total and I'm hoping I can use standard Mega2560 with 4 extra wires tacked on the chip itself to get D70-D73

Or do I need to get a stand alone ATMega2560 on a breakout board? Any suggestion for breadboard friendly version of breakout board? The ones I've seen has pins all around the edge which will not fit breadboard, and I doubt anyone makes 100 pin DIP style PCB for 100 pin TQFP

In order to use the extra pins via standard Arduino IO functions (digitalWrite, digitalRead, etc.), you need to use MegaCore since Arduino AVR Boards does not map Arduino pin numbers to the extra pins.

If you want to use the pins by using the registers directly, you can continue to use Arduino AVR Boards.

wilykat:
I am doing a project that needs 74 pins total and I'm hoping I can use standard Mega2560 with 4 extra wires tacked on the chip itself to get D70-D73

That should work. According to the schematic (and my Mega board reflects this), the unused pins are left floating rather than being tied to ground.

Ok thanks, that's what I needed to know.

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per

The default compiler* (that is, the Arduino IDE) has a definition for each pin, which is not recognized by the unused pin compiler. (The original compiler of the old version would have an error if it defined an extra pin. But now the new version of the compilation will not go wrong). If you want to use extra pins, you can rewrite the Arduino header file, add the extra pins to be used in the Arduino header file, and ensure that they do not conflict with the original used pins.
Or you can look at the method mentioned in this question.Arduino variant, how do I add more pins - Other Hardware Development - Arduino Forum

In addition, if you don't want to modify the header file, you can put two Arduino together and use it together.

kuongshun:
The default compiler* (that is, the Arduino IDE)

The Arduino IDE is not a compiler. It's an IDE. The compiler in this case is avr-gcc, though each hardware package can use its own compiler tool.

kuongshun:
If you want to use extra pins, you can rewrite the Arduino header file, add the extra pins to be used in the Arduino header file, and ensure that they do not conflict with the original used pins.

Yes, you could modify the variant file, but this work has already been done for us by MCUdude in their excellent MegaCore, so it's much better to not duplicate work that is already finished.

@wilykat I should have mentioned that, although the work has been done to support all pins of the ATmega2560 in both the pinout options for the ATmega2560, this work for the "Arduino MEGA pinout" was done after the time of the last MegaCore release. That means that if you install MegaCore via Boards Manager, or have an old manually installed version, you will only be able to use the extra pins with Tools > Pinout > AVR pinout selected (and note that pinout has different pin mapping than what is marked on the Mega's silkscreen. If you want to use the extra pins with the "Arduino MEGA pinout", you only need to do a manual installation of MegaCore, following these instructions:

If you have a previous Boards Manager installation, make sure to remove that (which you can do via the Boards Manager interface).