AC lamps dimmer circuit

look alike, but how if I use ATmega 8535? Using PWM