Quote Originally Posted by skimask View Post
It might not have to survive without power.
If you power up, read a byte from eeprom, you can know what mode you were in last time around, increment that value, then power down.
Next time you power up, you read the same byte, the mode has incremented, save the value, power down...wash lather rinse repeat.
And there's probably some slick single-button power on/off trickery going on.
Do a search and you'll find a slick single-button power on/off trickery circuit here too...
Thanks for your prompt reply Skimask (as always I must add )


If you power up say after 10 seconds it remembers the last mode, but if you do an ON-OFF-ON cycle in less than a second it changes modes as described. Thats the only way to change modes, fast ON-OFFs

No button trickeries, just fast ON-OFFs I have the driver at hand, and this technique is rather common in new multimode LED flashlights.

I know how to do it by using an extra diode and a PIC pin to detect power lost, but this circuit uses a more efficient way for doing that.