What do I need for programming ATtiny25?

Like C_K said, same clip, same programmer, same software, but the code is not directly compatible, and it isn't quite as simple as just switching the register names, etc.

There are no code examples available for a 25/45/85 flashlight driver that I'm aware of, so you're probably on your own for now. The datasheet and Google will be your friends if you choose to embark on this adventure.

The ATtiny25 has the same package size as the ATtiny13A (150mil), the ATtiny 85 (208mil)

Using the ATmicro database on electro droid shows the ATtiny25A is the same size physically, but w/ 2K of flash

Coding wise, what RMM said

Yes definitely wasnt meaning to imply all it took was some register changes, I was getting at even with all the other work it needs right off the bat it isnt compatible at the most basic level. The language is the same but they are totally different chip’s, not simply “just a bigger 13A”. It will be a LOT of work to port it over and unless you already know how to code and have a good grasp of what all’s needed to do this you’ll probably be better off starting new. It would be about the same amount of work as starting new and if you’re new to coding in general it would be more helpful in the long run just to start fresh and learn.

Pretty much what I’m getting at is this- [OP] if you are brand new to coding and are gonna be following a tutorial along as you go start fresh, you’ll learn more in general doing that than trying to struggle threw porting it from a totally different chip.

I guess that was what I was getting at: it isn't something that someone that doesn't have an understanding of the chip and how to code for it can do; it isn't a simple "find and replace" port. I don't think you have to start from scratch, but you do need to have read the datasheet and understand what is going on with it. I tried to do it and couldn't make it work on my own, but it was a halfhearted effort.

A bit of work I can see. I’m probably not up to the task.

Are there any other options where info specifically for programming flashlight drivers is available?

It’s not a wider body, the 25 is available in both 150mil and 208mil (208mil is the larger size you are referring to - that’s what the 45/85 use).

JonnyC is planning to port STAR to the ATtiny25. Other capable minds are also on the matter even if they are not currently working on it (ToyKeeper for one).

I think it would be safe to pick up an ATtiny25 or two and be ready for new firmwares when they arrive.

To answer your question more directly: not really - microcontrollers all have the obstacles which RMM described. The only other MCUs I’m aware of which have publicly demonstrated flashlight code would be the handful of PIC MCU’s tterev3 discusses over here: tterev3’s PIC quickstart guide

I did a bit of searching and found some beginner info on PWM programming for ATtiny 45s and 85s, maybe I’ll give it a go if I’m up for a challenge.

wight, thanks for the link to tterev3’s thread. I’ll defiantly read through it.

Yeah, that's how I've been feeling as I read through the PIC threads as well.

Maybe my subconscious was writing what I was really thinking :smiley:

I have code for an LED dimmer that runs on both the tiny13 and tiny85. The only place I had to change was the register setup for selecting the ADC bandgap reference voltage. Depending upon what you are doing, more changes might be needed…

Would you be willing to share this code?

I wouldn’t mind seeing the code either, but I think TP’s point was that fewer changes are necessary than has been implied. He’s clearly got to setup several registers for his LED dimmer, but the only ones he had to change were those for setting up the Vref.

Unfortunately the code for that dimmer is not mine and can’t be shared. It would not be usable in a flashlight anyway. The only change was in the register bits that select the 1.1V bandgap reference for the ADC.

just last night, after trying to somehow squeeze more code to fit into tiny13’s 1k, I realized I want the same thing, more memory -> tiny25a. I’d be willing to contribute few hours a week to have some flashlight code running on tiny25.

What’s the cheapest way to get a 25er in EU?

http://uk.farnell.com/atmel/attiny25-20ssu/mcu-8bit-attiny-20mhz-soic-8/dp/1636951

I’m in Sweden, it’s EU, but can’t order from farnell.uk ??

_ “We’re sorry, but due to trading restrictions, we can not deliver to this address. Please use an alternative.”_

I hope it is possible to order from here http://se.farnell.com/atmel/attiny25-20ssu/mcu-8bit-attiny-20mhz-soic-8/dp/1636951
Because i have planned to, but not done it yet.
if it works please tell me so i know, vi svenskar kan köpa från farnell utan problem :wink:

I’m also planning on getting some stuff from the Swedish Farnell site. If you’re going to order we could share the shipping cost. I think shipping is 70 or 80 sek.

I’ve had a look at the data-sheet, it doesn’t look like much work, but maybe some of it has already been done. In the zip from the Star download link (Blf-firmware) there is a ATtiny25 folder. I haven’t tried it yet though.

If you want one ASP you can get one from me. As we are on the same side of town I can drop by.

min Svenska is not perfect (yet), but seems it’s not possible because it’s only for companies :confused:

you can give it another shot perhaps.