A PIC controls a triac connected across the supply by monitoring power line zero-crossing. The PIC controls dimming by delaying the time the triac fires, which trims the peaks off of the AC waveform.
The basic principle of the system is to inject a signal onto the power lines at a much higher frequency than the 50 or 60 Hz of the AC power itself. Using both active and passive filters ...