Touch activated LED valentine, circuit.
Driving LEDs with a microcontroller
The LEDs are dimmed using a hardware pulse-width module (PWM) on the PIC (PORT C, pin 5). The PWM isn't strong enough to directly power all the LEDs, instead it switches the ground of the LEDs through a transistor. This is the same method used in the RGB color changer and the analog gauge projects.