0

I am using Arduino IDE to program ATtiny84A connected to an Arduino Uno and Programmer set to Arduino as ISP.

I would like to modify low and high fuse bits for ATtiny84A.

As far I do not understand the process that happens after hitting Tools -> Burn Bootloader in the Arduino IDE. I know that fuses are burned because I can change clock speed or clock source by selecting desired options for my ATtiny84A and burning the bootloader, however I do not understand what values are used.

If I set my desired values in boards.txt and select them in the Tools menu and then Burn Bootloader, will the fuses be burned according to what values I entered?

  • yes they will be set – Juraj Jun 6 at 16:17
  • I always use this fuse-calulator (engbedded.com/fusecalc) to choose the options I want in my project. – Gerben Jun 6 at 18:04
  • 1
    On most Arduino boards, selecting "burn bootloader" will program the bootloader on the chip and set the fuses. But since the ATTiny series doesn't have a bootloader program, the "burn bootloader" has the effect of only setting the fuses. – Gerben Jun 6 at 18:06
0

Do you have a Programmer? A Programmer connects to SCK, MISO, MOSI, Reset, Power, Gnd to access memory (to load the Bootloader code) and to change the fuses.

I don't have the IDE on this computer, but I think boards.txt does include the High, Low, and Extended fuse bytes information that gets programmed when Burn Bootloader is selected.

The datasheet explains what all the bits in the bytes do. There are also online fuse byte calculators you can use.

http://ww1.microchip.com/downloads/en/DeviceDoc/doc8183.pdf

See Para 19.2:

The ATtiny24A/44A/84A have three fuse bytes. Table 19-3, Table 19-4 and Table 19-5 briefly describe the functionality of all the fuses and how they are mapped into the fuse bytes.

  • 1
    Yes, I use Arduino Uno as a programmer. That works fine. I can burn bootloaders with existing settings(that i have after installing attiny by David A. Mellis in the Boards Manager). I understand that I can calculate the values for fuse bytes and know what I want to change. The method of changing them is a bit unclear. I do not understand what happens. Is some bootloader compiled? How, from what? Or is 'burning bootloader' just writing those fuse bytes? I find instructions to use AVRdude utility from command line. Is it the same as changing boards.txt file and hitting burn bootloader? – Martynas Žiemys Jun 6 at 14:53
  • "but I think boards.txt does include the High, Low, and Extended fuse bytes information that gets programmed when Burn Bootloader is selected." If that is so, that would answer my question. I am unsure if those values are used when burning bootloader or do they just represent some bootloader that is somehow made and burnt so that Arduino IDE knows how to adjust itself for things like clock speeds and other stuff. I would like to be more certain before messing with the fuses. – Martynas Žiemys Jun 6 at 14:59
  • The bootloader .hex file is separate from the fuse bytes. As long as you don't disable the SPI Enable bit, or lock yourself by changing the Lock byte, you'll be able to change the fuses via a Programmer again. RSTDISBL and SPIEN, bits 7 and 5 in the High byte, are two that will prevent further changes, don't mess with them. – CrossRoads Jun 6 at 15:06
  • Choosing wrong clock can mess things up as well. OK, I'll just try it. – Martynas Žiemys Jun 6 at 16:01
  • That can mess up future serial downloads, but should not prevent loading via Programmer. – CrossRoads Jun 6 at 16:35

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.