When I get to the section called "Configuring the ATtiny to run at 8 MHz (for SoftwareSerial support)", I get this error:
Error while burning bootloader.
avrdude: usbdev_open(): did not find any USB device "usb"
I'm using an ATtiny85, so in the Tools>Boards menu I've selected "ATtiny85 (internal 8MHz clock)".
I'm using an Arduino Duemilanove w/ ATmega328 (actually a Freeduino) as the ISP programmer. The ArduinoISP example has been loaded as explained in the tutorial.
In the Programmer menu, "AVRISP mkII" is selected.
Is anything wrong here? Has anyone configured an ATtiny85 to run at 8MHz with this method successfully?
I tried again with "Arduino as ISP" selected in Tools>Programmer before burning the bootloader. This step wasn't mentioned in the guide, but it seemed to work and I got the message "Done burning bootloader."
However, when I move on to upload the Blink example (changing pin 13 to 0 where needed), I get this error:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: stk500_recv(): programmer is not responding
The first 2 lines are to be expected, according to the guide, but the 3rd is not, and the Blink example wasn't loaded. (An LED attached to pin 0 doesn't blink.) What am I missing?
I don't think I did. Is that what the 10uF capacitor is for? I tried it with and without that. (It should only be needed for and Uno, and I'm using a Duemilanove.)
Without the capacitor, it says "Done uploading.", but the LED doesn't blink I get this error:
avrdude: stk500_getsync(): not in sync: resp=0x15
I also saw that someone tried to prevent auto-reset by keeping the RESET pin high. I tried that to with a 330ohm resistor between RESET and 5V. This actually gave the same result as removing the capacitor. "Done uploading.", no LED blinking, and: avrdude: stk500_getsync(): not in sync: resp=0x15
I got the error message I got with before, with the 10uF capacitor in place:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: stk500_recv(): programmer is not responding
Now when I add the LED, it is turned on for some reason, but it is not blinking. (I take the LED out when trying to program the ATtiny85.)
When I try to upload the (modified) Blink example, the Arduino with ArduinoISP running seems to freeze. The "heartbeat" LED on pin 9 stops changing, and pin 7 goes high. Pin 7 means it's in communication with the slave, but it apparently gets stuck there, then the error occurs. Pin 8 indicates an error caught by ArduinoISP, but it never turns on.
To get the heartbeat LED working again, I have to hit the reset button.
The symptoms indicate that auto-reset is still firing.
It is sometimes necessary to apply both a resistor and capacitor to get auto-reset disabled. The resistor (120 ohms) goes between RESET and +5V on the board you are using as a programmer (your Duemilanove). The capacitor goes between RESET and GND on the programmer. The resistor and/or capacitor should be connected after uploading the ArduinoISP sketch.
Here's the verbose output from when I try to build and upload the modified Blink program to the ATTiny85. It's too long for the forum, so here's a pastebin: ArduinoISP with ATtiny85 debug - Pastebin.com
Does this help anyone understand what's going wrong?
Arduino 0022, MIT/HLT-Core, 120 Ohm between +5V and Reset = Blinking LED!
Make Shure to set the scetchbook location for Arduino 0022 to an new path and copy the Attiny core-files to this new location. Otherwise they will be messed up with your Arduino 1.0 files.
This had me stumped as well. I couldn't get my MEGA2560 to program the ATtiny85work with the Arduino 1.0. (re)installing Arduino 0022 and following the MIT High Low Tech instructions (http://hlt.media.mit.edu/?p=1229) fixed it - including the installation of the aettiny45_85.zip (http://hlt.media.mit.edu/wp-content/uploads/2011/06/attiy45_85.zip). Now my ATtiny85 is happily blinking. Note the MEGA 2560 pin-out for ISP use: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (RST) and a capacitor between the MEGA2560 RST and ground. I used a 47 uF that I had laying around. A bit over-sized but it does the trick.
I also got rid of that annoying warning: "avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85". By inserting dummy values in the avrdude.conf file (hardware/tools/avr/etc).
Insert after the signature declaration under the ATtiny85 section:
signature = 0x1e 0x93 0x0b; (this is already there)
Like ateller, I also had success with Arduino 0022 and the MIT/HLT library. I did get an error when loading the Bootloader, but if I ignore it I can still load the Blink example. I tried with some ATtiny85's that I haven't used yet just to be sure. Other details:
119 ohms (from combined resistors) between 5V and RESET
10uF capacitor between GND and reset
Mac OSX 10.6.8;/li]
Not sure if the capacitor s necessary since ateller had success without it. I also tried Arduino 1.0 with the other library ( Google Code Archive - Long-term storage for Google Code Project Hosting. ), but still no luck there. It's totally worth keeping 2 versions around to make this possible. If I can help debug the 1.0 version, I'd be happy to provide more info or try other things.
Well, I'm not out of the woods yet. It looks like I haven't been able to change the clock frequency or something. Instead of running at 8MHz, it seems to be running at 1MHz, but still running the program as if it was running at 8MHz. For example, delay(1000) takes 8 seconds, instead of 1.
Incidentally, if I select "ATtiny85 at 1MHz (internal oscillator; BOD disabled)", then delay(1000) takes 1 second, as it should. I would try burning the 16MHz bootloader with an external oscillator, but I'm not sure how to connect the oscillator to the ATtiny.
Programming ATtiny's at 1MHz is cool, but it would be nice to have a faster clock for serial support, etc. If I can just get that clock frequency changed, I'm good to go.
Those changes are made to avrdude.conf, or dealing with WinAVR. It seems like these are specific to the Windows platform, correct? Is there a similar file on Mac OS X systems to edit?