0

I'm trying to install a bootloader on my ATmega328P-PU. I'm trying to install it from Arduino Uno (not original). I can install all sketches. After I click "Burn bootloader" I get the following error:

Arduino:1.6.11 (Windows 10), Board:"Arduino/Genuino Uno"

avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATmega328P is 1E 95 0F
 ***failed;  
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x3f
avrdude: verification error; content mismatch
Error while burning bootloader.

How to fix it?

1

EDIT: First ensure that you have made the hardware correctly (see comment below this post).

If you need different settings for custom avr hardware the following will help:-

The best way to create a custom board definition is to create your own boards.txt entry in the Arduino custom hardware folder.

But less effort to learn is to try to temporarily change or add to the Arduino IDE avr board definitions.

The board definition (properties) are passed to the tool that burns the bootloader. All board specific properties are provided by the boards.txt

Edit the [ArduinoIDE\Hardware\hardware\arduino\avr\boards.txt with a text editor and find the Uno section.

It looks like this. Notice the mcu, vid, pid and uno.bootloader.file= settings in particular. The bootloader points to a file in [ArduinoIDE\Hardware\hardware\arduino\avr

uno.name=Arduino/Genuino Uno

uno.vid.0=0x2341
uno.pid.0=0x0043
uno.vid.1=0x2341
uno.pid.1=0x0001
uno.vid.2=0x2A03
uno.pid.2=0x0043
uno.vid.3=0x2341
uno.pid.3=0x0243

uno.upload.tool=avrdude
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.maximum_data_size=2048
uno.upload.speed=115200

uno.bootloader.tool=avrdude
uno.bootloader.low_fuses=0xFF
uno.bootloader.high_fuses=0xDE
uno.bootloader.extended_fuses=0x05
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.bootloader.file=optiboot/optiboot_atmega328.hex

uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.board=AVR_UNO
uno.build.core=arduino
uno.build.variant=standard

You can add a new entry like this. The example uses a board prefix of uno2. but it can be any simple unique name.

Save the changes to boards.txt then restart the Ide:-

uno2.name=Arduino ATmega328P-PU

uno2.vid.0=0x2341
uno2.pid.0=0x0043
uno2.vid.1=0x2341
uno2.pid.1=0x0001
uno2.vid.2=0x2A03
uno2.pid.2=0x0043
uno2.vid.3=0x2341
uno2.pid.3=0x0243

uno2.upload.tool=avrdude
uno2.upload.protocol=arduino
uno2.upload.maximum_size=32256
uno2.upload.maximum_data_size=2048
uno2.upload.speed=115200

uno2.bootloader.tool=avrdude
uno2.bootloader.low_fuses=0xFF
uno2.bootloader.high_fuses=0xDE
uno2.bootloader.extended_fuses=0x05
uno2.bootloader.unlock_bits=0x3F
uno2.bootloader.lock_bits=0x0F
uno2.bootloader.file=optiboot/optiboot_atmega328.hex

uno2.build.mcu=atmega328p
uno2.build.f_cpu=16000000L
uno2.build.board=AVR_UNO
uno2.build.core=arduino
uno2.build.variant=standard

note: make a copy of the .txt or grab a new one from the zip on arduino.cc if you mess it up.

  • Fixed! :D I must use 22pf condensator to quartz – mikigal Sep 3 '16 at 21:19
  • Okay good. I think I should leave the answer because if anyone else has working hardware but needs slightly different boot loader settings for a different board it is useful. What do you think? I'll edit it to mention ensuring the hardware works first. – Visual Micro Sep 4 '16 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.