Go Down

Topic: mega32u2 with Leonardo (Read 2274 times) previous topic - next topic


I build a alternative Arduino Leonardo clone with the mega32u4.....

Everything works fine, but I like to replace the mega32u4 with a mega32u2, because I dont have only a small area on the PCB and the mega32u2 is cheaper.
The question is: Will the IDE load the program on a mega32u2 and do I have to expect any other incompatibility?



The Arduino IDE cannot compile sketches out of the box for the ATMEGA32u2.  Do not forget to check the datasheet as I believe the U2 is missing certain functionality compared to the U4.  One of the big things missing from the U2 is it has no ADC.

You would have to create a "core" and "pin map" for the U2 for the Arduino IDE to recognize the U2.  You would also need a compatible bootloader.

You could possibly borrow some of this from other projects such as http://www.mattairtech.com/index.php/development-boards/atmega32u2-usb-development-board-arduino-compatible.html


thank you for the link, it is a goo hint!
But the U2 have a ADC:

From the datasheet:
Port D serves as analog inputs to the analog comparator.



Sorry to dig up an old thread...

It is true the ATMega32u2 does have an analog comparator, but no analog to digital converter (ADC).  These features are completely different.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131