Attiny25/45/85 FW Development Thread

Nice work - BLF marching forward once again :beer:

Hi TK,

You're certainly welcome to any code I create. I've provided Tom E the details of my changes to "his" FW so far. Since I'm just a hack when it comes to programming, I'm hoping a real programmer will eventually pick up whatever I get done and turn it into real code. I figure I will probably be creating as many problems (if not more) as solutions. Just trying to be a catalyst of change here. If I have to develop it all on my own, so be it. It just will take way more time and probably not be optimal code.

Thank you FmC.:)

Fantastic!!!!

This is sounding better and better! Hope to join you in the efforts soon. I did just get in a ASUS 15.6" touch screen laptop i7 (great deal at TigerDirect btw at the time), and installed Win 10 and Atmel Studio 6.2 so far, then will be installing and copying over the rest of my development tools so I can finally work on the firmware and do downloads in the same room where I do the modding, rather that running upstairs/dnstairs every time - was a major hassle. Also was a major hassle not having a good online access for pic uploading, BLF'ing, etc., in the same room as the modding...

I was thinking of switching over to the 85 so i could use the arduino ide. I think moving to that would make this alot more accessable to alot more people. Although maybe im just a wimp.

Diode663,

Does the arduino ide require a specific package of the Attiny85?

I ask because it appears that package 8S2 would be the best match for our typical driver boards that use the SSU footprint.

I've never use arduino. What would be the benefit of what your talking about? High level and pretend I'm a 5 year old (I almost said 5th grader, but they probably know alot about this stuff).

Thanks for working on this. I have been working on it on and off for a while now, but keep getting sidetracked. JonnyC posted some code 7-8 months ago that does work, but no temperature sensor added yet. I was surprised that nobody except me tried it out.

I have some code that I started that has temperature sensor implementation and builds, but I have no idea if it actually works or not since I haven't even flashed it yet. Too busy.

You ought to get in touch with MikeC. I think he has the temperature code already figured out.

Thank RMM. Need to find where JohnnyC posted that. I think MikeC is working with much bigger chips, but maybe the his code could save some time.

It's in his github repository and was on his site before he started that. He shared that code with me last August, but it sounds like you've already made it that far.

As far as i know it shouldnt matter what package it uses as the architechture is the same. And the main advantage i see is the aurdino ide seems much more integrated and user friendly then winavr. Also alot of the low level programing is taken care of for you, the only time you would need to write registers is to set the fast pwm. You can have all the code down below with a few variables up at the top of the code that the user modifies to get the desried modes and features and just click upload. At any point someone can step in and tell me im wrong because i dont have very much time in winavr and im not well versed in programing.

True, but I do care about the package because I would lke to use the 45 (or 25 or 85) on existing 13A boards we have on OSHPark. Besides new board orders, I got a little stock on the wight designed OSHPark boards, as well as RMM OSHPark boards. I don't have the time or expertise to Eagle CAD new board layouts, maybe someone else could, that would be great, but dunno. It's a chicken and egg thing -- no sense in doin board designs because no working firmware, no motivation to develop firmware without any board designs...

^ 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.

Diode663,

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.