I looked at doing this for a project. What really matters is that once the tirac is on, the gate goes low before the next zero crossing if you want it to go off. This can be done by setting up the timer to interrupt you whenever the output needs to change state. In the ISR to handle the timer interrupt, you would toggle the output and immediately schedual the next event. Like you, I wanted to use the timer to keep track of other things. One thing I found was an I2C real time clock - Phillips PCF8593. You could set the RTC to give you an alarm interrupt, freeing up the timer. This was optimal for me because some of the delay times were very long. The application might want to wait an hour and then dim the light for 5 minutes. I drove the gate with a MOC3033 triac optoisolator. You can built a zero crossing detector from a comparitor to synchronize the the gate transitions with the zero crossings. If you want the chopping to be pasive to your PIC, why don't you use two PICs? Regards, Chris Atkins ---------- From: Aaron J. Miller Sent: Thursday, March 27, 1997 2:15 PM To: PICLIST@MITVMA.MIT.EDU Subject: Suggestions for AC chopper? Things are changing at NetForward! http://www.netforward.com/changes.shtml ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hello all, This question is only marginally related to pic's since I am going to use a 16C84 to control the chopper, but there seem to be quite a few bright people out there who may be able to help... I am trying to make an incandescent lamp dimmer from a 16C84 and planned on doing a simple waveform chop using a triac. I realized, however, that since the pic is going to be doing a bunch of other time sensitive stuff that I don't have the processor time to manually sense the zero and chop the wave using the pic. So, is there any easy method to passively (from the pic's point of view) chop the AC wave? i.e. use 8 I/O pins to a D-A to give a reference to the chopper circuit and have it do the rest? That way I can just output the light level to the pins and it would stay put leaving the rest of the processor available? Thanks for any help, aaron ------------------------------------------------------------------------------- - Aaron J. Miller Email: millera@stanford.edu - Physics Graduate Student Web : http://www.stanford.edu/~millera - Stanford University Phone: (415) 372-5575 (until 4/12/97) -------------------------------------------------------------------------------