Look at http://www.microchip.com/Download/appnote/category/rdesigns/40171a.pdf it should answer any of your questions. > At 01:28 PM 8/22/01 -0500, you wrote: > >Had some trouble with what seemed like a simple application: using a > >12C509A to control a triac that passed generator AC to a light bulb. I'm > >the software guy, so I apologize if this description is not adequate. > >Two of the pic pins were connected thru 270 ohm resistors to the triac > >(a Teccor Q2008L4). The pins were driven low for 150us to turn the triac > >on. Two pins were used to ensure adequate drive current for the triac. > >The pic was very inconsistent - it seemed to run properly some of the > >time, but had problems most of the time. The hardware guy said that the > >way this circuit was arranged, Vdd + 1 was present on the load side of > >the 270 ohm resistors whenever the triac was on. Since this would feed > >current back into the pins, and the 1V exceeded the device spec, and the > >pic was behaving strangely, he added a transistor between the pic and the > >triac (so only one pic pin to turn on the transistor is required now). > >I used a fresh chip for the software, and now everything runs fine. My > >questions are: > >- what deleterious effect was the original design having on the chip? > >- was that likely the cause of the strange behavior? > > Putting current back through protection diodes, it could cause latch-up > or other bad effects. A little-known fact is that triacs have a voltage > on the gate (when on) that is the same polarity as the load current. > > >- if this was doing something bad to the chip, are the ones I used before > > (which were windowed parts) likely to be permanently damaged? Is there > > a way to test them? -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.