Pages: [1]   Go Down
Author Topic: mega32u2 with Leonardo  (Read 693 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

greetings
Michael
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
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.

greetings
Michael
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: