Attiny25/45/85 FW Development Thread

I would go for ATTINY25V-10SSU. It’s guaranteed it be stable down to 1.8v. 20SSU only officially good to 2.7v.

I got the 25V's too. I'm running them at 8 Mhz now (still faster than the 4.8 Mhz we used on the 13A's) , so the 20 Mhz capability is pretty useless - I believe 8 Mhz is the fastest you can do on the internal clock anyway.

The only reason to consider the 2.8V version is if you’re going to build a bunch of drivers for 6V LEDs (MT-G2, XHP70). Then you might be able to save a little on getting some. Other than that, go for the 1.8V for peace of mind.

Really, the attiny25-20ssu will probably be fine. Other atmel chips usually work a bit beyond their official spec, it’s just not guaranteed. When problems do occur from running outside spec, one chip may be fine and another seemingly identical chip is unreliable. So I think it’s best to, at least do any initial testing with the 25v.

From Richard's post #163 -- got those boards in today!! Qty 3. Looks real good. think OSHPark expressed them to fill space.

I did a 20mm/22mm version of my DoubleDown driver, and had space to fit Attiny85 pads.

20mm and 22mm are identical except for the outside diameter.

  • FET+1 on the top, with pads for 3 extra 7135’s on the bottom (optional of course, for CC med mode)
  • 2.1mm LED+ through-hole
  • Attiny45/85 ready
  • Separate pad for Pin 3
  • Zener ready
  • Gate pulldown resistor for FET
  • Pads for bleeder resistor for Lighted Tailcap

Oshpark link for 20mm ……………… Oshpark link for 22mm

Dang PD!! CoolSmile I'm maybe not miss'n wight so much anymore.

Dam, just realized that I’ve ordered ATTiny25 :frowning:
Need to order some ATTiny25V going to have to wait for them to turn up. Now the long wait begins.
Anybody have any good places to get some?

Farnell: http://uk.farnell.com/

I don’t know if they sell to private people in the UK though, I have to go through a third party company here in Sweden.

Try them. Often atmel chips can run fine a bit outside of the official spec. Also you can set the clock speed to 4mhz. Slower speeds are recommended for lower voltage range use. I suspect attiny25 non-V will be no problem at 4mhz.

It sounds like I need to spend some time reading the full reference manual for 25/45/85. If it can run at 4 MHz, that would actually make it almost identical to the speed the attiny13a has been using. (if my recent measurements are correct, it appears that our common drivers actually run at like 3.4 to 4.2 MHz, not 4.8 MHz)

Of course, there’s also 6.4 MHz available. That might be a good balance, but I haven’t tried it yet.

In any case, tiny25 (non-v) goes down to 2.7 V… so if you set the LVP to trigger a little higher it should be fine. I’ve only tested one down to 2.7V (not 2.6 or lower), but it worked great right at the edge of its spec.

I only see two choices of internal clock rates: 6.4 Mhz or 8.0 Mhz in the Fuse Calculator: http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny45&P=ATtiny45&M_LOW_0x3F=0x03&M_LOW_0x80=0x00&M_HIGH_0x07=0x07&M_HIGH_0x20=0x00&B_CKDIV8=P&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL2=P&B_CKSEL0=P&V_LOW=62&V_HIGH=DF&V_EXTENDED=FF

Don't think an external clock is an option for us - too many ext. parts, no driver design for that. How is the speed set to 4 Mhz? Maybe there's a divide by 2 option?

I assume it would have to be a clock divider. It looks like the 25/45/85 have clock dividers for all powers of 2 up to 256. This provides a lot of choices for speed.

I thought you could use the Clock Prescale Register CLKPR to get 4mhz.

If I’m reading the product manual correctly, I think that is correct.

Just fyi, I'm working on an enhanced e-switch based firmware version that has user selected mode sets only for the 25/45/85 - made a lot of progress on it over the weekend. Right now you can choose 1 of 8 mode sets, mode memory ON/OFF, and lo->hi or hi->lo, so it's probably equivalent to 32 modes of 'guppydrv' style modes. May add more options - the design lends itself to be extendable. Right now it's designed only for FET+1 drivers, and is getting close to 2K of code unfortunately. I was hoping to stay under 2K for the 25.

In testing/debugging, I once again ran into the problem of not being able to download firmware to either a 25 or 45. I'm thinking it's the clip - kind of beat up w lots of use, but also may have to do with the solder job on the CPU pins. I'll try to find a best deal, quick shipment - I know the Pomono I use now I got from DigiKey.

^ Lots of options/improvements there. Hoping Strobe is still immediately accessable from any mode. I think many folks, like me and my wife, that use strobe want it rapidly available. We live in the woods and strobe is quite handy for chasing off most unwanted critters. I would think it could be handy for helping disorient a potential attacker in a city environment. I really like the BLF-A6 FW, but the lack of immediate access to strobe from any mode is a deal breaker for me.

Yes, I'm keeping strobe as it was - direct access via a 'hold' -- I like this as well. I'd like to add options though to choose it or not (maybe beacon), but also extend the hiddens with more than just strobe - this isn't implemented yet. What I have now is to access config settings, 'hold' for a little longer, past the strobe hold time, then light goes off, you get a couple blinks, then you can do 1-8 clicks to choose your mode, then it times out, then 2 blinks, then you can click your next option (lo->hi, hi->lo), then 2 blinks again for the mode memory option -- one click toggles the current setting.

Really you can go two ways: 1-click toggles, or 1-click OFF, 2-clicks ON. Not sure yet which way. Decided to go with the 1-click toggle method for now.

I’m getting ready for an order from Digikey and wanted to get some MCU > ATTINY13A to try.

Is the ATTINY25-SSU the right one to get?

Or something else?

Thanks for this thread!
Jim

EDIT: Sorry, I meant ATTINY25V-SSU?

Also, ATTINY45V-10SU is ok?

If you want it to fit the Attiny13a SSU footprint, then ideally you want the ATTINY25V-SSU. The "V" version can operate more reliably to a lower voltage, but you would probably be ok with the non-V model.

I personally get "V" versions in the SU package as they generally cost less and I just bend the pins in.