Dear sir We have designed a circuit for switching ON and OFF electrical loads (of capacity 3KVA to 100 KVA) using electrical contactors and also controlling/varying the input voltage to the load using multiple tapped auto transformer. The contactor and the tap changing is controlled based on inputs from real time clock and control program in the microcontroller Atmel 89c51. We are observing that the time in the real time clock is getting corrupted and microcontroller program is reset after the changed time.This usually occurs when the electrical loads are switched On or OFF. Please suggest us the reason.We have tried to take care of EMI by enclosing the PCB in a metal box. Regards Vishnu