> origianally had problems witht he hall switch bouncing. but i now > used a relay for the switch to contact So using the Hall switch to energise a relay has cured the bounce ? That sounds like the magnetic inertia of the coil is filtering the bounce noise, the result being that the contacts don't chatter If that's correct then adding an RC filter to pre-condition the switch output would help, although not strictly necessary if the s/w can do as good a job with a delay or polling routine. For example something like 10k and 100nF would be a starting point. The 10k and 100n are joined in series. Their junction goes to the PIC pin. The other end of the resistor goes to the Hall switch, the other end of the capacitor goes to 0V http://en.wikipedia.org/wiki/RC_filter You may need a discharge resistor (say 100k) across the capacitor if the Hall switch doesn't drive to 0V, as the high impedance of the PIC pin may not be low enough to discharge the capacitor between switch pulses -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist