Microchip Technology APGRD004 Data Sheet

Page of 20
www.microchip.com/lighting 
LED Lighting Solutions Design Guide
         
   
LED Lighting Solutions
Generating PWM Control Signals
There are multiple ways to generate PWM control signals to 
control power circuits. 
■ 
Devices with the Capture-Compare-PWM (CCP) module 
can generate PWM signals to control power circuits using 
an on-chip digital timebase. The signal pulse width is 
controlled by the MCU clock and a duty cycle register.
■ 
The Enhanced CCP (ECCP) module allows one PWM signal 
to control 2 or 4 output pins for half-bridge or H-bridge 
control, respectively.
■ 
Devices that have a comparator and the ECCP module 
can use the comparator signal to control the turn-off time 
of the PWM signal.
■ 
Devices with comparators and a PWM SR latch can use 
comparator signals and/or clock pulses to turn the latch 
output on and off.
PIC12HV615
V
DD
Buck Topology
Driver
Drive
Level
-
+
V
SS
V
BUS
Other Device Options:
PIC12F1822
PIC16F1823
+
Comparator
Buck LED Driver Using a Comparator
■ 
An external PWM peripheral IC may be used. This option 
is useful when multiple high speed PWM channels are 
required.
■ 
PWM signals can be generated using software and I/O 
pins. This option is less costly when PWM frequency and 
duty cycle resolution requirements are not too high.
A PIC microcontroller with an on-chip comparator such as 
the PIC12F609 can be used to implement a simple LED 
driver. The PIC12HV609 adds an internal regulator, allowing 
operation from a DC bus higher than 5 volts.
Literature on the Web
■ 
AN874 – Buck Configuration High-Power LED Driver,
 DS00874
■ 
AN1074 – Software PWM Generation for LED Dimming
 
and RGB Color Applications, DS01074
R
B
G
PIC12HV615
ADC Input
Color Set
RGB LED
50 mA
Other Device Options:
PIC12F1822
PIC16F1827
User
Interface
V
IN
RGB Color LED Application Using PIC12HV615