# Standard Fuse Settings for 16Mhz ATMega328p

**URL:** <https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962>\
**Category:** 3rd Party Boards\
**Created:** [September 6, 2011, 8:05pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962 "2011-09-06T20:05:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 6, 2011, 8:05pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/1 "2011-09-06T20:05:29Z")

</div>

I've finally got myself a virgin ATMega328p and without uploading a bootloader, I've uploaded a simple variation of Blink and thought it was broken until I realised that because I hadn't set the fuses, the MCU was just using internal clock and running at 1MHz intead of 16MHz (I've included a crystal on my board).

So I'm thinking that if I set my fuses to the same as my ATMega328p Uno then I should be OK.

But I can't find what the bytes should be - could someone tell me please (I've given up trying to read them out from my Uno ☹ )

And of course, if the fuses should be different for a non-bootloader 16Mhz crystal clocked ATMega328p than my Uno, could I have those instead 🙂

regards  
Simon

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [September 6, 2011, 8:08pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/2 "2011-09-06T20:08:51Z")

</div>

I had exactly the same issue when I programmed my first 328! You can work out the fuse settings you need at [http://www.engbedded.com/fusecalc](http://www.engbedded.com/fusecalc).

PS - If you just want the same ones as used in a standard Arduino, you can find them in the boards.txt file:

uno.bootloader.low\_fuses=0xff  
uno.bootloader.high\_fuses=0xde  
uno.bootloader.extended\_fuses=0x05

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 6, 2011, 8:32pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/3 "2011-09-06T20:32:21Z")

</div>

> boards.txt

Ta 🙂  
I used the values in there and used my little USBasp programmer with

```arduino
avrdude -c usbasp -p m328p -C ../etc/avrdude.conf -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m

```

and my project imeidiately started running at the correct speed 🙂

Simon

---

<div class="post-metadata">

**Author:** ![floresta](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/floresta/32/213547_2.png) [@floresta](https://forum.arduino.cc/u/floresta)\
**Post date:** [September 7, 2011, 3:08am UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/4 "2011-09-07T03:08:17Z")

</div>

How about these:

Fuse calculator: [http://www.engbedded.com/fusecalc/](http://www.engbedded.com/fusecalc/)  
Arduino Default Fuses: [http://www.codingwithcody.com/2011/04/arduino-default-fuse-settings/](http://www.codingwithcody.com/2011/04/arduino-default-fuse-settings/)

Don

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 23, 2012, 11:34pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/5 "2012-06-23T23:34:37Z")

</div>

Hi,

These setting did it for me too... 16mhz atmega328p.

lfuse = 0xff  
hfuse = 0xde  
efuse = 0x05

Thanks.

---

<div class="post-metadata">

**Author:** ![floresta](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/floresta/32/213547_2.png) [@floresta](https://forum.arduino.cc/u/floresta)\
**Post date:** [June 24, 2012, 2:47am UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/6 "2012-06-24T02:47:39Z")

</div>

Have you heard of the phrase "a day late and a dollar short" out there in zeroland?

What has this post (to a stale thread) added that wasn't already said in the very first reply?

Don

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 29, 2012, 7:00pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/7 "2012-10-29T19:00:58Z")

</div>

> dc42:  
> I had exactly the same issue when I programmed my first 328! You can work out the fuse settings you need at [http://www.engbedded.com/fusecalc](http://www.engbedded.com/fusecalc).
> 
> PS - If you just want the same ones as used in a standard Arduino, you can find them in the boards.txt file:
> 
> uno.bootloader.low\_fuses=0xff  
> uno.bootloader.high\_fuses=0xde  
> uno.bootloader.extended\_fuses=0x05

Hi dc42.

I am getting similar issues as this with a 328p-au..  
I've tried alsorts but am a bit stuck:

[http://arduino.cc/forum/index.php/topic,129740.0.html](http://arduino.cc/forum/index.php/topic,129740.0.html)

Any ideas?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![floresta](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/floresta/32/213547_2.png) [@floresta](https://forum.arduino.cc/u/floresta)\
**Post date:** [October 29, 2012, 7:54pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/8 "2012-10-29T19:54:57Z")

</div>

> I've tried alsorts but am a bit stuck:

Have you tried either the default values or the values recommended in this thread?

Don

---

<div class="post-metadata">

**Author:** ![udoklein](https://avatars.discourse-cdn.com/v4/letter/u/439d5e/32.png) [@udoklein](https://forum.arduino.cc/u/udoklein)\
**Post date:** [October 29, 2012, 9:39pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/9 "2012-10-29T21:39:16Z")

</div>

When I use the Arduino IDE to flash the bootloader it always sets the proper fuses without any interaction on my behalf.

---

<div class="post-metadata">

**Author:** ![CrossRoads](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/crossroads/32/214033_2.png) [@CrossRoads](https://forum.arduino.cc/u/CrossRoads)\
**Post date:** [October 30, 2012, 12:53am UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/10 "2012-10-30T00:53:31Z")

</div>

I've been doing the same - burn a Uno bootloader to set the fuses.Then upload my sketch via File :Upload Using programmer.

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [October 30, 2012, 8:27am UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/11 "2012-10-30T08:27:15Z")

</div>

> clivemist:  
> Hi dc42.
> 
> I am getting similar issues as this with a 328p-au..  
> I've tried alsorts but am a bit stuck:
> 
> [http://arduino.cc/forum/index.php/topic,129740.0.html](http://arduino.cc/forum/index.php/topic,129740.0.html)
> 
> Any ideas?
> 
> Thanks in advance.

Looking at your post #7 in that thread, you are setting the baud rate to 300 on the mcu but then you have to set the PC to 2400 to communicate with it. So the UART in the mcu is running 8x faster than it should be. This isn't a problem with the CLKSEL fuse bit, that would cause the mcu to run 8x slower instead.

Are you sure that you have F\_CPU set correctly in the boards.txt file you are using? Do you also find that delay and delayMicroseconds calls also execute 8x faster than they should?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 5, 2012, 10:45pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/12 "2012-11-05T22:45:10Z")

</div>

> dc42:
> 
> > clivemist:  
> > Hi dc42.
> > 
> > I am getting similar issues as this with a 328p-au..  
> > I've tried alsorts but am a bit stuck:
> > 
> > [http://arduino.cc/forum/index.php/topic,129740.0.html](http://arduino.cc/forum/index.php/topic,129740.0.html)
> > 
> > Any ideas?
> > 
> > Thanks in advance.
> 
> Looking at your post #7 in that thread, you are setting the baud rate to 300 on the mcu but then you have to set the PC to 2400 to communicate with it. So the UART in the mcu is running 8x faster than it should be. This isn't a problem with the CLKSEL fuse bit, that would cause the mcu to run 8x slower instead.
> 
> Are you sure that you have F\_CPU set correctly in the boards.txt file you are using? Do you also find that delay and delayMicroseconds calls also execute 8x faster than they should?

Thanks for getting back to me Don.

From using the calculator I managed to get the baud correct with:

lfuse:w:0x77:m  
(I know this is probably incorrect).  
..and from messing about trying to set the fuses again I am back to the same issue of the baud reading out incorrectly and chasing my tail..

The board.txt is set to:

* * *

##############################################################

uno.name=Arduino Uno

uno.upload.protocol=arduino

uno.upload.maximum\_size=32256

uno.upload.speed=115200

uno.bootloader.low\_fuses=0xff

uno.bootloader.high\_fuses=0xde  
uno.bootloader.extended\_fuses=0x05  
uno.bootloader.path=optiboot  
uno.bootloader.file=optiboot\_atmega328.hex  
uno.bootloader.unlock\_bits=0x3F  
uno.bootloader.lock\_bits=0x0F  
uno.build.mcu=atmega328p  
uno.build.f\_cpu=16000000L  
uno.build.core=arduino  
uno.build.variant=standard

* * *

The following worked when I had the baud reading at the correct rate:

- IDE does not upload
- AVRDude upload via Arduino ISP works
- Upload in IDE via Arduino ISP works
- Serial feedback (TX-RX loop) works [328 bypassed]
- Serial feedback via 328P works
- Holding reset at various times before/during/on upload no dice
- f\_cpu=16000000L

I've double checked all my schematics, including the pull down 1k, 100nf cap between the 8u2 and the reset on the 328P-AU.  
I have also removed and resoldered these components.

Could this be an issue with the 8u2?  
I have managed to run the DFU many times with the same code I uploaded on to my R3 and this still uploads and works.

Thanks in advance for any suggestions!

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [November 5, 2012, 11:00pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/13 "2012-11-05T23:00:38Z")

</div>

So do delay() calls in sketches you upload delay for the correct amount of time or not?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 5, 2012, 11:08pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/14 "2012-11-05T23:08:44Z")

</div>

> dc42:  
> So do delay() calls in sketches you upload delay for the correct amount of time or not?

Sorry, got my last post incorrect..

A delay(1000) posts at roughly 1 second. However the baud is mismatched.

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [November 5, 2012, 11:10pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/15 "2012-11-05T23:10:11Z")

</div>

> clivemist:
> 
> > dc42:  
> > So do delay() calls in sketches you upload delay for the correct amount of time or not?
> 
> If you mean in a main body of code, they are not, also my baud is mismatching again..

Do they take too long? or not enough time? By what factor are they wrong?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 5, 2012, 11:14pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/16 "2012-11-05T23:14:49Z")

</div>

> dc42:
> 
> > clivemist:
> > 
> > > dc42:  
> > > So do delay() calls in sketches you upload delay for the correct amount of time or not?
> > 
> > If you mean in a main body of code, they are not, also my baud is mismatching again..
> 
> Do they take too long? or not enough time? By what factor are they wrong?

Sorry, I tried that again.

A delay(1000) posts roughly every second. The baud is mismatched..

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [November 5, 2012, 11:22pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/17 "2012-11-05T23:22:35Z")

</div>

Is the baud rate mismatched only when you are uploading a program through the bootloader, or it is also mismatched when you do a Serial.begin followed by a Serial.print ?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 5, 2012, 11:30pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/18 "2012-11-05T23:30:56Z")

</div>

My head is spinning a little so please excuse me if I have missunderstood you here, but..

This is the sketch I am using:

* * *

void setup()  
{  
Serial.begin(300);

## void loop() { Serial.println("Hello world!"); delay(1000); }

When I bring up the serial monitor it posts at baud 2400 every second.

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [November 5, 2012, 11:45pm UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/19 "2012-11-05T23:45:19Z")

</div>

In summary:

1. Delay calls execute in the correct amount of time. So the clock is almost certainly running at the right speed.

2. To communicate with the serial port of the device, you have to set the PC to a baud rate 8x higher than the device is supposedly set to.

Therefore, either the PC software is at fault and is running at a baud rate 8x lower than you ask for, or the UART in your 328p-au is running at a baud rate 8x higher than you ask for. Can you connect to a standard Arduino at 2400 baud using the same board setting, to verify that the PC software is operating correctly?

---

<div class="post-metadata">

**Author:** ![dc42](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dc42/32/214539_2.png) [@dc42](https://forum.arduino.cc/u/dc42)\
**Post date:** [November 6, 2012, 12:11am UTC](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962/20 "2012-11-06T00:11:18Z")

</div>

I've just tried to communicate with my Arduino Uno at 300 baud, and it doesn't work. It works at higher baud rates. Maybe a bug in the Arduino software? Try a higher baud rate.

You might also like to upload the following sketch to see what the UART baud rate divisor is set to:

```cpp
void setup()
{
  Serial.begin(2400);
}

void loop()
{
  Serial.print((int)UBRR0H, HEX);
  Serial.write(',');
  Serial.print((int)UBRR0L, HEX);
  Serial.write(',');
  Serial.println((int)UCSR0A, HEX);
  delay(1000);
}

```

[Next page](https://forum.arduino.cc/t/standard-fuse-settings-for-16mhz-atmega328p/70962.md?page=2)
