The idea is to make a smart lamp that can dim and switch five sets of leds, and one 230v dimmable bulb.
The microcontroller detects the phase of the ac after the transformer. This will be used for both the dimming of the ac bulb. It will also keep the clock on time since the mcu will use the internal 8mhz rc-oscillator, which is not accurate enough.
The pic16f886 could run on 20MHz but not in this project, because it has to run on 3.3 volts.
For the connectivity part, a CC3000 wifi module will be used. This can take care of everything up to tcp or udp. It will feature a small web-server, which will store it's information on a small sd-card. There will be a few POST requests possible which will set the color and the intensity etc of the light.