Basic flashlight firmware on PIC10F322

Hi guys,
Here’s a demo of some basic firmware I wrote for single-channel (white only) lights that use power cycle switches. I originally created this for Cereal_Killer’s giveaway lights, but it could be used in just about any light. This runs on a PIC10F322, which is a very cheap and tiny 6-pin microcontroller. The UI has 3 modes and includes battery monitoring for a single li-ion cell. The code is completely open-source and can be tweaked easily if you want to make an adaptation of it. I’ll be getting this put into ToyKeeper’s launchpad repository so everyone can access it

The code and a summary of the interface are available here:

http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/head:/tterev3/power_cycle_light/

This is an interesting firmware. It has a user-configurable brightness mode where the level is chosen by ramping the output. Uncommon to see this without an e-switch.

Not that uncommon anymore, there are several power cycle only ramping options for AVR.

Still tho yes a very cool FW, I will be modifying the BLF 17dd_PIC to accept the 10F322 for power cycle once I return from my weekend trip. Can’t wait to get one up and running for my S1, tterev3 watch your mail, got something for you for this I’ll drop in my mail box Monday…

Thanks for sharing tterev3 and for hosting ToyKeeper. I'm still trying to get around to programing and flashing PIC's.

I’ve got the first driver built and programmed with this code, a simple 10*7135 driver.

It behaves differently than the video, it always starts on max if longer than the 3sec reset time (set via 10uf and 91k omh) and it doesnt have the strobe level. I made no changes to the code from toykeeper’s hosting. Simply downloaded, added the files to my XC8 project and flashed. Everett can you confirm that code is good when d/l’d from there please?

Yeah that’s a different version without the strobe, I’ll email you the other one

Damn it, should of checked this thread before buttoning up the P60 host I stuck this in lol. Oh well I’ll live with it as-is (not like I use this light, just a test host) while I wait on my SOT-26 breakout boards I just ordered, programming with air wires is a huge PITA these things are so small! I mean I knew how small SOT-23 was but I’d never needed to airwire to a 6-pin one lol.

I do like how it’s “designed” for a forward click (not sure if thats exactly what you were going for but it works great with one, some FW’s arnt the easiest to use with a reverse clicky and then you dont have momentary use)

I’ll make a new thread on this driver since it works with other code (and even an ATTiny10 as a direct swap) but for tonight…

Sorry about that. I sent the first version of the code to ToyKeeper since most people don’t seem to like the beacon strobe. Should have been more clear

FWIW, I’m happy to include multiple versions. :slight_smile:

I’ve been a bit lazy about collecting some of the firmwares I’m aware of, but in theory the long hours at work should be over soon since we’re almost at the end of a development cycle. So, please, send me any firmware you’re willing to share and I’ll get it into the repository.

That’s a dangerous request, I probably have hundreds of random flashlight firmwares in my archives… I’ll try to pick out some of the better ones and start sending them over to you

I don't know squad about pic programming. But I think you're all awesome for sharing and hosting and developing these firmwares. More power to you :-D