Arduino Micro as ISP with Attiny45

Hello everyone!
I just got myself an Arduino Micro. Now I want to program (ISP) two Attiny45 chips with it.
I read a bit on the internet, but that didn't really help.
Could you please point me in the right direction?

Robbi Blechdose

P.S.: I have soldered and done simple(r) electronics before, but nothing like this. Oh, and I also program a bit (Java).

Robbi,

You will need to set up your 45 on a breadboard or some sort of circuit so that you can make connections to it.
You will need at least a 100nF capacitor between VCC and GND for the tiny.

Then connect it to Arduino using the SPI pins: SCK, MOSI and MISO, as well as connecting pin 10 form the Arduino to the /RESET pin of the 45. The datasheet is your best friend, as it shows pinouts and pin descriptions.

Then you can load the 'Arduino as ISP' sketch on your Micro and use it to program your own sketches to the tiny.

Google Arduino as ISP and you will get a lot of info on connections, settings, even step by step tutorials.

The bottom line is that you need a programmer (in this case your Micro) and a target board (in your case the tiny45).

Thank you very much.
Is a 10uf capacitor also ok?
EDIT: Oh, and could you please tell me which way the SPI pins are orientated on the micro?

Robbi Blechdose

You will need a 0.1uF (aka 100nF), but feel free to add the 10uF as well, just watch the polarity.

Robbi_Blechdose:
EDIT: Oh, and could you please tell me which way the SPI pins are orientated on the micro?

Downwards.
LOL Sorry, couldn't resist...

Just Google images for "attiny45 pinout": 5=MOSI, 6=MISO, 7=SCK.

Thanks again.

If it works, I'll mark this as solved. :smiley:

Robbi Blechdose

Humph. If I click "burn bootloader" with device attiny45 (Arduino Tiny libraray downloaded from google code version) and programmer "Arduino as ISP" or my custom programmer which has the protocol changed to arduino, it says "programmer not responding" after a while. Also, there is no signal on the "communication to slave" pin.
Any help?

Robbi Blechdose

Robbi,

Post a diagram or a detailed explanation of your connections.

On the software side you need to do this:

  • connect your Micro to the computer and in the Arduino IDE find "Arduino as ISP" in Examples
  • select the right Board (Micro) and the right COM port, as reported by the Device manager (assuming Windoze) for your Micro
  • upload the "Arduino as ISP" to the Micro

If successful, you just "built" yourself a programmer.

Step two, connect your tiny to pins 10-13 of the Micro, so that you can program it.
Before trying the bootloader you could try just an avrdude command to see if you can connect to the tiny:

  • open a command prompt and change directory to the folder where you have your Arduino IDE
  • change directory to the avrdude path: Arduino\hardware\tools\avr\bin
  • try this command to see if the tiny responds:
    avrdude -C ..\etc\avrdude.conf -p t45 -c arduino -v

Yous should get a reply.

Then you need to add the tiny to the boards.txt file in order to have it available to the IDE and to upload the bootloader. You can google "boards.txt attiny45: for details.

If you did all of that, then you may have missed selecting "Arduino as ISP" under Programmer in the IDE, before uploading the bootloader.

Let us know how it goes.

Thanks.
For the board.txt, I used the Arduino Tiny library.
Also, avrdude recognizes the attiny45m, but tells me it has an invalid device signature.
IDE errors are the same as before.
EDIT: When I change output to "everything" and execute the command that writes the program onto the chip manually, it also says that a verifying test failed ("0x00 != 0xa3"), and again that it has an invalid device signature.
Any ideas on how to fix this?

Robbi Blechdose

Alright,
it now transmits the program and recognizes the device. It even puts the bootloader onto it (also cmd).
But there is no output from the chip.

Robbi Blechdose

Robbi_Blechdose:
Alright,
it now transmits the program and recognizes the device. It even puts the bootloader onto it (also cmd).
But there is no output from the chip.

Robbi Blechdose

What do you mean, no output? Serial port? Please explain.

Ok, it had something to do with that I changed the output pin in the program.
Now everything works.
But now I've got the same problem as in post #7 and I forgot how to fix it...
If I can do it again, I'll post the solution here for others with the same problem.

Robbi Blechdose