Crescendo clicky firmware by TK

ATtiny1634.

I certainly agree that with complex projects it makes sense, but for flashlight firmware I would just use copy and paste if I had multiple firmware files. I don’t have multiple files myself, I have them all in one and decide which one to compile with #defines. Makes backup real easy… a single file… One file to rule them all.

I’ve been meaning to add tiny841 and tiny1634 support to FSM, both to enable more hardware features and to make the supported UIs portable across a wider range of hardware. It’s sort of a cross between a UI toolkit and an OS kernel, but it currently only supports tiny25/tiny45/tiny85. So I’m trying to help enable new hardware designs by supporting new hardware.

If you’ve already gotten things working on either of both of those, is there any chance of sharing the code you created to bootstrap the chip and get PWM going? It doesn’t even have to be shared publicly; I’m mostly just looking for working examples to use as a reference.

quite few more pins in that doody.

am i right in thinking the attiney 13/13A’s can be ‘directly replaced’ with the attiney 25/45/85 chips? the 13A has a working voltage from 1.8-5.5v and the 25/45/85 a working voltage of 2.7-5.5v ?

could fit bigger programs onto standard 13A sized drivers then

In most cases, yes, the attiny13a can be directly replaced with attiny25v. However, tiny13 can tank a lot of electrical noise and operate pretty far out of spec, while the tiny25 cannot. So in some cases, tiny13 might work while a tiny25 would end up rebooting a lot due to voltage spikes. It depends on how well the driver insulates the MCU from the LED power.

Tiny45 and tiny85 are slightly bigger, and don’t easily fit onto the same layouts. However, they typically still fit after bending the legs underneath.

Crescendo is primarily meant for FET+1 or FET+N+1 drivers with a tiny25, though it can also work on 13, 45, and 85, or with just one power channel.

hmmm, i’m waiting for new iron to arrive, and hmmm i may just swap the chip. (still on the C8).

ToyKeeper

I’m a little confused about the diagram. Is it possible for Crescendo to be set up for instant turbo or a turbo default? This would be great for a tactical light set up.

Bootstrap is a term I don’t quite understand, but I can share my start-up sequence and PWM code for 1634 with you. I’ll see if I can find my old 841 code somewhere too.

Yep. I’ve actually designed a driver that uses all of those pins. I just haven’t got around to building it yet (one of those projects standing in line). It’s a slightly more advanced version of these: Driver giveaway: Constant current 17mm drivers, winners (finally) announced, post #2.

I wouldn’t really recommend Crescendo for tactical use. It does have a shortcut to turbo, but it’s probably not fast enough for tactical purposes. The shortcut is to turn it on three times quickly. So, on a reverse clicky, it would be click-tap-tap. On a forward clicky, it would be tap-tap-click, but Crescendo really doesn’t work well on a forward clicky so I’d probably use something else.

Oh, sorry, bootstrap is a weird English term.

In the 1780s, in the story of Baron Munchausen, there is a scene where he pulls himself out of a swamp by grabbing his own hair and pulling up. The point is to show that Baron Munchausen can do impossible things.

Then in 1834 in the US, there was a cultural conflict between the right-leaning aristocracy and the left-leaning labor unions of the working class. A labor union magazine (the “Working Man’s Advocate”) published a lot of articles making fun of the aristocracy’s policies and beliefs. In one article, it used a metaphor to illustrate how ridiculous their beliefs were, and how they were asking people to do the impossible. The metaphor said that they expected a poor working man to lift himself over a fence by pulling up on the straps of his boots.

The idea continued to be used in this manner for a while, showing up in the 1860s as “lift himself by his own bootstraps”. It still referred to impossible tasks.

However, by the early 1900s, people were starting to promote similar policies again, and some of those people didn’t recognize that the phrase was meant to ridicule those policies. They thought it was a good description of what they thought was a good idea, and they started using the phrase unironically to describe their own policies. By 1916 or so, it had entered common use with a meaning of bettering one’s self through extreme effort with no outside help. This led to the roaring 1920s and the great depression of the 1930s, and then the idea was less popular for a while. But in modern times there has been another resurgence of those ideas and the phrase has become popular again, mostly without realizing that the term was originally created to make fun of exactly that type of idea.

Anyway, moving ahead to the 1950s, thanks to the efforts of snarky computer scientists and their affinity for bad jokes, it gained a third meaning — the startup processes on a computing device which occur between powering on and reaching a steady operational state. And it was shortened to “bootstrapping” or just “booting”. Hence why we now have terminology talking about booting (or rebooting) a computer.

TL;DR: Yes, what I’m looking for is mostly the startup sequence and PWM code. Maybe something about reading voltage and/or temperature too. Basically just accessing the hardware features, not the higher-level application logic.

dohh, i thought it was a circuit that returns the over voltage difference to ground lol, spose its a loose term for a lot of things… unless i confused it with a ‘clamp’ .

hurray, 100 watt iron arrived, one touch soldering with the star in situe, installed Gcharts ramping UI 2nd attempt and it works. (NANJG layout on the red convoy C8 board).
running temperatures are spot on, and the ramp down works on turbo/max ramp, also the battery check is as close as.

draws 1.7 amps with the battery at 3.7v at the battery end on turbo/max ramp, thats that sorted.

thank you everybody, i actually got help on here, nice one. :+1:

edit: and just confirmed the LVP works too. (battery at 3.11v after a few minutes rest. light switched off).

That was an entertaining read, thanks for taking the time :slight_smile:

I’ll put something together. I found some of my old 841 code too, it might be of use.

ToyKeeper

What else is there? I can use either switch (though forward would be best) it’s just that the default needs to start at turbo.

I hear the Olight Warrior X is pretty good for tactical purposes. There are lots of others to choose from in that general category though. I’m probably not the best person to give tactical recommendations, since I don’t really know much about it.

can we have a defined explanation of ‘tactical flash’ light’?

This might help:

I think Bistro FW can be made to always start in turbo.

You know I’m talking about tactical with “ramping”. I already have several tactical lights.

Crescendo could be modified to start in turbo. You could just reverse the ramp table so it starts with 100% FET, and turn off memory. I think this would start in turbo then automatically ramp down? I’ve always used memory so I’m not certain how it behaves with no memory. Is there an additional simple modification to make it just turn on in turbo and stay there?