Flashlight Firmware Repository

press switch and it comes back on. Sometimes it needs a moment to check its unplugged but i think if we just reduce the ticks it will be ok.

hmm did you try it with or without a resistor on pin3?

I flashed the one in the second link above and it isnā€™t reacting to the charger cord. I do have a resistor on it.

Iā€™m using a 4.3v zener

I see you retained a lot of the temp monitoring code. I wonder if we can clean it up so that itā€™s essentially ā€œIf itā€™s connected, off. If it isnā€™t connected, onā€ (as it is now, I have no idea whatā€™s actually going on in that code :bigsmile: )

Iā€™ve tried to strip lots out but I kept loosing the functionality. Maybe somebody else might have better luck. If itā€™s not working you should only need to reduce the charger high and low values to lower ones.
Iā€™ll have another go at reducing the code during the week, Iā€™m just glad I got it to work.

:beer: yep well done. glad it is working for you. I have a few things to work on before it fits my usage. Iā€™m hoping TK getā€™s a chance to look at it when her X6R arrives

Yeh, Iā€™m sure that sheā€™ll be able to clean it up a bit and polish it off.

I must be going insane. Iā€™ve tried a wide range of values with no love.

Iā€™m to the point where I would pay someone to just get this FW working for me as a whole.

I havenā€™t ordered a X6R yet or the driver / parts to upgrade it, but I might be able to get something working anyway.

You have no idea how appreciative I would be. I was hoping to have this light ready for my grandfatherā€™s birthdayā€¦ That was yesterday. Oops.

Wonder why itā€™s not working for you? Have you tried bypassing the resistor? Iā€™m sure what ever TK comes up with will be much more elegant that what I have.

Its mystery time again gang.

I am using JCs dual switch firmware. I did use this once before without issue in a 12V setup and it was fine. However not so much today.

I flashed a FET driver with it today and changed only the modes and turbo time length. But the driver will randomly change modes. Always in the upward direction. It can be sitting still on the work bench on low for example, and in a few seconds will jump to the next mode or possibly even bounce a couple in a row.

Other than that it works perfectly. Stays in the same mode when power is disconnected, and switches like normal when the e switch pin is grounded ( I just touch the wire to ground for now there is not actual switch).

At first I thought bad connection so I redid them all. This did not effect it at all so I thought bad driver. Nope. New driver same exact result.


Anyone care to wager a guess?

I have tried to slim the firmware down, removing extra parts of the temp mon code and the low_to_high (as we can go either way with the switch) then got carried away adding features Iā€™d like and Attiny25 support.
I will try and get a slimmed down version with just modes and for an Attiny13A

EDIT:
Lightweight version here
I will test later tonight confirm it works.

Been testing needs more work not 100% yet. Lightweight version doesnā€™t work.




At this point if someone even had a wild guess I'd entertain the thought :)

There is a feature in the voltage monitoring to increase mode is the volts bounce back up. Something might be wrong there.

Was the original version of the firmware working before you changed it? In other words, did you try flashing the original unmodified version of the firmware and test that before you modified it and re-flashed it? And if so when you tested the unmodified version did that work?

If so, try re-flashing with the unmodified version again and see if it works again.

If not, then maybe thereā€™s something wrong or incompatible with the original version?

Any further progress?

I finally found work (yay) so Iā€™ve been busy this week and havenā€™t had time to work on it anymore

Still not 100% Iā€™ve got rid of extra bits and the turn off function works beautifully but when you unplug and try to turn it back on sometimes it will shut off after a second but if left for 6 ish seconds it works perfectly just need to get the turn back on function tweaked. Iā€™ve just been really busy with work this week and trying to get some outstanding builds done. (Red S2+, MTG2 Mag and MTG2 MT40) Iā€™ll keep playing with it after the weekend.

When you say ā€œI finally found work (yay)ā€, did you mean you just got a new job? If so, congrats!!!

Jim