> Because of the frequency of occurrence How often does the motor get switched ? Can you do many starts to eliminate that as a cause ? Is the relay on the same Vcc as the PIC ? It seems to me there are two suspects - the power supply and the sensors You know that the present set-up hangs, so add two more PICs with identical code. One is run off a separate clean supply (ie a battery) with sensors, the other is run on the mains supply with no sensors. If either of them hang then that may give you a clue It sounds as though the sensor **may** not be the problem if it's PIC-driven and PIC-received. So disconnect the sensor and see what happens Short of that I can't think of anything else except logging > Unfortunately, it is not! This is a pilot installation, many more > would be hopefully made once I sort out the issue! Ooooh, bugger -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu