Hi,

yes, i set all the pin state 1st but outside the main loop, i simulate it and my switching and my 3 phases channel all works ok.
i will test it in the real physical PIC tmrw and see the results, then feed back to you again.

photoelectric