Programming ATtiny25 with Arduino

Hi all. I'm looking for information on the following:

Arduino IDE (1.6.4) with Arduino as ISP has provision to program the ATtiny45 and 85 but not 25. Is it possible to program the 25? If so, how? (If not possible I assume I will have to buy 45s.)

Thanks,

Brian

Yes.

The exact same way you would program an ATtiny85 or an ATtiny45.

That was fast! Thank you!

Curious. If I can choose either the 45 or the 85 and either should work, then why offer 2 choices? Would not the following menu choices be more appropriate?

  • ATtiny25/45
  • ATtiny25/85

Can I program a 45 using the 85 configuration too? I assume this answer must be no, given there are 2 choices.

Best,

Brian

So I just tried to program the ATtiny25 using each of the 45 and 85 configurations. Doesn't work. Arduino IDE checks and reports "Wrong microcontroller found."

Evidently, the 25 is not programmed the same way as the 45/85.

Yes, it is. Which is why I said it is.

From your description you are missing an appropriate entry in boards.txt. Two examples that will hopefully help get you on track...

Sorry, I guess we have different definitions of "exact."

So I copied the "ATtiny25 @ 1MHz" section from your link into the boards.h file. Now I get a compile error:

Arduino: 1.6.4 (Windows 7), Board: "ATtiny25 @ 1 MHz"

...fatal error: Arduino.h: No such file or directory
compilation terminated.
Error compiling.

Looks like there are more steps required.

The parts have different signature bytes, that has to be accounted for:

Part Signature Byte 0 Signature Byte 1 Signature Byte 2
ATtiny25 0x1E 0x91 0x08
ATtiny45 0x1E 0x92 0x06
ATtiny85 0x1E 0x93 0x0B

Just as the '328 has boards.txt entries:
id = "m328p";
desc = "ATMEGA328P";

the Attiny 25/45/85 need entries as part of their board description. This data comes from entries in avrdude.conf:

id = "t25";
desc = "ATtiny25";

id = "t45";
desc = "ATtiny45";

id = "t85";
desc = "ATtiny85";

Which core are you using?

The core is attiny.

Thank you for the reply, CrossRoads, and I see the entries for the t25 in the avrdude.conf file. So this appears to be okay.

Clearly, this is a more complex problem and the Arduino IDE does not support the tiny25, so I am going to buy the tiny45, which is supported. I just wish I had known this before I bought the 25s...

I think the second core linked in my sig has entries for the 25. If it doesn't, it will fairly soon - I'm planning to set it up with sub menus, and it'll be great. They're not very popular though, 2k goes really fast with Arduino code...

Edit: The second core from my sig should work with the 25 now without any additional steps (beyond installing the core normally)

As of today, my core should actually work for the '25 (i had a few issues in boards.txt that I hadn't caught yesterday).