Atmega32A programming with arduino

Hello!

I’m trying programming my atmega32A with my arduino uno and arduino ide 1.8.13 on linux mint. I found this Burning Arduino Bootloader to Atmega 32A-PU Using Arduino As ISP : 5 Steps - Instructables and the bootloader is burning but after i can’t upload any program to the Atmega32A. Anybody have a good guess what is the problem? I want to use with 16mhz external oscillator the chip, but it wrong with 8mhz internal settings too.

I checked the pins many times, not the christal and not the arduiono as an isp pinout is a problem.

Bootloader burning output:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/avrdude.conf"
         User configuration file is "/home/smv/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega32
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    10    64    0 no       1024    4      0  9000  9000 0xff 0xff
           flash         33     6    64    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9502 (probably m32)
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):


avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/avrdude.conf"
         User configuration file is "/home/smv/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "{bootloader.extended_fuses}"
avrdude: writing efuse (0 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 0 bytes of efuse written
avrdude: verifying efuse memory against {bootloader.extended_fuses}:
avrdude: load data efuse data from input file {bootloader.extended_fuses}:
avrdude: input file {bootloader.extended_fuses} contains 0 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 0 bytes of efuse verified
avrdude: reading input file "0xd6"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd6:
avrdude: load data hfuse data from input file 0xd6:
avrdude: input file 0xd6 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0b10111111"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0b10111111:
avrdude: load data lfuse data from input file 0b10111111:
avrdude: input file 0b10111111 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.

         AVR Part                      : ATmega32
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    10    64    0 no       1024    4      0  9000  9000 0xff 0xff
           flash         33     6    64    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9502 (probably m32)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/bootloaders/optiboot_flash/atmega32/optiboot_flash_atmega32_115200_16000000L.hex"
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against /home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/bootloaders/optiboot_flash/atmega32/optiboot_flash_atmega32_115200_16000000L.hex:
avrdude: load data flash data from input file /home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/bootloaders/optiboot_flash/atmega32/optiboot_flash_atmega32_115200_16000000L.hex:
avrdude: input file /home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/bootloaders/optiboot_flash/atmega32/optiboot_flash_atmega32_115200_16000000L.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: reading input file "0x0f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

But if i’m trying upload a sketch:

avrdude: Expected signature for ATmega32 is 1E 95 02
         Double check chip, or use -F to override this check.

I choose the good settings for the MightyCore so Atmega32, external 16Mhz, Bod 2.7v, Standard pinout, Arduino as isp programmer.

Thx you for your help!

Please post the full output. It should say which signature was detected. That information can be useful for identifying the problem.

A vázlat 1004 bájt (3%)-ot használ a program tárhelyből. A maximum 32256 bájt.
A globális változók 9 bájt (0%)-ot használnak a dinamikus memóriából, 2039 bájtot hagyva a helyi változóknak. A maximum 2048 bájt.
Hiba történt a vázlat feltöltése közben
avrdude: Expected signature for ATmega32 is 1E 95 02
         Double check chip, or use -F to override this check.

There is no more information about what is the detected signature. Can i found any more about this in any log file?

I order to gather more information that might help us to troubleshoot your problem, I’m going to ask you to post the full output from the upload when in verbose mode.

Please do this:

  1. Select File > Preferences from the Arduino IDE’s menus.
  2. Uncheck the checkbox next to Show verbose output during: compilation
  3. Check the checkbox next to Show verbose output during: upload.
  4. Click the OK button.
  5. Attempt an upload, as you did before.
  6. After the upload fails, you’ll see a button on the right side of the orange bar Copy error messages. Click that button. This copies the full output to the clipboard.
  7. Paste the copied upload output, using code tags as you have been (thanks!).

Thx!

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/smv/.arduino15/packages/MightyCore/hardware/avr/1.0.8/avrdude.conf"
         User configuration file is "/home/smv/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega32
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    10    64    0 no       1024    4      0  9000  9000 0xff 0xff
           flash         33     6    64    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Hiba történt a vázlat feltöltése közben
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATmega32 is 1E 95 02
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

I see this bootloader is for the Atmega328p but i dont understand, i selected the atmega32 from the boards and after clicked to burn button.

How do you have the ATmega32A connected to your computer?

Exactly like this
Burning Arduino Bootloader to Atmega 32A-PU Using Arduino As ISP : 5 Steps - Instructables

OK. I see they neglected to provide instructions for uploading in that tutorial. The problem is that you’re using the standard “Upload” process. With your current configuration of the board, that expects that you have a USB to serial adapter (AKA “FTDI”) connected to Arduino pins 0 and 1 on the ATmega32A. But you don’t have that. Instead, you have an Uno connected to the computer, so it’s trying to upload to the Uno. In this configuration, you can upload via the IDE’s Sketch > Upload Using Programmer.

However, MightyCore allows you to configure the board for even more convenient usage of the ATmega32A in this situation:

  1. Select Tools > Board > Bootloader > No bootloader from the Arduino IDE’s menus. This will do two things:
    • Configure the board definition to not reserve any space in the flash memory for a boot section. Since you aren’t using a bootloader, that would only be a waste of precious memory.
    • Configure the Arduino IDE so that the “Upload” button actually does an “Upload Using Programmer”. This is convenient.
  2. Tools > Burn Bootloader. This will set the fuses on the ATmega32A for no bootloader.

Now you can just click the “Upload” button to do an upload.

1 Like

Thx a lot, it works fine! You are awesome! :slight_smile:

You’re welcome. I’m glad to hear it’s working now. Enjoy!
Per