As others have pointed out, this isn't a microcontroller problem, it's a design problem. When in reset, and in case of a program crash, the outputs may go uncontrolled by the micro. It's your responsibility to design the supporting circuits so that undesired operation is suppressed. Depending on how you are driving the relays, pull up or pull down resistors may be used to turn the relay drivers off when the micro isn't controlling them. You may also want to have some sort of hardware lockout that prevents relay activation unless you are sure that the program is executing properly. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .