From 722abf9cab380d44377f7ace6c026e7130e7507f Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 06:13:16 -0400 Subject: [PATCH 1/8] Update Transmitters.md --- docs/Transmitters.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/Transmitters.md b/docs/Transmitters.md index 0e4840c..0bdabd2 100644 --- a/docs/Transmitters.md +++ b/docs/Transmitters.md @@ -32,13 +32,7 @@ Transmitters that run er9X, erSky9X or OpenTx firmwares (like the FrSky Taranis, -This serial protocol does not require any hardware modifications, but **will** require updating the firmware on your radio. - -To enable serial telemetry **may** require modifications to your Tx. See the table below. - -Transmitters and firmware combinations that support the Serial protocol are: - - +This serial protocol does not require any hardware modifications, but **will** require updating the firmware on your radio. Transmitters and firmware combinations that support the Serial protocol are shown in the table below. Also shown are telemetry considerations that will be discussed next. Transmitter|Firmware Options|Telemetry Enabled :----------|:---------------|:---------------- @@ -53,6 +47,15 @@ Transmitter|Firmware Options|Telemetry Enabled Click on your transmitter above to view specific setup instructions. + +##Telemetry + +To enable serial telemetry you need one of the radios and firmwares listed in the table above and **may** require modifications to your Tx. See the table above. Before attempting telemetry check the following: + +1. Your module has the appropriate connections or solder jumpers to connect the TX pin of the MCU to pin 5 on the module. Check the documentation by selecting your module on this [page](Hardware.md) and reviewing the Telemetry section +1. You have the correct firmware to allow serial communcation between the transmitter and the MULTI-Module. Check the table above. +1. Your transmitter hardware is telemetry enabled, or you have done the required mods. Check the table above. + ##Optional Telemetry mod for 9X/R TH9X transmitters The telemetry mod for these transmitters has evolved. The original and popular "FrSky Telemetry Mod" requires 2 pins on the transmitter module board to be modified (RX on pin 5 and TX on pin 2). All the recent MULTI-Module hardware options supports serial transmission on pin 1 (the same pin as the PPM signal) so, in this case, only the mod on pin 5 is required. From 2eb2d555ad55b281c4c8145c39558b02a5039daa Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 06:14:22 -0400 Subject: [PATCH 2/8] Update Module_BG_4-in-1.md --- docs/Module_BG_4-in-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Module_BG_4-in-1.md b/docs/Module_BG_4-in-1.md index 04f1f95..f60bf9b 100644 --- a/docs/Module_BG_4-in-1.md +++ b/docs/Module_BG_4-in-1.md @@ -25,7 +25,7 @@ The assembly process is trivial but it does depend on: ###PPM interface If you are only planning on using the PPM interface with transmitter you are ready to program the module as described in Compiling and Programming the module. -###Enabling Serial interface +###Enabling Serial and Telemetry interface If you have a transmitter that can support serial communication with the board then you need to wire up the board appropriately. There are two versions of the module and the steps are slightly different. Check which module you have and based on the pictures below. If you purchased the module after June 2016 then it is likely that you have V2 module. From 34036ee3558e2b57c6ac994fd6265855c09493dc Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 06:17:49 -0400 Subject: [PATCH 3/8] Update Module_Build_yourself_PCB.md --- docs/Module_Build_yourself_PCB.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Module_Build_yourself_PCB.md b/docs/Module_Build_yourself_PCB.md index 81d71dc..43e7905 100644 --- a/docs/Module_Build_yourself_PCB.md +++ b/docs/Module_Build_yourself_PCB.md @@ -53,7 +53,7 @@ If you got this far you already know what you are doing!! ###PPM interface If you are only planning on using the PPM interface with transmitter you are ready to program the module as described in Compiling and Programming the module. -###Enabling Serial interface +###Enabling Serial and Telemetry interface If you have a transmitter that can support serial communication with the board then you need to solder some jumpers. @@ -69,7 +69,7 @@ There are four solder type jumpers on the bottom side of the board near the lowe (J-4) Use (MOD) only to connect the transmitter pin 2 to pin 1 of the two pin header (P3). -**It is most likely J-2 will be the only one needing to be shorted for the serial method of sending model protocols.** +**It is most likely J-2 will be the only one needing to be shorted for the serial method of sending model protocols. If you plan to use telemetry you will also need to solder J-3** You are now ready to go over to [Compiling and Programming](Compiling.md). From 22206b6a994d1e67d347fe60770402cbdbfafc18 Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 06:21:16 -0400 Subject: [PATCH 4/8] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ee689bf..e9ea94d 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,13 @@ The source code is partly based on the [Deviation TX project](http://www.deviati ## Outline of the documentation 1. Introduction (this page) 1. [Available protocols](Protocols_Details.md) -1. [Compatible Transmitters](docs/Transmitters.md) +1. [Transmitters and serial/telemetry options](docs/Transmitters.md) 1. [Module Hardware options](docs/Hardware.md) 1. [Compiling and programming the module (ATmega328)](docs/Compiling.md) and [Compiling STM32](docs/Compiling_STM32.md). 1. [Transmitter Setup](docs/Transmitters.md) - [Taranis](docs/Tx-Taranis.md) - [FlySky TH9X, Turnigy 9X/R](docs/Tx-FlyskyTH9X.md) - [erSky Transmitters](docs/Tx-erSky9X.md) -1. [Overview of Telemetry options and capabilities](docs/Telemetry.md) 1. [How to for popular models](docs/Models.md) 1. [Troubleshooting](docs/Troubleshooting.md) 2. [Advanced Topics (not for the fainthearted!)](docs/Advanced_Topics.md) From fa7efeb283902fd34e3cb0d3616807960d6a6e6f Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 06:25:46 -0400 Subject: [PATCH 5/8] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e9ea94d..1da9dc4 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,8 @@ If you are the owner of a transmitter that supports the er9X/erSky9X or OpenTX f #How to get started? 1. Browse the [Protocols](Protocols_Details.md) page to see which protocols you would like on your module 1. Go to the [Hardware Options](docs/Hardware.md) page to decide which of the MULTI-Module hardware options appeals to you and which RF modules you plan to integrate -1. Once you have your module, you should go to [Compiling and Programming](docs/Compiling.md) page to download, compile and program your MULTI-Module +1. Once you have your module, you should review what jumper settings or modifications are required to the module to support serial communication and possibly telemetry +1. Go to [Compiling and Programming](docs/Compiling.md) page to download, compile and program your MULTI-Module 1. Finally, you should visit the setup page for your transmitter by clicking on the link corressponding to your Tx on the [Transmitters](docs/Transmitters.md) page to configure the last few settings before you can fly to your heart’s content!!!!! # Troubleshooting From 998f9491f6487a2b925fa93bb373f556797e4bbc Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 07:06:43 -0400 Subject: [PATCH 6/8] Update Advanced_Manually_Setting_ATmega328_Fuses.md --- ...vanced_Manually_Setting_ATmega328_Fuses.md | 65 ++++++++++++++----- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/docs/Advanced_Manually_Setting_ATmega328_Fuses.md b/docs/Advanced_Manually_Setting_ATmega328_Fuses.md index 4f9a913..5e6fa95 100644 --- a/docs/Advanced_Manually_Setting_ATmega328_Fuses.md +++ b/docs/Advanced_Manually_Setting_ATmega328_Fuses.md @@ -1,7 +1,20 @@ -#Manually Setting ATmega328 Fuses +#Manually Uploading HEX files and setting ATmega328 Fuses + +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. It does this by using the uploading capabilities bundled in the Arduino IDE package. There are five steps to the process: + +1. Finding the location of the AVRdude uploader and the uploading command +2. Modifying the uploading command to create three commands: + - Verify the connection and current fuse settings + - Upload your .hex file + - Set your fuses +2. Verify +1. Uploading your firmware +1. Setting your fuses + + -To understand fuses refer to the ATmega328P datasheet (See Section 28.3 Fuse Bits) ## Fuse settings +To understand fuses refer to the ATmega328P datasheet (See Section 28.3 Fuse Bits) Here are some fuse settings for common configurations: Board|Low Fuse|High Fuse|Extended Fuse @@ -13,43 +26,65 @@ Banggood 4-in-1 module without bootloader |0xFF|0xD3|0xFD Banggood 4-in-1 module with [custom mikeb bootloader](Advanced_ATmega_Serial_Uploader.md) |0xFF|0xD6|0xFD -##Determining the location of the avrdude program -The Arduino IDE is used to upload firmware and set fuses on the ATMega microprocessor. +## Step 1. Determining the location of the avrdude program +The AVRdude software is commonly used to upload firmware and set fuses on the ATMega microprocessor. You can install avrdude on your computer, but it is already contained in the Arduino IDE bundle and we suggest that you use the Arduino-bundled version. 1. Unplug any programmer that may be connected to the computer -1. In the Arduino IDE click on Sketch -> Upload Using Programmer +1. In the Arduino IDE Tools -> Board and select the Arduino Pro Mini board +1. Then click on Sketch -> Upload Using Programmer 1. After a series of compiling messages you will see an error that a programmer is not found. Scroll up and find the programming command that caused the errors (usually the last white line before the red errors) and copy it into TextEdit or Notepad. -1. This is your programming command. You can use it to manually upload the latest .hex file compiled by the Arduino IDE "Verify" button, and it should look something like this: +1. This is the command we will be modifying to verify, program and set fuses. + +It should look something like this: **Mac:** - -> ``` > /Applications/Arduino.app/Contents/Java/hardware/tools /avr/bin/avrdude -C/Applications/Arduino.app/Contents/ Java/hardware/tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:{this part will be unique to your system} /Multiprotocol.ino.hex:i -> ``` **PC:** - -> ``` > C:\Program Files (x86)\Arduino\Contents\Java\hardware\tools\ avr\bin\avrdude -CC:\Program Files (x86)\Arduino\Contents\Java\ hardware\tools\avr\etc\avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:{this part will be unique on your system}\ Multiprotocol.ino.hex:i -> ``` +## Step 2. Modifying the command + +### Verify commnad Select all the text up to the ```-Uflash ``` command, copy it and paste it into a new line and add a “-v” (without the "") at the end of the line. This is your “verify” command and it should look something like this: -> ``` > /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/ tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -v -> ``` +### Program command +Select all the text up to and including the ```-Uflash:w: ```, copy it and paste it into a new line. Add the full name of the .hex firmware file you wish to upload, including the ".hex" suffix, and at the end add a ":i". There should be no spaces before or after the file name. + +This is your “program” command and it should look something like this: + +> /Applications/Arduino.app/Contents/Java/hardware/tools /avr/bin/avrdude -C/Applications/Arduino.app/Contents/ Java/hardware/tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:**Multiprotocol.ino.hex**:i We will be using the command line to program the module. -1. It is good practice to check on the connection with the board before you program fuses. Paste the "verify" command from above into a command line terminal. It should retun with messages that indicate an ATmega328p was successfully found and it should return the current fuse settings. +## STEP 3: Verify + +Check that your USBASP programmer is set to 3.3.V (make 100% certain or you will blow all your RF modules). Plug your USBASP into your computer and connect it to the ISP pins on your MULTI-Module. + +Open a terminal or command window and change to the directory where your .hex file is located + +Copy and past the "verify" command from above into the terminal and press enter. You should see an output that looks something like this. Confirm that a connection has been made with the MCU. It may be important to note and record the fuse settings and compare them with the table above. + +Once you have established that the programmer is connecting correctly move on to the programming step. + +## STEP 4: Program + +Copy and past the "program" command from above into the terminal and press enter. You should see an output shows that the correct board has been identified and progress uploading the firmware. + +If this completes successfully you have flashed the new firmware onto the board. + +## STEP 5: Set Fuses + +1. It is always good practice to check on the connection with the board before you program fuses. This is the one step that could "brick" your MCU. Paste the "verify" command from above into a command line terminal. It should retun with messages that indicate an ATmega328p was successfully found and it should return the current fuse settings. 1. To program the Low Fuse to 0xFF (for example) copy the “verify” command and paste it into the shell add the following text to the end of the line ```-U lfuse:w:0xFF:m ``` . Press Enter. ** Note: If you want a different fuse setting, change the 0xFF with the hexadecimal value of the low fuse setting. ** 1. To program the Extended Fuse to 0xFD (for example) copy the “verify” command and paste it into the shell add the following text to the end of the line ```-U efuse:w:0xFD:m ``` . Press Enter. ** Note: If you want a different fuse setting, change the 0xFD with the hexadecimal value of the extended fuse setting. ** 1. There are two options for the High fuse. From 6d4452bf949f656c1cf0f62d3da5bd654dc5c8fe Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 07:08:44 -0400 Subject: [PATCH 7/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1da9dc4..7921e8c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The **Multiprotocol Tx Module** (or **MULTI-Module**) is a 2.4GHz transmitter mo The source code is partly based on the [Deviation TX project](http://www.deviationtx.com), thanks to all the developers for their great job on protocols. ## Quicklinks -* [Download latest releases of the firmware](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases) +* [Download latest releases of the firmware](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases) and [instructions to upload .hex files](docs/Advanced_Manually_Setting_ATmega328_Fuses.md) * [Forum on rcroups](http://www.rcgroups.com/forums/showthread.php?t=2165676) * [Available Protocols list](Protocols_Details.md) * [The old documentation](docs/README-old.md) From 5e2ba192c153bf0f8f7c37885ee74ccfdcc97b90 Mon Sep 17 00:00:00 2001 From: gerrievanzyl Date: Sat, 22 Oct 2016 07:11:48 -0400 Subject: [PATCH 8/8] Update Compiling.md --- docs/Compiling.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Compiling.md b/docs/Compiling.md index 3422f18..4c4889f 100644 --- a/docs/Compiling.md +++ b/docs/Compiling.md @@ -5,6 +5,7 @@ **This page describes the basic Compiling and Programming process. There are some other more advanced processes that have some superior features described under the [Advanced Topics](Advanced_Topics.md) page.** Some options are: - Using an FTDI cable to upload firmware over the module - Tx pins +**If you wish to upload one of prepare binary files please see the page [Manually programming and setting fuses](Advanced_Manually_Setting_ATmega328_Fuses.md).** Multiprotocol source can be compiled using the Arduino IDE.