Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 4.11 KB

Advanced_Manually_Setting_ATmega328_Fuses.md

File metadata and controls

56 lines (46 loc) · 4.11 KB

Manually Uploading HEX files and setting Fuses on ATmega328

The .hex files provided are only for tests purpose. The recommended method is to use Compiling and Programming.

There are many different options to upload a .hex firmware file to the MULTI-Module and to set the correct fuses. This document outlines an approach that uses a USBASP programmer and which is equally compatible with OSX, Windows and Linux operating systems.

  1. Follow this section: Material you need to upload the firmware
  2. Follow this section: Install the Arduino IDE
  3. Make sure to write down the location of your installation since you need to know where avrdude is installed to configure the AVR8 Burn-O-Mat. For example on a default windows installation, avrdude.exe is located in "C:\Program Files (x86)\Arduino\hardware\tools\avr\bin" where "C:\Program Files (x86)\Arduino" is the installation path.
  4. Install AVR8 Burn-O-Mat which is available for all platforms. Installation instructions are on the software page (Don't forget to install Java as explained).
  5. Launch AVR8 Burn-O-Mat.
  6. You should now have a window which looks like this:
  7. Click on Settings->AVRDUDE and fill in the details about avrdude location using the installation path written previously as well as selecting USBASP for the programmer:
  8. Once done click on OK.
  9. You are now done with all the installations/configuration and ready to program your Multi-module.

Fuse settings

The fuse settings have to be done only once for all.

Here are some fuse settings for common configurations:

Board Extended Fuse (efuse) High Fuse (hfuse) Low Fuse (lfuse)
Banggood 4-in-1 module 0xFD 0xD3 0xFF
Arduino Pro Mini 0xFD 0xD3 0xFF
DIY 2.3d PCB 0xFD 0xD3 0xFF
DIY 2.3d PCB with custom mikeb bootloader 0xFD 0xD6 0xFF
Banggood 4-in-1 module with custom mikeb bootloader 0xFD 0xD6 0xFF

If you don't know which one to take the 1st line is the one you want.

Burn the fuses

  1. Follow this section: Connect the programmer
  2. Launch AVR8 Burn-O-Mat.
  3. In the AVR type drop down select ATmega328P and click on Fuses
  4. In the ATmega328P Fuses window which just open click on read fuses.
  5. Ignore the error "warning : Can not Set sck period . usbasp please check for firmware update .".
  6. If you get an error there is something wrong with your connections, your programmer, or your board. Verify everything and go back to the 1st bullet point.
  7. Set the 3 Fuse values
  8. Click on apply
  9. Click on write fuses
  10. Ignore the error "warning : Can not Set sck period . usbasp please check for firmware update .".
  11. If you get an error there is something wrong with your connections, your programmer, or your board. Verify everything and go back to the 1st bullet point.
  12. You are done with setting the Fuses and can close the ATmega328P Fuses window

Upload the firmware

  1. Follow this section: Connect the programmer
  2. Download the latest release firmware you want to burn and store it in a knwon location
  3. Launch AVR8 Burn-O-Mat.
  4. In the AVR type drop down select ATmega328P
  5. Under Flash select the file you've just downloaded
  6. Under Flash click on Write
  7. Ignore the error "warning : Can not Set sck period . usbasp please check for firmware update .".
  8. If you get an error there is something wrong with your connections, your programmer, or your board. Verify everything and go back to the 1st bullet point.
  9. You are done with uploading the firmware. Your module is ready to operate.