2

For now, I'm using an Arduino Uno alone including its 328p (no other external chip to program).

I would like to change its fuses to internal 8 Mhz clock (because then I'll move the 328p out of the Arduino Uno), and for simplicity I'd like to do it from Arduino IDE.

Here is what I tried:

  • I created a new entry in boards.txt copy-pasted from Uno, fuses modified, like this:

    atmega328p.name=Atmega328p
    atmega328p.upload.tool=avrdude
    atmega328p.upload.protocol=arduino
    atmega328p.upload.maximum_size=32256
    atmega328p.upload.maximum_data_size=2048
    atmega328p.upload.speed=115200
    
    atmega328p.bootloader.tool=avrdude
    atmega328p.bootloader.low_fuses=0x62
    atmega328p.bootloader.high_fuses=0xD9
    atmega328p.bootloader.extended_fuses=0xFF
    atmega328p.bootloader.unlock_bits=0x3F
    atmega328p.bootloader.lock_bits=0x0F
    atmega328p.bootloader.file=optiboot/optiboot_atmega328.hex
    
    atmega328p.build.mcu=atmega328p
    atmega328p.build.f_cpu=8000000L
    atmega328p.build.board=AVR_UNO
    atmega328p.build.core=arduino
    atmega328p.build.variant=standard
    
  • I selected this board in Tools > Board: Atmega328p

  • I tried to Upload any sketch (and not Upload with programmer since I have no other chip connected to the Arduino Uno), hoping it would modify the fuses during the (successful) Upload process.

I think it didn't work (when I move the 328p outside of the Uno it doesn't work).

How can I change the fuses for an Arduino Uno directly from Arduino IDE, to enable internal 8 Mhz clock?


PS: "Tools > Burn Bootloader" does not succeed, but I think this is normal, since there is just the Arduino Uno, and no other chip / nothing to use as a "Programmer":

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03

2

You need a programmer to burn fuses. If you have another arduino then you can use the Arduino as ISP example sketch in the IDE. You can't burn fuses just using the USB cable like you upload code with. The only reason that can talk to the chip at all is because there is another chip to convert it to serial and a bootloader on the 328P to allow it to upload code via serial.

  • Thank you for your answer. Just be sure: 1) is it really impossible for an Arduino Uno to change its own fuses ? – Basj Sep 21 at 7:35
  • 2) if I use a Nano as programmer (Arduino as ISP) to program the Uno, during which process will the fuses be modified? During "Burn bootloader" or during "Upload with programmer"? – Basj Sep 21 at 7:37
0

As mentioned in the other answer, it seems that it's not possible for an Arduino Uno to change its own fuses.

So here is how I did:

  • I used a Nano (loaded with "Arduino as ISP") as programmer for the Uno with this classical wiring (except that in my case, the left board, the programmer, is a Nano):

enter image description here

  • I added this to boards.txt (source here):

    ##############################################################
    atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
    atmega328bb.upload.protocol=arduino
    atmega328bb.upload.maximum_size=30720
    atmega328bb.upload.maximum_data_size=2048
    atmega328bb.upload.speed=57600
    atmega328bb.upload.tool=avrdude
    atmega328bb.bootloader.tool=arduino:avrdude
    atmega328bb.bootloader.low_fuses=0xE2
    atmega328bb.bootloader.high_fuses=0xDA
    atmega328bb.bootloader.extended_fuses=0x05
    atmega328bb.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
    atmega328bb.bootloader.unlock_bits=0x3F
    atmega328bb.bootloader.lock_bits=0x0F
    atmega328bb.build.mcu=atmega328p
    atmega328bb.build.f_cpu=8000000L
    atmega328bb.build.core=arduino
    atmega328bb.build.variant=standard
    atmega328bb.build.board=AVR_BARE
    
  • I used "Programmer: Arduino as ISP", then "Burn bootloader" then "Upload with programmer" with any sketch.

  • Then the fuses are programmed to Internal 8 Mhz, and we can take the ATmega328p out of the Uno and move it on a breadboard! Working now :)

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.