Ful Compatibile ATMega MCU with arduino Libs

Hello everyone!

I'm starting two new projects and I have a dilema... ATMega328 seems to small (flash and ram size) and ATMega2560 seems too big (pin count).

Is there any middle point? Moreover, is there a list of MCUs with full compatibility with existng libraries? Lets say TFT, SD, Wire, DHT, NewPing, etc.

I'm not completly insterested in compatibility with Arduino Bootloder (or Optiboot) because I will program them using ICSP, but I'd like to use the already available libraries. Which leads me to another question, why a Library wouldn't be compatible if they are written in C/C++?

I know they are a couple of question, but some way they are all related, so I think it would be better to have them all answered in one place if it helps someone else.

To sum up: 1- Is there an Arduino Compatible MCU between ATMega328 and ATMega2560?

2- Is there a list of Compatible MCUs? I've looked here, but it's from more than 4years ago.

3- Why a library wouldn't be compatible if it's written in C/C++?

Thank you very much for your help!

  1. Yes. The x4 series (1284p is the top end of that line), and the x1 series (2561 is top end of that). Support provided by MCUdude's MightyCore (for x4 and similar) and MegaCore (for x0 and x1 series - they're very similar in terms of features). https://github.com/MCUdude/MegaCore https://github.com/MCUdude/MightyCore. Both have excellent compatibility and are very well maintained. I would expect everything that works on a normal AVR Arduino to work with those, unless the library contains references to specific processors (which is poor practice, particularly with the AVR's, where you can do most of the accounting for hardware differences by looking at what registers you have and using macros provided by the core)

  2. No, as the support is provided by third party board definition packages like the ones I mentioned above; each of these maintain their own list of what they support, but I don't know of a centralized database.

Thank you DrAzzy!

I forgot to mention that I stumble upon MightyCore and MiniCore indeed. But I got the impression that was under development/testing not stable yet. And I don't want to mess with any of those project, just "play safe".

ATMega2561 would be the perfect fit. But as said beofre I don't want to have to change MCU in the middle of the development/production. And that's why I'll opt for the ATMega2560 unless you can confirm that it would work.

I would only need SD (FAT32) support, I2C (I guess that's the Wire lib) and not more than that (for now).

Does anyone have any experience with it (MightyCore)?

MCUDude’s cores are in pretty good shape, and are actively maintained. I think they’re ready to go.

I forgot to mention that I stumble upon MightyCore and MiniCore indeed. But I got the impression that was under development/testing not stable yet. And I don't want to mess with any of those project, just "play safe".

I'll consider MightyCore, MegaCore and MiniCore as stable and well tested. Where did you get the impression that they where not? :) As you might already understood; I'm the maintainer of all these 3rd party cores. I'm getting notified is someone opens an issue over at Github, and I try my best to resolve all issues. I have physical test hardware for all the microcontrollers my cores support, so chances are good that I'm able to help out with a possible hardware issue.

You're device will be just as stable and reliable as an Arduino UNO, no matter if you choose a MightyCore or MegaCore compatible microcontroller. Choose the microcontroller that fits your need the best ;)

Thank you both for your answers!

Hanisbull, yes I realized that you were the one maintaining them... The testers needed* was what make me think it is still in "testing".

Great news its stable! I'm a new follower then!

Thank you both for your advices! I'll keep in touch in the MightyCore support thread if I need assistance!