This thread way over my head. So here are links to "Status" posts of members that are developing and sharing code for the Attiny 25/45/85. They are talented folks that we all appreciate. Alphabetical order on screen name:
Flintrock:
- bistro-HD (Separate thread)
Mike C:
- Post 888 - https://budgetlightforum.com/t/-/34900/888
Tom E (Primarily focusing on Momentary Switch FW):
ToyKeeper (Primarily focusing on Clicky Switch FW):
- Post 314 - https://budgetlightforum.com/t/-/34900?page=10#comment-830590
- ToyKeeper also has a thread here linking to a collection of all available flashlight firmwares.
Original Post:
Decided to pursue the Attiny 25/45/85 ("25") because I want the following:
- Thermal protection that is based on actual temperature and not a make shift solution like turbo time out.
- Ability to use the widely available Attiny 13a driver boards without having to modify the pcb.
- Not having to use one of the valuable remaining 3 or 4 pins of the mcu for an external thermal protection circuit.
- Not having to sacrifice valuable existing code to make room for new thermal protection code due to the Attiny13a's 1k flashable program space limit.
Status:
- Thanks to Tom E's skill and efforts, modified JohnnyC's Star Momentary modified for strobe, dual PWM modes, and Alt PWM by Tom E is working on the 25. He has published his first working version in Post 71. This is big news! BLF drivers will be jumping up to a whole new level of functionality soon. Probably not tterev3 levels, but we should hopefully be able to better address heat safety issues and gain whatever fun new features programmers can imagine with the extra programming space, PWM outputs, etc.
To Do:
- Create OSH Park boards that can be used to piggy back this MCU on to any driver (making it a slave) using air wires. The wire solder points will be far enough out to still enable flashing the MCU. It will also have a ground plane that can be used to both provide ground and a thermal path to the slave drivers ground ring. Will include pads to have an optional LVP voltage divider to the board too.
- Begin creating thermal protection code
Some Notes:
Pinout:
The 25/45/85 have 2 PWM channels (Attiny13a has 1) that can put put to pins 2, 3, 5, and 6.
A direct match would be 8S1 which is only available in the 25. For the 45 and 85, the 8S2 appears to the best match. The pins of the 8S2 package need to be bent down to fit the Attiny13a SSU (8S1) package footprint. It's easy to do and I am still able to attach clip for flashing. The modified chip still fits in the original protective sleeve (Chip on far right).
Original Post (8/3/2015, changed on 8/4/15):
The question of why we don't use the 25/45/85 pops up from time to time with no real conclusions. I'm not a programer, but had to try it out to satisfy my curiosity.
Ordered some cheap Attiny45's because I didn't know how things would turn out. Went for the 10 Mhz version. If I understand the data sheets correctly, the 20 Mhz version only operates at 20 above 4.5 volts (just like the Attiny13a).
Grabbed JohnnyC's Star Momentary modified for strobe by Tom E. For every memory reference, I compared the the Attiny13a data sheet to the 25,45,85 data sheet. To my surprise, only one change was needed in the end.
Fuses, I know nothing about. Tried to flash with 0x75/0xff and got an error which basically bricked the chip. I will need to make one of those 12v jobbers to reset it and make it usable again.
Tried a 0x75/0xfd with the same result.
Finally tried to learn a bit about Attiny25/45/85 fuses and got overwhelmed. Queried a chip and saw that it had 0x62/0xdf/0xff (l,h,e) fuses. Decide that seemed good enough for now until I learned more.
Hooked up the chip to a HX-1175b1 driver and lit her up. Worked good. Fast clicks when up through the 7 modes I programed. Medium clicks went down and a real long click went into strobe. Strobe was pretty slow with long flashes. Thinking setting the proper fuses will fix that. After a second or so in any mode with button activity, a fast click would turn off the light. In short, the FW appears to be working fine.
I have more to learn some more to get it running right, but it seems pretty close already. Why are we still not using the 25/45/85 when we could have the following for just slightly more cost?:
- Internal temp sensor
- 2 PWM channels
- 2/4/8K Bytes of In-System Programmable Program Memory Flash
• Endurance: 10,000 Write/Erase Cycles - 128/256/512 Bytes In-System Programmable EEPROM
• Endurance: 100,000 Write/Erase Cycles - 128/256/512 Bytes Internal SRAM
- etc, etc.
I think inertia is keeping us from starting to use them. I guess I'm not really concerned with why we aren't using them, but more I'm urging us to start using it. It could help address a major safety issue with some of our hot rods and will also help with some other challenges the 13a poses.