I created a contactless reset switch for the 16F628A. It consists of two(to compensate for different light situations) Light Dependent Resistors (and two resistors to create a reference) and a comparator to compare both. Another option is a pushbutton and no LDR. I ask you, dear reader, about your pros and cons regarding one option compared with the other one. My application is to work in a relatively dark environment and a light one. As a starting point, my pros: LDR Pro: - classy - no contact (compared with the switch), so no abrasion. - using is effortless - fast change of states(only depending on your hand's speed) Pushbutton Pro: - Having used a LDR often, it might not have the same value as the one being used as a reference. So light and dark changings cause a value change when being exposed to the same light intensity. - Secure under any circumstances, push means contact, release means none. - Lasts Millions of pushes and releases. - I can always be sure about its state. Either the cylinder is inside or not. Regards TK. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist