Microchip Technology Inc

PIC12F1572 RGB Color Mixing Demonstration

Summary

Traditionally, white and fixed-color LEDs have been used in LED-based lighting designs. However, designers are now looking for a solution to accurately mix combinations of red, green and blue (RGB) for new applications in architectural, entertainment, automotive, outdoor façade, decorative, signage and interior lighting applications.

The range of applications for Light Emitting Diodes (LED) continues to expand as LEDs offer excellent color saturation, energy savings and the opportunity to integrate intelligent control.

Offering a wide array of products with highly integrated peripherals, Microchip’s PIC® microcontrollers can bring cost-effective intelligence to nearly any application. This is demonstrated by the general purpose 8-pin PIC12F1572, which provides a flexible platform for creating intelligent solutions for a variety of applications including home appliances, motor control, power conversion and lighting.

The 8-pin PIC12F1572-based color mixing RGB badge provides a detailed insight into color mixing theory and demonstrates how PIC microcontrollers can provide intelligent color mixing for LED lighting applications.

For more information on the PIC12F1572, visit www.microchip.com/PIC12F1572.

 

Product Highlights

PIC12F1572

  • 3 x standalone 16-bit PWMs with independent time base
    • Can be used as an independent 16-bit timers when PWM not in use
  • 4 channel 10-bit ADC with voltage reference
  • 5-bit DAC
  • Comparator
  • Complementary Waveform Generator (CWG)
  • EUSART

PIC16F1455

  • USB with active clock tuning
  • 10-bit PWM
  • 5 channel 10-bit ADC with voltage reference
  • 5-bit DAC
  • Comparators
  • Complementary Waveform Generator (CWG)
  • EUSART, SPI/MI2C™

MCP1640

  • Boost DC/DC regulator

Demonstration Overview

  • High resolution color mix with Cree RGB LED
  • Two modes of operation:
       PIC12F1572 with MCP1640
       PIC12F1572 with PIC16F1455

The Color Mixing Demonstration has two modes of operation designed to produce a range of colors that appear on the CIE1931 XY chromaticity chart.


Demonstration Highlights

  • Interactive Color Control
    • mTouch™ technology color control slider
    • Auto rotation of custom color
    • Regulated Battery System Power
  • USB connectivity for PC Chromaticity Selector GUI
    • USB System Power

Development Made Easy

Start with the FREE download of schematic and ‘C’ source code that can easily be modified to your specific application needs. Then leveraging the expertise and products from Microchip’s partners to speed up your development of high-quality USB, mTouch technology and lighting applications.

Downloads

Microchip Product and Sampling Information

Contact your local sales representative to see a working demonstration of the RGB Color Mixing Badge.

Partners

Energizer

Demonstration Overview

  • High resolution color mix with Cree RGB LED
  • Two modes of operation:
       PIC12F1572 with MCP1640
       PIC12F1572 with PIC16F1455

The Color Mixing Demonstration has two modes of operation designed to produce a range of colors that appear on the CIE1931 XY chromaticity chart.

Mode 1: The mTouch technology color control slider allows the user to select the color mix of the RGB LED with a predetermined color palette. Touching, or sliding your finger along the color slider will send the position of your finger to the PIC12F1572 which is then translated into the corresponding color mix being sent to the RGB LED. When corresponding color mix being sent to the RGB LED. When no touch is detected after a specific time out period, the PIR12F1572 will begin rotating through a custom color mix until the next touch is detected.

Mode 2: When using the PC chromaticity selector GUI, the PC application performs color calculations to generate the red, green and blue PWM duty cycle values required to reproduce the selected color on the RGBbadge board. The PWM duty cycle values are supplied to the PIC12F1572 via the PIC16F1455 USB to EUSART converter. When the PIC16F1455 receives data from the RGBbadge Chromaticity Selector application, the PIC12F1572 automatically switches from Mode 1 operation to Mode 2. In Mode 2 the mTouch slider functionality is replaced with EUSART functionality to provide communications with the PC application.

In either mode of operation, individual red, green and blue LEDs have brightness controlled by varying the duty cycle of three dedicated 16-bit PWMs. Each individual PWM has 16 bits of resolution with its own time base, allowing for increased accuracy and smooth color transitions.

Block Diagram

Partner Overview

CREE logo
Cree®, Inc. leads the industry through performance and application optimized lighting-class LEDs that simplify design and lower system costs to obsolete energy-wasting traditional lighting. Cree’s relentless innovation drives the LED lighting revolution with products designed to accelerate LED adoption and push the boundaries of what’s possible with LED lighting. Cree’s LED product families include XLamp® and High Brightness LEDs.
Kee Group Logo
KEE Group is an ISO 9002, QS 9000, and TS 16949 Certified Global manufacturer of membrane and capacitance switches, rubber keypads, plastic and metal identification badges and graphic overlays, decorative injection molded plastic products including IML, IML, IMA, and IMR.
Energizer Logo
Energizer Holdings, Inc., headquartered in St. Louis, MO, is one of the world's largest manufacturers of primary batteries, portable flashlights and lanterns. Energizer® Ultimate Lithium batteries deliver long-lasting power to keep up with today’s high-tech devices like digital cameras, LED flashlights and handheld GPS devices.

RGB Color Mixing Video Channel