Traxxas TQ 1st gen: try 4
[DIY-Multiprotocol-TX-Module.git] / docs / Advanced_Manually_Setting_ATmega328_Fuses.md
blob75c24f47e5da8912ba5900063e62e1bf43cb27b6
1 # Manually Uploading HEX files and setting Fuses on ATmega328
4 **The .hex files provided are only for tests purpose. The recommended method is to use [Compiling and Programming](Compiling.md).**
6 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.
8 1. Follow this section: [Material you need to upload the firmware](Compiling.md#material-you-need-to-upload-the-firmware)
9 1. Follow this section: [Install the Arduino IDE](Compiling.md#install-the-arduino-ide-and-the-multiprotocol-project-firmware)
10 1. 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.
11 1. Install [AVR8 Burn-O-Mat](http://avr8-burn-o-mat.brischalle.de/avr8_burn_o_mat_avrdude_gui_en.php) which is available for all platforms. Installation instructions are on the software page (Don't forget to install [Java](http://java.sun.com/javase/downloads) as explained).
12 1. Launch AVR8 Burn-O-Mat.
13 1. You should now have a window which looks like this: <br> <img src="images/AVR8BurnOMat-main.png" />
14 1. 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: <br> <img src="images/AVR8BurnOMat-settings.png" />
15 1. Once done click on OK.
16 1. You are now done with all the installations/configuration and ready to program your Multi-module.
18 ## Fuse settings
19 The fuse settings have to be done only once for all.
21 Here are some fuse settings for common configurations:
23 Board|Extended Fuse (efuse)|High Fuse (hfuse)|Low Fuse (lfuse)
24 -----|--------|---------|-------------
25 Banggood 4-in-1 module |0xFD|0xD3|0xFF
26 Arduino Pro Mini |0xFD|0xD3|0xFF
27 DIY 2.3d PCB |0xFD|0xD3|0xFF
28 DIY 2.3d PCB with [custom mikeb bootloader](Advanced_ATmega_Serial_Uploader.md) |0xFD|0xD6|0xFF
29 Banggood 4-in-1 module with [custom mikeb bootloader](Advanced_ATmega_Serial_Uploader.md) |0xFD|0xD6|0xFF
31 If you don't know which one to take the 1st line is the one you want.
33 ### Burn the fuses
34 1. Follow this section: [Connect the programmer](Compiling.md#connect-the-programmer)
35 1. Launch AVR8 Burn-O-Mat.
36 1. In the **AVR type** drop down select **ATmega328P** and click on **Fuses**
37 1. In the **ATmega328P Fuses** window which just open click on read fuses.
38 1. Ignore the error "warning : Can not Set sck period . usbasp please check for firmware update .".
39 1. 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.
40 1. Set the 3 Fuse values <br> <img src="images/AVR8BurnOMat-fuses.png" />
41 1. Click on **apply**
42 1. Click on **write fuses**
43 1. Ignore the error "warning : Can not Set sck period . usbasp please check for firmware update .".
44 1. 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.
45 1. You are done with setting the Fuses and can close the **ATmega328P Fuses** window
47 ## Upload the firmware
48 1. Follow this section: [Connect the programmer](Compiling.md#connect-the-programmer)
49 1. Download the [latest release firmware](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases) you want to burn and store it in a knwon location
50 1. Launch AVR8 Burn-O-Mat.
51 1. In the **AVR type** drop down select **ATmega328P**
52 1. Under **Flash** select the file you've just downloaded
53 1. Under **Flash** click on **Write**
54 1. Ignore the error "warning : Can not Set sck period . usbasp please check for firmware update .".
55 1. 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.
56 1. You are done with uploading the firmware. Your module is ready to operate.