Intro: Burning TV B Gone Firmware Using Arduino
This is my first instructable. This is probably painfully obvious and any criticism or questions that you have, I would be happy to help you with as best I can.
When I was making a TV-B-Gone, I had no method of programming the ATtiny85 in the circuit without buying expensive AVR programmers. After some internet searching, I learned that my humble Arduino Uno, along with some free software, can be used to program AVR chips. However, I found some problems with the other tutorials doing this, so I made this tutorial to help clear up those problems. One of them was how to actually write programs to the attiny.
This tutorial assumes that you know how to use the Arduino development software, or IDE, and know how to use a breadboard.
For this project you will need:
1 Arduino UNO
1 attiny85 or 45
1 condenser, 10 microfarads
Some 22 AWG wire for making breadboard connections
Arduino - The IDE for the Arduino board. This can be found at http://arduino.cc. This software is necessary for uploading the ArduinoIDE sketch to the arduino itself.
WinAVR - This is used to "burn" the firmware into the attiny chip. A direct link to the WinAVR installer can be found here.
For this project I used an Arduino UNO. I haven't tried any other boards so I don't know if this works for other boards.
I am not responsible for any damages caused by the misuse of these instructions included herein or for ineptitude of the end user of these instructions.
Install the software at your own risk. I also claim no responsibility for any problems that may occur or any damages to any hardware, firmware, or software.
TL;DR: Anything you break because of this tutorial is your fault, not mine.
Step 1: Installing Software
First you need to get all the software installed.
To install Arduino, simply decompress the .zip file somewhere you can find it.
To install WinAVR, run the binary file that you downloaded. The setup will walk you through the installation process.
Step 2: Programming the Arduino
The next step is to program the Arduino with the sketch used to interface between the PC and the attiny. This sketch is known as ArduinoISP and should be included with the Arduino IDE download.
To upload the sketch, go to the File menu in the Arduino IDE program, and hover over the "Examples" menu.
Then click on the "ArduinoISP" option. This should open the sketch in the IDE.
If it isn't already, plug the Arduino into your computer, and select the correct COM port and board in the "Tools" menu.
Once everything is configured, upload the sketch to the Arduino.
Step 3: Wiring Up the Circuits
Now you will need to connect the attiny to the Arduino. Using the 22 gauge wire, the Arduino, the 10 microfarad condenser, the breadboard, and the attiny, connect them together as shown in the image, shamelessly stolen from MIT Media Lab's website.
Step 4: Moving the Firmware
To upload the firmware, you must move it into the root of the C:\ drive of your computer. Doing this is very simple.
1. Locate where you saved the TV B Gone firmware file. It should have the .hex file extension.
2. Right click, copy
3. Open the "My Computer" window.
4. Click on the "C" drive. It should be towards the top of the menu, and have the letter C in parentheses next to the drive name.
5. Open up this drive.
6. Right click, paste.
Now you must "send" the firmware to the Arduino. To do this, open up the command prompt. There are a few different ways of doing this.
On Windows XP, open the start menu, and click Run...
Then, type "cmd" and press enter.
On other Windows operating systems, searching the phrase "command prompt" in the start menu should bring it up. I am not all that familiar with the newer operating systems.
In any case, what should open ought to look similar to the screenshot below.
Now you must upload the program. To upload the program, type this into the command prompt and press enter:
X represents the "com" port that your Arduino shows up as in the Arduino IDE.
Y represents the name of the firmware file. There should be no spaces in the filename.
avrdude -c avrisp -p attiny85 -P comX -b 19200 -U flash:w:C://Y.hex:i
If all goes well then you should get the message "avrdude done"
If you plan on doing this multiple times, you can take the previous command and copy and paste it into notepad. Then, in the "Save As" menu, change the "save as type" option to "All Files." Then, in the "file name" field, type in nameoffile.bat. The .bat part is important. What this does is save it as a type of executable file that will run that one line of code in the command prompt every time you open it. To edit it, simply right click on the file, and click the "Edit" option.