Using Arduino Mega2560 all pins

Hi everybody,
How can I use all Mega2560 pins (100 pins) in Arduino Mega2560? I need all six Timer Counters in Mega2560 micro-controller. As I know it's restricted in Arduino Mega2560 pinout.

You are always able to control all pins of the ATmega2560 via the registers. However, you have probably noticed that Arduino pins have not been assigned to the IO pins not broken out on the Arduino Mega boards. If you want to use the standard Arduino pin functions (e.g. pinMode(), digitalWrite(), digitalRead()) you can use MegaCore, which does define Arduino pins for all IO pins on the chip:

This is only done for the "AVR pinout" so after installing MegaCore you need to select Tools > Board > ATmega2560, then Tools > Pinout > AVR pinout. The "AVR pinout" pin mapping is shown in this diagram:

Note that it does not match the Arduino Mega pin mapping for the standard Arduino pins.

Thanks for reply but, I got lots of library errors using MegaCore (by solving problems, another library error occurred) in Arduino IDE, even in compiling blank sketch in Arduino IDE environment. I selected ATmega2560 AVR-pinout.

Don’t post screenshots of text! That is very unhelpful. When you encounter an error you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar). It is almost never appropriate to post screenshots but in some cases it is helpful to post images. You should attach and embed the image following these instructions:

Why the heck do you have MCUdude_corefiles/libraries/WiFi?

Correct solution is to get MCUDude's core working - this what his core is made for. If there are issues with it that are legit and not installation/some other issue, we'll get him to fix them :stuck_out_tongue:

It looks like some information was removed at some point in this thread?

Here’s the image that khoshkar removed:

Megacore doesn’t have a cores/MCUdude_corefiles/libraries subfolder so this is definitely not caused by a MegaCore bug.

What the hell... that one is straight out of the twilight zone!

More info needed from OP; I'm just about positive that something really weird and seriously wrong was done during the installation or configuration process.

The problem solved by deleting libraries folder, so that, sketch compiles without any problem. :roll_eyes: I'm used to program using VScode, Anyway, thanks everybody.