I'm not a professional; I'm a hobbyist. My only qualification is a lack of expertise that has lead to many similar issues - odd, inconsistent behavior that seemingly comes from nowhere. For me, it seems always to be a power issue - sagging voltage, poor connection somewhere, two wires touching... I'm careful, I worked twenty years soldering under a microscope, but somehow...
So, I'd first say, "I feel your pain!" For me, better it doesn't work at all - those kinds of problems I can isolate.
I'd first try isolating your power - run it from batteries or a second supply to be sure your power is good. Be sure you have a healthy smattering of filter caps around your inputs. Henrik's idea is good, good solid power at decisive levels!
Presuming you're "light" on equipment as I am, maybe you could hook up your inputs (reed switch lines) to ADC and take a look at voltage that way... see what kind of jitter you've got...
The other thing is, perhaps you've got some debounce issues - comes to mind as you say, "The PIC jumps to the next event."
It's hard to say anything for sure as I cannot see the program, track, or wiring. Just some ideas and moral support...
Let us know how it works out (and I think it would be ok to post a picture of the layout - I know I'd like to see it).
Bookmarks