Hi,

Thanks for responding with these suggestions Alain. I have tried resetting timer 2 - pic16f870 uses this for hardware pwm - t2con.2 = 0.
This did not seem to work, the output pwm drifts slowly away.

I will look through Steve Monfette's code to see if i can get some pointers.


The circuit is - as you correctly surmised - for firing four SCR's at Zero crossing ~ 8kw power load so i want to get the timing bang on, the SCR's are expensive!

I have been looking at the CCP Compare section of the datasheet and i'm still a little stumped?? How can i use this to synchronise the HPWM with an incoming zero crossing signal? I've been knee deep in datasheets and tutorials trying to get my head around this for days.

Many Thanks again for your time.

Gordon