ATtiny! Damn that thing is tricky

Gofilord:
What if my micro-controller is on a breadboard? Let's say, I bought an AT90S8535 microcontroller chip only, how does this connect to it? Or a better example, an ATtiny?
and does the board give voltage to the microcontroller?

The six lines you need are:
SCK, MOSI, MISO, Ground, +5V, Reset
The first three are the SPI pins. The next two are power and yes, the USBasp provides 5V. The Reset is held low during serial programming.

You can find the 10-pin connector layout easily enough and run wires from the cable to your breadboard. If you eventually make a custom board you should include a 6-pin or 10-pin header.

Ok, DIDN'T WORK.
Here's what I did:

  1. Downloaded the arduino 0022
  2. Made the connections with tiny
  3. Imparently, there is no selection of what proggrammer to choose in 0022. I uploaded the Arduino ISP sketch to the UNO.
  4. Switch the board to the ATtiny85 (w/ internal 8Mhz)
  5. Uploaded the blink proggram with pin 0 insted of 13.
  6. RESULT:

C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:362: error: 'DDRC' undeclared here (not in a function)
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:363: error: 'DDRD' undeclared here (not in a function)
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:370: error: 'PORTC' undeclared here (not in a function)
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:370: error: initializer element is not constant
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:370: error: (near initialization for 'port_to_output_PGM[3]')
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:371: error: 'PORTD' undeclared here (not in a function)
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:371: error: initializer element is not constant
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:371: error: (near initialization for 'port_to_output_PGM[4]')
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:378: error: 'PINC' undeclared here (not in a function)
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:378: error: initializer element is not constant
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:378: error: (near initialization for 'port_to_input_PGM[3]')
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:379: error: 'PIND' undeclared here (not in a function)
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:379: error: initializer element is not constant
C:\Users????\Downloads\arduino-0022\arduino-0022\hardware\arduino\cores\arduino\pins_arduino.c:379: error: (near initialization for 'port_to_input_PGM[4]')

Did you get the 0022 files from the High-Low Tech site or are you using the 1.0 files?
Because I have 0022 and the 0022 files and I have 3 programmer choices for the Tinies.

Fine,
I tried the cores that fit this version of the arduino.
ATtiny85 w/ arduino as ISP.

new error:

Binary sketch size: 658 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

someone?

My guess is that you did not disable auto-reset on the Arduino you are running the ArduinoISP sketch on.

How do you do that?

John: I've seen posts and notes showing what looks like two ways to do that, a 10 uf cap or a big resistor for possibly different rev UNO's or different Arduino boards... or just two different ways?

Gofilord, what worked for me before was a 10 uf cap between ground and reset. I have a 1st revision UNO clone.

Edit: http://hlt.media.mit.edu/?p=1229

We’ll also connect a 10 uF capacitor between reset and ground on the Arduino board as shown in the diagram (the stripe on the capacitor that’s marked with a negative sign (-) should go to ground).

BTW John, I do have two of those USBASP's on the way. Thanks for the link!

I don't use a 10uF because all I have is 22uF, I don't really think it matters.
I think the problem is I didn't turn off the auto-reset, and I don't know how.

I think the problem is I didn't turn off the auto-reset, and I don't know how.

You don't get to "turn off the auto-reset". The capacitor absorbs the reset signal before it has an opportunity to reset the board. The wrong size capacitor charges up too fast, and allows the signal to reset the board. A larger one, as you are using, should be better than a smaller one, but, the right size one is cheap.

GoForSmoke:
John: I've seen posts and notes showing what looks like two ways to do that, a 10 uf cap or a big resistor for possibly different rev UNO's or different Arduino boards... or just two different ways?

Two different ways. The auto-reset happens when the DTR signal goes low. This grounds one end of a tiny capacitor. The other end is connected to the Reset pin. The current needed to charge the tiny capacitor causes the voltage on the Reset pin to drop low enough to initiate a reset.

A low-value resistor (roughly 100 Ohms) between +5V and Reset provides current fast enough that the tiny capacitor does not draw the voltage below the Reset threshold.

Likewise a small capacitor (1 microFarad or more) provides enough capacitance that the existing pull-up resistor can keep the combined capacitors charged above the Reset threshold.

Either one will work.

I see now. Maybe Gofilord should try the 100R between 5V and reset?

So a 22uf cap between GND and reset and a 100ohm res between 5V and reset?

I have never tried using the Arduino Uno to program other chips, I always use the USB-ASP programmer with the adapter that Johnwasser mentions, on the Attiny 45/85 using the six pin adapter and the USB-ASP pin1 of the chip goes to /RST Pin4 to GND Pin8 to VCC+ Pin7 to SCK Pin6 to MISO and Pin5 to MOSI. There is some files to download in order to use the Arduino environment to program the chip, here is a guide and links to the downloads http://hlt.media.mit.edu/?p=1695 I have no previous experience of programming and a very basic knowledge of electronics but using the above link and the USB-ASP programmer I had it working straight off...

Gofilord:
So a 22uf cap between GND and reset and a 100ohm res between 5V and reset?

One -or- the other should work (emphasis on "should"). And you've already tried one.

I'm running Arduino 1.0 with an Arduino Uno Rev3 board and after a few failed attempts to program an ATtiny85 I have finally got it working. What finally got me going was to follow the link http://hlt.media.mit.edu/?p=1706 from the main article http://hlt.media.mit.edu/?p=1695 where you are instructed to change the heartbeat() delay in the Arduino sketch from 40ms to 20ms.

So, the whole process is in two parts:

Select: Tools > Programmer > Arduino as ISP

A. To set the Uno as an ISP

Set board type to Uno
Load ArduinoISP Sketch
Change heartbeat() delay from 40 to 20
Upload Sketch
Ignore: avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

B. Use Uno to program ATtiny85
Wire up 85 and put 10uF cap in place
Select 85 8MHz from board types
Connect up USB
Tools > Burn Bootloader (only need to do this the first time the 85 is programmed.)
Select sketch to run on 85
File > Upload Using Programmer
Ignore: avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

Your LED should now be blinking if you uploaded the blink sketch and put an LED/resistor in place.

I'm following this thread as well, having the exact same problems.

I'm resorting to using the Arduino as a programmer because I can't seem to get my new AVR Dragon to work with AVR Studio. I found out I could use the Arduino as a programmer while troubleshooting the AVR Dragon. I've tried two different ATTiny85's, on three different computers. The ATTiny's were purchased new from Mouser.

I'm trying to flash this code:

/*
  Turn on two LED's
 */
int LEDPIN = 0;
int LEDPIN2 = 1;
void setup() {                
  
  pinMode(LEDPIN, OUTPUT);
  pinMode(LEDPIN2, OUTPUT);  
}

void loop() {
  digitalWrite(LEDPIN, HIGH);
  digitalWrite(LEDPIN2, HIGH);
  delay(1000);
}

I just followed Bluemason's process, step by step. I got the expected return from avrdude and ignored it.

I can't tell if the bootloader burned or not (is there any output on that? This is what I'm getting)

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

When I look to see if the ATTiny has been programmed, I'm moving it to a new section of the board. Five volt power supply, dedicated LED lines.
The behavior that I'm getting is that the two LED's are blinking: Pin 1 on, Pin 1 off, Pin 0 on, Pin 0 off, Pin 1 on, Pin 1 off, delay about 1 second, Repeat.
Changing the delay in the code doesn't seem to change the behavior at all (as a troubleshooting measure).

I'd really appreciate any help you can give.

The Burn Bootloader step doesn't actually burn a bootloader, it only sets the fuse bits. To change the program you still need an ISP but I think you only have to set the fuse bits the one time.

Is there a way to do that with the Arduino board? Can I do some sort of manual avrdude command line work? (keep in mind, I've never used avrdude outside of an Arduino IDE)

Static:
I'd really appreciate any help you can give.

Which board?

How are you disabling auto-reset?

Which version of the IDE?

Does the heartbeat LED on pin 9 always show a heartbeat? You do have an LED connected to pin 9, don't you?

Does the board reset? Does the on-board LED on pin 13 blinks a few times when you upload or "burn bootloader"?

Have you modified the ArduinoISP sketch? What modifications do you make?