Hi Forum, I wanted to leave a single post with general issues you may encounter when programming the ATtiny85. This post is the result of reading other people posts and messing around with my own install.
1) Setting up Arduino IDE: * Download zip file from http://code.google.com/p/arduino-tiny/ * unzip the file under your arduino setup directory under hardware. Mine looks like this:
~/arduino/hardware$ ls -ltr total 12 drwxrwxr-x 4 meirm meirm 4096 Jul 31 01:59 tiny drwxrwxr-x 6 meirm meirm 4096 Jan 11 10:52 arduino drwxrwxr-x 3 meirm meirm 4096 Jan 11 11:44 tools
- move the file eeprom.h from the zip to tools/avr/lib/avr/include/eeprom.h
2) Edit AVRDUDE.conf * open the file /hardware/tools/avrdude.conf
search for the session of ATtiny85
add the following two lines after the line that says signature pagel = 0xD8; bs2 = 0xE2;
search for the section that says: memory "lock"
add just before write = "... the following two lines
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", "0 0 0 0 0 0 0 0 o o o o o o o o";
3) Set your arduino to work as ISP programmer
- In arduino IDE, open example ArduinoISP and burn it in your Arduino board (328/uno)
4) Connect Arduino to the ATtiny85
- From arduino to ATtiny85 connect the pins
Ground -> Ground (pin 4 ) 5V -> VCC(pin 8 ) 10 -> Pin 1 11 -> pin 5 12 -> pin 6 13 -> pin 7
5) Set ATtiny to run at 8MHz
In the arduino IDE, select arduinoISP as programmer
Select Board ATtiny85 at 8MHz
select 'Burn Bootloader'
6) Run Blink on ATtiny85
connect a led with anode on pin 4 ( third physical pin in ATtiny85, the one above GND) and cathode on GND (you may use a resistor)
Select from Examples, Basic the blink sketch
Replace pin 13 for pin 4 ( third physical pin in ATtiny85, the one above GND)