Developer

ArduPilot: How to re-flash Attiny45

This is a quick video tutorial to explain how to re-flash the attiny45 in ardupilot boards. You can also tweak the attiny code if you wish...But first you need to fallow this steps:1.-Buy an AVRISP MKII programmer, you can buy one in DIGIKEY, MOUSER and FARNELL (for Europeans)2.-Download and install AVR Studio from here, if the link don't work try this one (you must register). When your are installing it, when it ask about "Jungo Drivers", say always "Yes, yes and yes!" (are AVRISP drivers).3.-Now AVR studio will only let you program ATMEGAS in assembler (yeah, sure). For C/C++ you must install the WINAVR (AVR GCC). It will automatically fuse with AVR Studio, so don't worry about anything else... The main page is here, and the direct download here. After download, install it please.4.-Now plug you AVRISP programmer and make sure the drivers are well installed, if you want to know more about AVR studio and AVRISP please read here (very suggested).5.-Download the Fail Safe firmware (or code), to download the one i'm using in the video click here. Lasted updates will be published here. You can also download the HEX directly here, if you want... ;-)6.-Watch my quick-made video:
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • 3D Robotics
    The fuses should look like this:

  • Developer
    You welcome Jonny!
  • Jordi,

    Nice, this is more like it, very well explained and I'm sure quite a number of people will find it usefull also. I have located an AVR programmer and it is on its way, so if anyone else would like a lend of it and dont mind paying the postage I will pass it round as soon as I have programmed my boards. Once again thanks for the tutorial Jodi you have saved me a lot of time!
  • 3D Robotics
    For those of you who want a shortcut and don't want to modify the C code or otherwise use the compiler function in AVR Studio, you can actually skip several of these steps and just upload the HEX file directly.

    In that case, you don't have to install WINAVR, and you can skip some of the AVR Studio steps in the video. Instead, once you've got the AVR programmer connected and you're in AVR Studio, just go to Tools/Program AVR/Connect, then press connect (you may get an error, which doesn't matter; click cancel). You'll need to select the Attiny45, and check that it's reading the right signature. Now go to the Program tab. Where it says "Flash", input our firmware hex file, which you can download here.

    That's it! The new firmware should be working.
This reply was deleted.