Dan Michaels wrote: > > Brah wrote: > ....... > >Switch bounce is most likey a problem, but even a 1 mS delay in the > >routine doesn't always cure it, and I still get the 2nd interrupt > >occasionally. > > Try a "much" longer debounce delay. 1 msec is far too short > for any mechanical devices that bounce. And take a tip from a hardware guy, use an RC network on your reed switch, they are awful things for bounce. Assuming the reed will not be switched at high frequencies or anything, you can use one R and one C to give you big (50mS+ ??) delays and eliminate those chatters. -Roman -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads