The RGB LED Lighting Shield with XMC1202 is an intelligent evaluation board for driving high-brightness RGB LED strips. It features an integrated XMC1202 microcontroller with an embedded Brightness Color Control Unit (BCCU), enabling flicker-free dimming and precise color control. The shield is Arduino-compatible and communicates with the host board via a simple I²C interface.
Key Features:
- Arduino-compatible, directly stackable on XMC1100 Boot Kit from Infineon and Arduino Uno R3.
- Integrated XMC1202 MCU with embedded BCCU for intelligent, flicker-free LED control.
- Three independent constant-current channels (R/G/B) with 12-bit resolution per channel.
- Wide DC input voltage range, configurable for 12V/24V LED applications.
- Simple I²C interface with Arduino library support.
- High-speed pulse density modulation for smooth dimming and color mixing.
This tutorial shows you how to set up and use the RGB LED Lighting Shield with XMC1202 in the Arduino IDE. You'll learn how to configure the hardware, install the necessary software library, and control an RGB LED strip through simple API calls for color mixing and brightness adjustment.
What you'll achieve: By the end of this tutorial, your RGB LED strip will smoothly cycle through basic colors (red, green, blue) and predefined colors like Fuchsia, Green, and Olive, with adjustable brightness (dimming).
1. Hardware Setup1.1 Mount the RGB LED Shield on the Boot Kit
- Solder the pin headers onto the Infineon Boot Kit XMC1100 before proceeding.
- Plug the Infineon RGB LED Shield with XMC1202 onto the Infineon Boot Kit XMC1100 for Arduino using the Arduino-compatible headers.
- Make sure all pins are aligned and fully inserted.
1.2 Connect the RGB LED Strip
- Identify the R, G, B and supply terminals on the shield.
- Connect the DEKO-Light SAUNA-COB-24V LED strip according to the shield’s documentation: -- Red channel → R output -- Green channel → G output -- Blue channel → B output -- 24V supply and common return according to the strip type (observe polarity!)
- Insert the wires fully into the push-in terminals to ensure reliable contacts.
1.3 Connect the Power Supply
- Connect a 24V DC power supply (rated at 0.5A, within 15W power) to the power input of the shield. The DEKO-Light SAUNA-COB-24V LED strip requires a 24V input — make sure your supply voltage matches this requirement before powering on.
- Double-check polarity (V+ and GND) before turning it on.
1.4 Connect the Board to the PC
- Use a USB cable to connect the XMC1100 Boot Kit to your PC.
- In the Arduino IDE, verify that the board and COM port are correctly detected.
Please make sure to install the Arduino IDE from here and XMC for Arduino support from here before continuing.
We will use the Arduino library for the RGB LED Lighting Shield. In the Arduino IDE, open Sketch → Include Library → Manage Libraries. Search for “RGB-LED-Lighting-Shield”.
Note: Make sure to install "RGB-LED-Lighting-Shield" (with hyphens), not the older "RGB LED Lighting Shield XMC1202" version.
After installing the library and opening the Arduino IDE, configure your board:
- Go to Tools→Board→KIT_XMC1100_BOOT_001 board as your active board.
- Select the correct COM port under Tools →Port to ensure proper communication with the board.
In this section, we will go through the main functions provided by the RGB-LED-Lighting-Shield library and provide some sample code to demonstrate what the shield can do.
Main Functions:
setIntensityRGB(r, g, b):Sets R/G/B channel intensities directly (12-bit each, range 0x000 to 0xFFF).setColor(COLOR_NAME):Sets predefined named colors such as RED, GREEN, BLUE, FUCHSIA, OLIVE, BLACK.setIntensityRed(value) /setIntensityGreen(value) / setIntensityBlue(value):Adjusts one channel independently without affecting the others.setDimmingLevel(level):Sets global brightness (dimming), range 0x000 (off) to 0xFFF (max).setFadeRate(value):Controls how fast brightness transitions happen.setWalkTime(value):Controls smooth linear transition time between colors.
The code begins by including the necessary header file:
#include <Arduino.h>
#include <rgb-led-lighting-shield-ino.hpp>
RGBShieldIno RGB_Shield = RGBShieldIno();After including the header, we create one shield object (RGB_Shield) to access all control APIs over I²C.
3.1 Setup Function
The setup( ) function initializes the shield:
void setup()
{
RGB_Shield.begin();
RGB_Shield.setDimmingLevel(0xFFF); // Start at maximum brightness
}RGB_Shield.begin() initializes I²C communication with the onboard XMC1202 controller. RGB_Shield.setDimmingLevel(0xFFF) sets global brightness to 100%, ensuring all color effects are clearly visible.
3.2 Color Control with Direct RGB Values
To set exact channel intensities, use: RGB_Shield.setIntensityRGB(red, green, blue), each channel is 12-bit (0x000 to 0xFFF), so you can mix colors precisely:
RGB_Shield.setIntensityRGB(0xFFF, 0x000, 0x000); //Pure red
RGB_Shield.setIntensityRGB(0x000, 0xFFF, 0x000); //Pure green
RGB_Shield.setIntensityRGB(0x000, 0x000, 0xFFF); //Pure blue
RGB_Shield.setIntensityRGB(0x000, 0x000, 0x000); //Black (off)This is the best method when you want full manual control of color mixing.
3.3 Color Control with Predefined Color Names
For simpler code, you can use named colors: RGB_Shield.setColor(COLOR_NAME)
For example:
RGB_Shield.setColor(RED);
RGB_Shield.setColor(GREEN);
RGB_Shield.setColor(BLUE);
RGB_Shield.setColor(FUCHSIA);
RGB_Shield.setColor(OLIVE);
RGB_Shield.setColor(BLACK);This is useful in demos, because the code is easier to read than raw RGB hex values.
3.4 Independent Channel Control
If you want to tune one channel without touching the others, use:
RGB_Shield.setIntensityRed(value);
RGB_Shield.setIntensityGreen(value);
RGB_Shield.setIntensityBlue(value);This is especially helpful for strip calibration or debugging channel wiring.
3.5 Brightness and Transition Effects
Besides static colors, the shield also supports dynamic effects. RGB_Shield.setFadeRate(value) controls how fast brightness changes are applied. RGB_Shield.setWalkTime(value) controls linear transition time between color targets.
Both parameters accept values from 0x000 (instant change) to 0xFFF (slowest).
Timing calculation: The actual transition time depends on the internal clock frequency. The approximate formula is:
- FadeRate time ≈ value × 10ms (for values < 0x100)
- WalkTime time ≈ value × 10ms (for values < 0x400)
For example:
RGB_Shield.setFadeRate(0x48); // ~5 second fade transition
RGB_Shield.setWalkTime(0x2AC); // ~7 second color walk transitionNote: These are approximate values. You may need to fine-tune based on your hardware and visual preference.
Quick Reference Values:
// Instant change (no transition)
setFadeRate(0x000); setWalkTime(0x000);
// ~1 second transition
setFadeRate(0x010); setWalkTime(0x064);
// ~3 second transition
setFadeRate(0x030); setWalkTime(0x12C);
// ~5 second transition
setFadeRate(0x048); setWalkTime(0x1F4);
// ~7 second transition
setFadeRate(0x060); setWalkTime(0x2AC);
// ~10 second transition
setFadeRate(0x090); setWalkTime(0x3E8);3.6 Simple Test Example
Based on the functions introduced above, the following small example can be used to quickly verify that the RGB LED Lighting Shield is working properly. The sketch first cycles through the three basic colors, then switches to a few predefined colors, and finally demonstrates brightness adjustment and simple transition effects.
#include <Arduino.h>
#include <rgb-led-lighting-shield-ino.hpp>
RGBShieldIno RGB_Shield = RGBShieldIno();
void setup()
{
RGB_Shield.begin();
RGB_Shield.setDimmingLevel(0xFFF); // maximum brightness
}
void loop()
{
// Basic RGB test
RGB_Shield.setIntensityRGB(0xFFF, 0x000, 0x000); // Red
delay(500);
RGB_Shield.setIntensityRGB(0x000, 0xFFF, 0x000); // Green
delay(500);
RGB_Shield.setIntensityRGB(0x000, 0x000, 0xFFF); // Blue
delay(500);
// Predefined colors
RGB_Shield.setColor(FUCHSIA);
delay(1000);
RGB_Shield.setColor(GREEN);
delay(1000);
RGB_Shield.setColor(OLIVE);
delay(1000);
// Brightness test
RGB_Shield.setDimmingLevel(0x7FF); // about 50%
delay(1000);
RGB_Shield.setDimmingLevel(0xFFF); // 100%
delay(1000);
// Transition test
RGB_Shield.setFadeRate(0x48);
RGB_Shield.setColor(RED);
delay(1500);
RGB_Shield.setWalkTime(0x2AC);
RGB_Shield.setColor(BLUE);
delay(3000);
// Reset transition settings
RGB_Shield.setFadeRate(0x000);
RGB_Shield.setWalkTime(0x000);
}This short example confirms that the shield is responding correctly and that the main color-control functions work as expected.
You now have a fully working RGB LED lighting system using the Infineon RGB LED Lighting Shield with XMC1202 and the XMC1100 Boot Kit.
With just a few API calls, you are able to:
- Cycle through primary and predefined colors.
- Mix custom colors with full 12-bit per-channel precision.
- Adjust global brightness in real time.
- Add smooth fade and color-walk transitions for dynamic ambient lighting effects.
This setup provides a flexible base that can be expanded in many directions, from architectural mood lighting and interactive display systems to smart-home accent lighting. Feel free to explore the colorful possibilities and create your own unique lighting experience! Happy making, and enjoy your colorful lighting project!










Comments