A live demo/tutorial on several approaches to lamp dimming using PICs was presented at the Microchip Seminar earlier this year. The seminar notes include the code. Buttonhole your local rep and try to get a copy. Reg Neale