Tuesday, 5 April 2016

DV Mega firmware update via an arduino

Disclaimer: this update is done at your own risk as damage or failiure of the components canbe caused when doing this! if you are in any way unsure DONT flash the firmware!


how do you update the firmware:

There are two ways to do this nither is any easier than the other but just as rewarding when its done and works

option 1: arduino

you will need:

  1. An arduino uno and correct usb cable if it dosent come with it, the board needs an atmega chip that can be removed from the board (boards can be found on ebay and dont need to be an official arduino as long as it has the removeable atmega chip just above the analougue in and power wrghting on the picture above)
  2.  A fine screwdriver to temove the cips from the socket
  3. Download the arduino ide software from arduino.org on the software page, as it also has the       drivers for the boards with it.
  4.  Download the  xloader and the hex file from dvmega downloads
  5. Download something like win rar or winzip if you dont have something like that yet   
software:

Install the arduino software and set it up if your not sure how to then watch a tutorial to use arduino



Install your winrar or winzip extractor 

Unpack or extract the xloader and the hex file (i made a file on my desktop to save them in and make it easy to find them)

Removal and installing the chips:

Remember to remove the power for a minute or two before removing a chip

OK ! would advise you purchase a few spare chips from the internet they look up atmega328p-pu or Arduino bootloader chip, they aren’t expensive and that way you wont damage the working chip when flashing it.

Before removing the chip pay attention of the orientation of it as it only goes one way but it can be fitted one of two ways! At one of the long ends there is a semicircle stamped and a small dot next to one of the tiny legs, the small dot is pin number one, the semicircle corresponds with a notch at one of the long ends of the chip holder. If your not sure take a picture to remind you of its orientation!


When removing the chips from the boards be very careful as you can bend the legs and damage them very easily! with a fine tip item i.e. a screwdriver lightly pry up the chip from its holder from both the narrow sides keeping it as level as possible so not to bend the pins

Installing the chip to be flashed into the uno, if it’s the original chip as long as you have not bent the pins it will push straight in, if it’s a new chip you will need to lightly bent the pins in a bit, the easiest way to do this is lay the legs of one side on the table supported by you, and bend the pins inwards by a few degrees, do the same for the other side and check against the socket to see if its seated if not repeat the process.

Tip: if you don’t intend to move the uno while flashing the chip try to seat it half way into the holder, this will make it easier to remove without damage after the update.

Flashing the chip:

Ok if flashing the chip from a laptop make sure the laptop is plugged in to the mains while doing this.

The flash should take about 30 seconds to carry out, sometimes it won’t flash right the 1st time

open the x loader program and find the hex in the program, plug in the Arduino and set the com port and press upload then look at the Arduino and the rx and tx lights should flash for a moment then a few seconds later you should have information of how many bytes have been uploaded under the x loader button.

that’s it, remove the usb and remove the chip and fit it back to the dv mega board the correct way then power it up and it should work fine! even on the raspberry pi before you update the software.

here is my video of how i did it



option two:










1 comment:

  1. Dear M6HBJ BarryHalliwell
    I downloaded the raspberry pi3 image of MMDVM. I keep getting error that does not find the dvmega no possibility to read firmware after 6 attempts (Modem) I paid particular attention to always insert tty / AMA0 I also tried a new rpi image of Jessie and installed MMDVM Host and MMDVM Cal for Raspberry 3
    I think my DVMega has lost the Bootloader. I load without problems XLoader and i substitute the Arduino chip one with ATmega 328P of dvmega (the chips are the same between Arduino one and dv mega UHF) firmware 228 is installed without problems (firmware name: UNO DVMEGA_RH_V228_UNO.cpp.hex)

    I wanted to ask you if there is the opportunity to send the "bootloader" files that exists within the ATmega 328P dv mega so that it can enter with Arduino compiler one?
    Could you give some advice I thank you.73
    Marco IU1arn
    iu1arnitaly@gmail.com

    ReplyDelete