pic microcontroller discussion list wrote: > I haven't try this myself , but it is an idea. Build a zero crossing > circuit that trigger one of the Pic's port pinns. (interrupt on port > pin) The Pic can then do the delay part. The pic wait for ???ms > before trigering the Triac. This happens 50 times per second. Your > delay must not be longer than 10ms if you use both half cycles. > > Riaan > I have done this using H11AA814 for the zero-crossing, fed into INT0 of a 12F629. The basic idea is to use TMR0 as a delay. when INT0 fires, it loads a value into TMR0. when TMR0 fires, it turns on a triac. The larger the value loaded into TMR0, the shorter the delay from zero crossin. You can think of the value loaded into TMR0 as 'effective power level' The larger the value, the more power delivered to your load. Effectively all interrupt driven, leaving your code free to do other processing, such as accepting user input to increase/decrease power levels. There are several discussions in the archive on this, including one by me. search on "zero crossing idea" for that thread, or try "zero cross" for other posts. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads