User Tools

Site Tools


arduino:atmega328p_arduinos_and_custom_fuse_settings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
arduino:atmega328p_arduinos_and_custom_fuse_settings [2020/01/04 02:44] – [Upload with programmer and test] mithatarduino:atmega328p_arduinos_and_custom_fuse_settings [2021/04/22 01:13] – [Where do I put new board specs?] mithat
Line 17: Line 17:
 ===== Four general questions ===== ===== Four general questions =====
  
-==== Where do I put new board specs? ====+==== 1. Where do I put new board specs? ====
  
 Specs for Arduino boards, including fuse bit settings, are found in various ''board.txt'' files, themselves found in various ''hardware'' folders. This can get a little confusing as there are number of these folders and files that you'll find on your computer. I'll try to go through the differences below. Specs for Arduino boards, including fuse bit settings, are found in various ''board.txt'' files, themselves found in various ''hardware'' folders. This can get a little confusing as there are number of these folders and files that you'll find on your computer. I'll try to go through the differences below.
Line 51: Line 51:
  
 So, until I'm advised this is a horrible idea, the way I recommended you add your own custom board descriptions is to create a folder called ''hardware'' in your Arduino sketches folder and add the needed files there. I walk through the details in the case study that follows. So, until I'm advised this is a horrible idea, the way I recommended you add your own custom board descriptions is to create a folder called ''hardware'' in your Arduino sketches folder and add the needed files there. I walk through the details in the case study that follows.
-==== How do I specify new board characteristics? ====+==== 2. How do I specify new board characteristics? ====
  
 There is a //lot// of arcane knowledge that applies to writing custom Arduino ''board.txt'' entries, and I haven't found a source that documents it thoroughly. So my best advice is to study the ''boards.txt'' found at <code>/path-where-you-installed-arduino/hardware/arduino/avr/</code> to get as familiar with the syntax. What interests us here are the entries for ''low_fuses'', ''high_fuses'', and ''extended_fuses'' (and to a certain extent ''unlock_bits'' and ''lock_bits''. There is a //lot// of arcane knowledge that applies to writing custom Arduino ''board.txt'' entries, and I haven't found a source that documents it thoroughly. So my best advice is to study the ''boards.txt'' found at <code>/path-where-you-installed-arduino/hardware/arduino/avr/</code> to get as familiar with the syntax. What interests us here are the entries for ''low_fuses'', ''high_fuses'', and ''extended_fuses'' (and to a certain extent ''unlock_bits'' and ''lock_bits''.
Line 58: Line 58:
  
  
-==== What specs do I want? ====+==== 3. What specs do I want? ====
  
 This article covers making a variant of an existing board where only the fuses have been changed. The relevant parameters in the ''boards.txt'' specs will have ''low_fuses'', ''high_fuses'', and ''extended_fuses'' in their names. The values associated with those parameters are hexadecimal. This article covers making a variant of an existing board where only the fuses have been changed. The relevant parameters in the ''boards.txt'' specs will have ''low_fuses'', ''high_fuses'', and ''extended_fuses'' in their names. The values associated with those parameters are hexadecimal.
Line 68: Line 68:
 There is one additional caveat here: You can only change fuses that are compatible with what the bootloader you plan to use will let you do. Again there isn't a lot of documentation here, so if you've done everything right but things still don't work, this might be the reason. The solution to this is to compile a custom bootloader, which is well beyond the scope of this piece. There is one additional caveat here: You can only change fuses that are compatible with what the bootloader you plan to use will let you do. Again there isn't a lot of documentation here, so if you've done everything right but things still don't work, this might be the reason. The solution to this is to compile a custom bootloader, which is well beyond the scope of this piece.
  
-==== How do I burn a bootloader? ====+==== 4. How do I burn a bootloader? ====
  
 This too is a pretty big topic, but the TL;DR is: hook up a programmer to your board, select the right board and programmer, then do a //Tools > Burn Bootloader//. This [[https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/all|Sparkfun tutorial]] is a good reference if you need more hand-holding. This too is a pretty big topic, but the TL;DR is: hook up a programmer to your board, select the right board and programmer, then do a //Tools > Burn Bootloader//. This [[https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/all|Sparkfun tutorial]] is a good reference if you need more hand-holding.
Line 270: Line 270:
 Confirm that the extended fuse is still ''0xFE''. Confirm that the extended fuse is still ''0xFE''.
  
-You can now connect the Pro Mini to a variable supply to see whether it works as expected below 2.7V. It may not work all the way down to 1.8V though, but because you're not using a bootloader, you won't run the risk of corrupting your program memory.+You can now connect the Pro Mini to a variable supply to see whether it works as expected below 2.7V. It may not work all the way down to 1.8V though, but because you're not using a bootloader, you won't run the risk of corrupting the program memory.
arduino/atmega328p_arduinos_and_custom_fuse_settings.txt · Last modified: 2021/04/22 01:37 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki