> I have a circuit where I have a pic16f877 that commands four water pumps. > The connections between the pic and the pumps is made this way: > PIC -> 5k6 resistor -> Bc337 transistor -> relay -> contactor -> pump > I start the pumps in secuence and when a presure sensor signals, I shut > down > every pump one by one. > When the last pump stops, the pic resets, and it should not. How are you getting the power for the PIC? It could be that a power spike due to the pump turning off resets the PIC. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist