You are right on, Scott!! I am a competition pistol shooter (strictly amateur!) and 50 ms would be UNACCEPTABLE!!! The delay between pulling the trigger and the hammer actually hitting the primer is called "lock time" and I can definitely tell the difference between two of my guns! It can be enough to throw off your aim and I'll bet SERIOUS sums of money that the SLOWEST gun is still a lot faster than 1/20th (50 Ms.) of a second!! As you mentioned, a doorbell is a non-issue, but a gun? Different ball game! FWIW! Dennis Scott Dattalo wrote: >On Mon, 23 Feb 2004, Wally Barnacle wrote: > > > >>>Imagine how the user will feel when the gun doesn't fire for 50ms or >>>whatever :) >>> >>>I am going to try the 10nF cap over the switch, and if that doesn't help, I >>>will put an "interrupt off" period in to. >>> >>>The main reason this is an issue is that the trigger is ignored for a >>>period >>>after each pull to enable the mechanical mechanism time to respond. >>> >>> >>50 ms is humanly impossible to detect. >> >> > >Perhaps you should clarify what you mean, Wally. According to the human >factors studies I've seen, 50mS is possible to detect. For example, that's >why PS/2 packet rates are a minimum of 40 packets/second. Hand writing >packages often require 100 packets/second. Now, if you're ringing a door >bell I doubt a 50mS delay is perceptible. > > > >>If you really need to do it faster you can sample the switch say n times, if >>it is closed n times it will be debonced. If not, sample another n times. >>This is probably the fastest way to do it with software. >> >> > >I do agree with this approach and is what I've implemented here: > >http://www.dattalo.com/technical/software/pic/debounce.html > >The routine described there will sample 8-inputs simultaneously. A switch >is debounced if it is sampled in the same state for four consecutive >samples. This routine works best when called at a constant rate (from a >timer interrupt for example). I'm not sure what the original poster's >switch is like, but for many applications calling this routine every 10 mS >is adequate. > >Scott > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body