Attiny25/45/85 FW Development Thread

^ I agree. My understanding is that if the FW is written for the 25, it will work on the other 2. The nice thing about the 25 is it comes in a 8S1 package which is the same package used for the Attiny13a SSU.

The 45 and 85 come in 8S2 which is the same as the Attiny13a SU. I purchased some SU's once and they fit all my boards fine without bending the legs. So I would think those would be fine for our purposes too.

That is why I'm confused about what size I got. The 10SU I purchased should be in the 8S2 package, but mine appear to the the 8X TSSOP package (See picture in OP). I will measure them tonight and report back.


Thanks for that info. Sounds pretty interesting. If you ever do that, please create a thread on it. It seems like the 25 and 45 should work too as they are pretty much identical except for amount of memory.

The 25/45/85 all run the same software and have the same features with the main difference being the 2KB/4KB/8KB software limitations. 2KB is actually a huge upgrade from 1KB in terms of potential functionality. The 25 comes in the same small footprint SOIC 8 as our current 13a, but the 45/85 aren't that much bigger and the legs can be folded or cut to make it fit on the same pads.

Also, be aware that there is a 25 and a 25V. The regular 25 will die and turn off before you ever hit a 2.8V LVP warning.

The memory part is great, but I'm really wanting to exploit the internal temperature sensor.

I think Tom E has some non "V"'s on the way. His are the 20Mhz variety. I image they would be fine in a buck situation.

K, got my 45's. Think they will have problems. I ordered ATtiny45-20SHR, which in the 25/45/85 datasheet, is 20 MHz, and 2.7-5.5 volts, which will have the problem Richard described - dying before hitting LVP. These are in the 8S2 package. Didn't size them up yet, but hopefully I can use these for development/testing.

It looks like all the 20 Mhz rated parts are all 2.7v min, while the 10 Mhz parts are 1.8v min.

I will probably get the dumb question of the year award for this, but I gotta learn sometime. 2.7v doesn't sound like a half bad cut-off point. Some cells should only go down to 3v, others 2.5v. Of course, they bounce back up some after the load is removed. I tend to replace cells when the get down into the mid to high 3's because they seem boring at that point. Won't your MCU's have automatic LVP and not need LVP coding?

I’m not sure what it’d do if the MCU shuts off due to voltage. It could “fail open”, so to speak, with the power channel fully connected. Maybe. I’d prefer letting it shut itself (and the light) down properly.

I would love to see the 2.7v cutoff tested. To be safe an LVP could be programmed for 2.8-2.9V but having a hard cutoff at 2.7 would be good in my opinion. It’d be yet another way to protect us.

This isn’t LVP, it’s the voltage range where the chip is expected to behave properly. Some individual attiny25 chips may work just fine outside of the range but it is not guaranteed. The attiny25 and others have a Brown-out Detector that would be better to try as a backup LVP. Brown-out Detection can conveniently be set to 2.7v. Fuses 0x62 0xdd will set Brown-out Detection to 2.7v

Is there any real point in running either chip past 10 MHz? The chip uses more power at higher MHz.

As far as I can tell, there’s no point running faster than ~5 MHz, since that’s fast enough to make imperceptible 19kHz PWM. It’s not like it’s processing a lot of data.

For the "V" chips, I believe the choices are 6.4 and 8Mhz unless you use an external oscillator. I opted for 8 just because it is the default and doesn't seem that much higher than 6.4. I will flash for the lower speed next time. I chose 1.8v brown out because that is what TK used for BLF-A6.

I tried to add dual PWM Modes (fast/phase) and Alternative PWM output (like for +7135) to Tom E's version of Star Mom. I have build errors that need to be fixed. So no progress on LVP testing yet.

I just measured my chip at about .21" square not counting the legs. So the chip pictured in the OP is the S82 package.

It’s too bad you have to go up to the Attiny 24 to get more than 2 PWM outputs. I’d like to play with RGBW leds.

You can do RGBW on a tiny13, but at least two of the channels will be on/off only so if you want PWM you’ll have to do it manually. It’s generally not worthwhile except for low-power indicator lights, like for showing battery state through a translucent button.

I want PWM on red green and blue, I’d like to play with color mixing. I might buy a DIP package tiny 24 and build a test driver on perf board.

Oh boy, I ordered the 20 MHz probably because of my need-for-speed mentality I've had in this biz since 1980. I thought the speed was free, apparently not, I didn't fully research the consequences. At this point, there's no reason to play with the risk of that 2.7v cutoff with the 10 MHz chips. The 45's I received are the 8S2 package, and the legs do need to be bent or clipped to fit on a wight 17 FET+1 driver ( - it's way too darn close, but the wight 22 FET+1 driver ( is perfect for these packages with the extra set of extended pads, so it appears. I'll use the 22 mm board for development then.

I'll check around for 25's in the S8S1 package at 10 or 8 Mhz max - this seems to be the best option for using on existing 13A board designs.

This seems like the best in-stock option (ATtiny25V-10SSU):

So I realized that I had just received an attiny85-20SUR from Mouser the other day. I bent the legs and soldered it to a 105C to do some tests using TKs Cypreus2 firmware.

With the following fuses (2.7 Brownout Detection) I had the these results.
-U lfuse:w:0x62:m -U hfuse:w:0xdd:m -U efuse:w:0xff:m

3.11 works
3.07 erratic
3.05 more erratic
3.04 off
3.03 off
3.02 off

Then I flashed these fuses to disable brownout detection and got these results.
-U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m

3.06 works
2.98 works
2.83 LVP

So on my test board the 2.7V brownout detection actually started kicking in just over 3V. With it disabled the programmed LVP correctly shutdown the light at 2.8V. Next I’ll disable the LVP in the firmware to see how low the attiny85 will go.

EDIT: I should note that the voltages were tested after disconnecting the battery so there may have been some sag involved. That said, if even the very low moonlight level wouldn’t light up there couldn’t have been that much sag.
EDIT2: While replicating my results I realized that I had wrongly attributed the LVP shutdown to the attiny85 when it was the attiny13a.

So my attiny85 works all the way down to 2.5V. That’s far lower than I wanted it to be able to go. It might go lower but that’s as far as I’m taking my battery.

^ Great info SciFiFreak. Thank you for sharing. Looking forward to hearing about your next test.

Did you change the FW code at all? I ask because I see it references memory code "WDTIE". That isn't a valid code on the 85. It's equivalent would be "WDIE". You many want to also change F_CPU to 8000000 with the last fuse settings you listed. You probably did all that, but I mention it just in case.

I didn't look at all the memory references. Just the above because those were the only real changes I had to make to the version of Star Momentary I ported over.

EDIT: Not sure I follow your "EDIT2:" above. Can you elaborate on it?

I haven’t touched the firmware in any way yet but will start digging into that soon. Thanks for the tips. My primary goal was just to see if it ran and at what voltages it would run. My basic tests were only simple mode changes.

While testing the voltages I was bouncing the battery back and forth between a FET+1 attiny13a, to discharge it, a charger, and the 105C attiny85. I thought I saw the 85 do the LVP step-down and turn off. In reality it was the 13a and I had gotten them confused. So the LVP code in the Cypreus2 firmware doesn’t seem to work on the 85 (at least on the 105C). That’s OK, it’s a different chip/board after all.