PIC® MCU LED Integration

Last modified by Microchip on 2023/11/10 11:17

PIC® MCU LED Integration Benefits

Light Emission Diode (LED) lighting applications can benefit from the intelligence of an MCU. The MCU can be used for a variety of tasks, including the user interface, communication, battery status monitoring, and temperature measurement. The addition of an MCU to a design does not have to be complicated, space-consuming, or expensive. Microchip offers the PIC10F family of MCUs with devices that have six pins in a space-saving SOT-23 or 2 x 3 mm Dual Flat No Leads (DFN) style package. The oscillator and reset circuitry are inside the device. Connect power and ground, and you still get four I/O pins that can be programmed to do anything you want. It’s as simple as that. The PIC10F pins can be used as analog or digital pins. Two devices in the PIC10F family have analog comparator modules. Two PIC10F devices are available with an 8-bit Analog-to-Digital Converter (ADC). There are only 33 assembly instructions to learn in order to write code for the PIC10F. There are also C compilers available for the PIC10F family if you prefer to write in a high-level language.

Package Comparison

TDFN-8.png

PIC10F322-SOT.png

PIC12F1501-MSOP-8.png

PIC12F1501-SOIC-8.png

8-TDFN (MC/MNY) 2 x 3 mm6-SOT (OT) 3 x 3 mm PIC10F2XX6-SOT (OT) 3 x 3 mm PIC10F2XX6-SOT (OT) 3 x 3 mm PIC10F2XX

Back to Top

Reference Materials

Back to Top

Simple Dimming Control

One application for an MCU in LED lighting is brightness control. A power LED can be dimmed by reducing the drive current. However, this is not the most efficient way to control the brightness of an LED. A power LED provides the best efficiency at the maximum rated drive current. Better efficiency can be obtained by turning the LED on and off using a low-frequency Pulse-Width Modulation (PWM) signal. The PWM signal is connected to the enable input of the Switch Mode Power Supply (SMPS) control Integrated Circuit (IC). The LED is always driven at the maximum current level when it is on. The MCP1632 300 kHz Boost Converter Demo Board takes advantage of the MCP1632 PWM Controller. MCP1632 is a high-speed, Current mode PWM controller intended for applications that require low-side MOSFET control, such as the Boost, Flyback or Single-Ended Primary Inductance Converter (SEPIC). The MCP1632 converter accepts input bias voltages between 3V and 5.5V, ideal for Direct Current (DC)-DC converters, LED drivers, batteries chargers, and bias generator applications.

Back to Top

Integrate Multiple Tasks – PIC12 and PIC16 Mixed Signal Solutions

The LED current drive function can be integrated with other tasks on the same MCU. Members of the PIC12F and PIC16F device families provide the next step up from the PIC10F family and facilitate highly integrated mixed-signal designs in 8-, 14-, and 20-pin package options. The available peripherals in this series of devices include:

These peripherals allow external power circuits to be directly controlled by the MCU. For a LED driver application, the analog peripherals can be configured and interconnected in software to provide constant current regulation. This leaves the CPU free to run other tasks such as communication, dimming control, or fault detection.

Back to Top

Internal 5V Regulator

The internal shunt voltage regulator option allows the MCU to be operated from a higher voltage DC bus making it useful in Alternate Current (AC) line-powered applications. Only a series resistor is required between the power supply and the device VDD pin. Devices with an HV designator in the part number have an internal regulator.

Boost LED Driver Application using PIC16HV785

The following figure shows an application example using a PIC16HV785. The PIC16HV785 has two on-chip op amps, two on-chip comparators, two SR latch PWM modules, and an adjustable voltage reference. This combination of peripherals can be digitally configured to implement a wide variety of SMPS circuit topologies to drive LEDs.

Application example using a PIC16HV785

Back to Top

Compatible Pinouts Migration

The 8-, 14-, and 20-pin devices in the PIC12F and PIC16F families have compatible pin-outs for upward and downward migration. Common connections such as power and ground are located in the same positions on the package footprint so that an 8-pin design can easily be expanded to a 14- or 20-pin design.

Compatible pinout

Back to Top

​Learn More

Back to Top