> Yes, of course. I just got carried away. The one consideration with > driving the triac directly is protecting the PIC if the triac fails > (shorts), dumping 24 volts into the port pin. A series resistor is > required between the port and the gate of the triac, but the value > needed for reliable triggering may be too small to protect the PIC. An > optocoupler would be useful here; in fact, that would be the only reason > for using one. If the optocoupler fails(drastically) there is no guarantee it will continue to isolate. All the irrigation controllers I've seen have used triacs with no optocouplers. I'm of the opinion that the "C" equivalent of an optocoupler is a GOTO - in other words, if you are using one, you should really think long and hard, because there are very few reasons to use them. Cheerful regards, Bob -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads