On Tue, 28 Jan 2003, William Chops Westfield wrote: *>While we're on the subject: *> *>Assorted products turn on with the touch of a momentary switch, and turn *>off either by more button pressing, or by timer. *> *>Do these work simply by using the sleep mode of a microcontroller, or do *>they use some kind of cpu-controlled switch? I'm thinking LED keychains *>and such here, and it seems that battery life is longer than I'd expect *>even for a micro in sleep mode, given the small batteries! There are chips for that but most cheap products use a transistor circuit. The button charges a capacitor and when it discharges the light goes off. Depending on how much you pay the turnoff can be gradual or abrupt. Peter -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.