Go Down

Topic: Burning Arduino to ATmega32A (Read 35527 times) previous topic - next topic

vishalvcp

hello friends i am using arduino1.6.8 version and trying to program atmega32a using usbasp, i tried to blink on each port pin, in these few port pin blinks( i am using openharware board atmega16) but few port pins dont work, i ried same program on proteus and it works fine there. i read some articles and i found that maybe that open hardware board is for atmega32 not atmega32a but i am not sure please help me out

pert

The ATmega32 and ATmega32A have the same pinout and IO configuration. The only differences I'm aware of are the operating voltage and power consumption specs(see datasheets for details).

Which hardware definitions are you using? I recommend MightyCore(https://github.com/MCUdude/MightyCore). It supports ATmega32 as well as a bunch of other parts. It doesn't specifically support ATmega32A but that's fine because ATmega32 and 32A have the same signature. I've tried it with an ATmega32A and it works fine. The only problem you'll encounter with using it is if you have some code that relies on the __AVR_ATmega32A__ macro since the __AVR_ATmega32__ macro will be defined instead.

hansibull

There's no difference between the ATmega32 and the ATmega32A except the operating voltage current draw and a few minor things. Have a look at the AVR521 document for more info. I've done all the MightyCore testing on an ATmega32A.

Quote
The only problem you'll encounter with using it is if you have some code that relies on the __AVR_ATmega32A__ macro since the __AVR_ATmega32__ macro will be defined instead.
Actually, I've no idea where the __AVR_megaXX__ is located. I've curious to find out if there even exist such a definition as __AVR_ATmega32A__. When I developed this core I used this device signature list to make sure all variants was included. Note that the ATmega324A, P and PA all have different device signatures! That's why I've included all three options in the boards manager menu ;)
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

pert

#33
Aug 26, 2016, 09:45 pm Last Edit: Aug 26, 2016, 10:05 pm by pert
Actually, I've no idea where the __AVR_megaXX__ is located.
I did a search of the Arduino AVR Boards tools folder and only found in hardware/tools/avr/lib/gcc/avr/4.9.2/device-specs/specs-atmega32a lines 93-94:
Code: [Select]
*cpp:
 -D__AVR_ATmega32A__ -D__AVR_DEVICE_NAME__=atmega32a


I've curious to find out if there even exist such a definition as __AVR_ATmega32A__.
If you make a boards.txt entry with the line build.mcu=atmega32a the macro will indeed be defined. Unfortunately there's no entry for it in avrdude.conf so you have to add one and deal with the hassle of a custom programmer for upload.

When I developed this core I used this device signature list to make sure all variants was included.
I use this one http://www.atmel.com/webdoc/AVRLibcReferenceManual/using_tools_1using_avr_gcc_mach_opt.html, seems more official. Note that they do have __AVR_ATmega32A__ listed.

Go Up