I have a PIC18f13k50 and I need to control my heating element using the PIC. I understood that I can use an optocoupler and a triac. I am using a zero crossing detector MOC3061 and a triac. My question is whether I can use PWM to control the optocoupler? I understand that zero crossing is good for a resistive heating element. The heating element is a 110V AC. around 2A. If I cannot use the PWM to control the heater, any opinions on how I could use the PIC with the heater. Thanks.