
XMC1000
LED Lighting Application Kit
Getting Started

Contents
LED Lighting Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with Colour LED Card
¬ RGB Lamp using COLORLAMP01 app
(RGBLamp_Example01_1Lamp_3Channels.zip)
Example Project with White LED Card
¬ Street Lamp using WHITELAMP01 app
(StreetLamp_Example01_1Lamp_4Channels.zip)
Example Projects Download
04/05/2013 Page 2 Copyright © Infineon Technologies 2013. All rights reserved.

Contents
LED Lighting Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with Colour LED Card
¬ RGB Lamp using COLORLAMP01 app
(RGBLamp_Example01_1Lamp_3Channels.zip)
Example Project with White LED Card
¬ Street Lamp using WHITELAMP01 app
(StreetLamp_Example01_1Lamp_4Channels.zip)
Example Projects Download
04/05/2013 Page 3 Copyright © Infineon Technologies 2013. All rights reserved.
Home

LED Lighting Application Kit Composition
XMC1200 CPU Card
Micro USB
On-board COM
and Segger
J-Link debugger
5 User LEDs
Connectors
according to pin-out
XMC1200
04/05/2013 Page 4 Copyright © Infineon Technologies 2013. All rights reserved.
Edge connector for
Application cards

LED Lighting Application Kit Composition
Colour LED card
Showcases color control
Low power RGB LEDs
(10mA per channel)
Ambient
Light Sensor
DMX512 Connectivity DALI Connectivity
04/05/2013 Page 5 Copyright © Infineon Technologies 2013. All rights reserved.
RF
Connectivity

LED Lighting Application Kit Composition
White LED card
Showcases brightness control
White LED strings (5 LEDs per string)
24V powered, 20mA per channel
Temperature
Sensor
Ambient
Light Sensor
DALI Connectivity
04/05/2013 Page 6 Copyright © Infineon Technologies 2013. All rights reserved.
RF
Connectivity

Contents
LED Lighting Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with Colour LED Card
¬ RGB Lamp using COLORLAMP01 app
(RGBLamp_Example01_1Lamp_3Channels.zip)
Example Project with White LED Card
¬ Street Lamp using WHITELAMP01 app
(StreetLamp_Example01_1Lamp_4Channels.zip)
Example Projects Download
04/05/2013 Page 7 Copyright © Infineon Technologies 2013. All rights reserved.
Home

Getting Started
Development Tool: DAVE
TM
DAVETM is a free development platform for code generation by
Infineon
Can be downloaded from:
http://www.infineon.com/cms/en/product/promopages/aim-
mc/DAVE_3_Download.html
For a guide on setting up DAVETM, please refer to XMC1x00 Boot
Kit Getting Started
04/05/2013 Page 8 Copyright © Infineon Technologies 2013. All rights reserved.

Contents
LED Lighting Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with Colour LED Card
¬ RGB Lamp using COLORLAMP01 app
(RGBLamp_Example01_1Lamp_3Channels.zip)
Example Project with White LED Card
¬ Street Lamp using WHITELAMP01 app
(StreetLamp_Example01_1Lamp_4Channels.zip)
Example Projects Download
04/05/2013 Page 9 Copyright © Infineon Technologies 2013. All rights reserved.
Home

Getting Started Example
RGB Lamp using COLORLAMP01 app
Connect to PC
XMC1200/XMC1300
CPU Card
Colour LED Card
04/05/2013 Copyright © Infineon Technologies 2013. All rights reserved. Page 10

Getting Started Example
RGB Lamp using COLORLAMP01 app
1. Open DAVE
TM
2. In DAVETM workspace, create a
new “DAVE CE” project:
File->New->DAVE Project
Give the project a name e.g.
“RGBLamp_Example01”
Select “DAVE CE Project” as
Project Type
3. Select the device accordingly
04/05/2013 Page 11 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
This example demonstrates RGB Lamp functionality using COLORLAMP01
app
We will use the System Timer (SysTick) as the time base for the interrupt
Time base of 0.2s
In the interrupt, a new target dimming level or target color is regularly
set with a 7s linear walk time
Next, we will show you the steps to creating this project:
1. Instantiate COLORLAMP01 app
2. Configure Main Clock (MCLK) and Peripheral Clock (PCLK)
3. Configure Brightness and Color Control Unit (BCCU) global settings
4. Configure BCCU Dimming Engine
5. Configure BCCU Channels
6. Configure Port Pins
7. Configure SysTick
04/05/2013 Page 12 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
1. Instantiate COLORLAMP01 app
Select the COLORLAMP01 app from the
App Selection View
COLORLAMP01 app automatically uses 3
BCCU channel apps (BCCU01) and 1
BCCU dimming app (BCCUDIM01)
04/05/2013 Page 13 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
2. Configure Main Clock (MCLK) and Peripheral
Clock (PCLK)
Open CLK002 UIEditor by double-clicking
or right-clicking->UIEditor on the app in
S/W Connectivity View
In UIEditor, under the Clock
Configuration tab,
¬ change the Desired Frequency
of the MCLK to 32MHz
¬ select PCLK = 2*MCLK
04/05/2013 Page 14 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
3. Configure BCCU global settings
Open BCCUGLOBAL UIEditor by
double-clicking or right-clicking->
UIEditor on the app in S/W
Connectivity View
In UIEditor, under the
Global Configuration
tab,
¬ to get a bit time of 5us
change the Desired Fast
Clock Frequency to
800kHz
¬ to limit the maximum possible off time to approx. 5ms (no flicker)
change Watchdog Maximum Bitnumber to 0x400
04/05/2013 Page 15 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
4. Configure BCCU Dimming Engine
Open BCCUDIM01 UIEditor by
double-clicking or right-clicking->
UIEditor on the app in S/W
Connectivity View
In UIEditor, under the
Dimming Engine
Configuration tab,
¬ Enable Dimming Engine at
initialization
¬ set brightness level at 25%
change the Initial Dimming
Level to 1024
¬ set time to reach 25%
brightness to approx. 5.6s
change Desired Transition
Time to 7s
04/05/2013 Page 16 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
5. Configure BCCU Channels
Open the BCCUCH01/0 (first instance
of app) UIEditor by double-clicking or
right-clicking->UIEditor on the app in
S/W Connectivity View
In UIEditor, under the
Channel Configuration
tab,
¬ Enable Channel at
initialization
¬ Enable Flicker Watchdog
¬ change Desired Linear
Walk Time to 0s (i.e.
immediate)
04/05/2013 Page 17 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
5. Configure BCCU Channels
(continued)
In UIEditor, under the Intensity
and Packer Configuration tab,
¬ change Channel Intensity to
1365
Assign pin to P0.4
¬ Right-click on app->Manual Pin
Assignment
¬ In Manual Pin Assignment window,
set iohw as Resource, P0.4 as
Port-Pin
¬ Solve And Save
04/05/2013 Page 18 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
5. Configure BCCU Channels (continued)
Optional: Label the first app instance
¬ right-click on app -> Add User Label
¬ Type RED in the field provided
Repeat steps for the other 2 app instances (i.e. BCCUCH01/1
and BCCUCH01/2)
¬ Assign to P0.11 and P0.1 respectively
¬ Label them GREEN and BLUE respectively
04/05/2013 Page 19 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
6. Configure PORT Pins
The intention of this step is to ensure that the unused pins
are not left in a floating state
Open the IO003 UIEditor by double-clicking or right-click-
>UIEditor on the app in S/W Connectivity View
In UIEditor, under the Configure Pin tab,
¬ set 6 Port Pins
¬ enable Output Driver
04/05/2013 Page 20 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
6. Configure PORT Pins (continued)
Assign pins
¬ right-click on app->Manual Pin
Assignment
¬ in Manual Pin Assignment window,
set pinX as Resource, and P0.5 to
P0.10 as Port-Pins
¬ Solve And Save
Optional: Label the app
¬ right-click on app -> Add User
Label
¬ Type UNUSED_PINS in the field
provided
04/05/2013 Page 21 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
7. Configure SysTick
Initialization function is defined in core_cm0.h
SysTick exception handler is defined in startup_XMC1200.s
Initialize the SysTick in Main.c
04/05/2013 Page 22 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
7. Configure SysTick (continued)
Define the SysTick exception
handler routine in Main.c
¬ Set a new target color by
calling the function
COLORLAMP01_SetColor();
or
¬ Dim up or down by calling the
function
COLORLAMP01_SetDimLev
elExponential();
04/05/2013 Page 23 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
RGB Lamp using COLORLAMP01 app
Generate code
1. Click
Build project
1. Click
2. Wait for Build to finish
Download code
1. Click
2. Switch to TASKING Debug view
3. Click to run code
LED1 regularly changes color and brightness
04/05/2013 Page 24 Copyright © Infineon Technologies 2013. All rights reserved.

Contents
LED Lighting Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with Colour LED Card
¬ RGB Lamp using COLORLAMP01 app
(RGBLamp_Example01_1Lamp_3Channels.zip)
Example Project with White LED Card
¬ Street Lamp using WHITELAMP01 app
(StreetLamp_Example01_1Lamp_4Channels.zip)
Example Projects Download
04/05/2013 Page 25 Copyright © Infineon Technologies 2013. All rights reserved.
Home

Getting Started Example
Street Lamp using WHITELAMP01 app
Connect to PC
XMC1200/XMC1300
CPU Card
White LED Card
24V Power Supply
04/05/2013 Copyright © Infineon Technologies 2013. All rights reserved. Page 26

Getting Started Example
Street Lamp using WHITELAMP01 app
1. Open DAVE
TM
2. In DAVETM workspace, create a
new “DAVE CE” project:
File->New->DAVE Project
Give the project a name e.g.
“StreetLamp_Example01”
Select “DAVE CE Project” as
Project Type
3. Select the device accordingly
04/05/2013 Page 27
Copyright ©
Infineon
Technologies 2013.

Getting Started Example
Street Lamp using WHITELAMP01 app
This example demonstrates Street Lamp functionality using WHITELAMP01
app
We will use the System Timer (SysTick) as the time base for the interrupt
Time base of 0.2s
In the interrupt, a new target dimming level is set and the dimming
process is started
Next, we will show you the steps to creating this project:
1. Instantiate WHITELAMP001 app
2. Configure Main Clock (MCLK) and Peripheral Clock (PCLK)
3. Configure Brightness and Color Control Unit (BCCU) global settings
4. Configure BCCU Dimming Engine
5. Configure BCCU Channels
6. Enable Channels and Dimming Engine
7. Configure SysTick
04/05/2013 Page 28 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
1. Instantiate WHITELAMP01 app
Select the WHITELAMP01 app from the
App Selection View
WHITELAMP01 app automatically uses 4
BCCU channel apps (BCCU01) and 1
BCCU dimming app (BCCUDIM01)
04/05/2013 Page 29 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
2. Configure Main Clock (MCLK) and Peripheral
Clock (PCLK)
Open CLK002 UIEditor by double-clicking
or right-click->UIEditor on the app in S/W
Connectivity View
In UIEditor, under the Clock
Configuration tab,
¬ change the Desired Frequency
of the MCLK to 32MHz
¬ select PCLK = 2*MCLK
04/05/2013 Page 30 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
3. Configure BCCU global settings
Open BCCUGLOBAL UIEditor by
double-clicking or right-click->UIEditor
on the app in S/W Connectivity View
In UIEditor, under the
Global Configuration
tab,
¬ change the Desired Fast
Clock Frequency to
320kHz
¬ change Watchdog
Maximum Bitnumber to
0x3F
04/05/2013 Page 31 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
4. Configure BCCU Dimming Engine
Open BCCUDIM01 UIEditor by
double-clicking or right-click->UIEditor
on the app in S/W Connectivity View
In UIEditor, under the
Dimming Engine
Configuration tab,
¬ Disable Dither Function
¬ select Fine Dimming Curve
04/05/2013 Page 32 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
5. Configure BCCU Channels
Open the BCCUCH01/0 (first instance
of app) UIEditor by double-clicking or
right-click->UIEditor on the app in S/W
Connectivity View
In UIEditor, under the
Channel Configuration
tab,
¬ Enable Flicker Watchdog
04/05/2013 Page 33 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
5. Configure BCCU Channels
(continued)
In UIEditor, under the Intensity
and Packer Configuration tab,
¬ enable Packer
¬ change Initial off-bit counter
value to 72 to introduce phase
shift between the channels
¬ configure on-time to 50us, 800Hz
lowest frequency component
change Number of on-bits grouped
together to 4
change Number of off-bits
grouped together to 96
04/05/2013 Page 34 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
5. Configure BCCU Channels (continued)
Assign pin to P0.5
¬ Right-click on app->Manual Pin Assignment
¬ In Manual Pin Assignment window, set iohw as Resource, P0.5 as
Port-Pin
¬ Solve And Save
Repeat steps for the other 3 app instances (i.e.
BCCUCH01/1, BCCUCH01/2 and BCCUCH01/3)
¬ change Initial off-bit counter value to 48, 24 and 0 respectively
¬ Assign to P0.6, P0.7 and P0.8 respectively
04/05/2013 Page 35 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
6. Enable Channels and Dimming Engine
In Main.c,
¬ Enable all 4 BCCU channels at the same time
¬ Enable dimming engine
¬ Set all channels to 100% intensity
04/05/2013 Page 36 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
7. Configure SysTick
Initialization function is defined in core_cm0.h
SysTick exception handler is defined in startup_XMC1200.s
Initialize the SysTick in Main.c
04/05/2013 Page 37 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
7. Configure SysTick (continued)
Define the SysTick exception handler routine in Main.c
¬ Dim up or down by calling the function
WHITELAMP01_SetDimLevelExponential();
04/05/2013 Page 38 Copyright © Infineon Technologies 2013. All rights reserved.

Getting Started Example
Street Lamp using WHITELAMP01 app
Generate code
1. Click
Build project
1. Click
2. Wait for Build to finish
Download code
1. Click
2. Switch to TASKING Debug view
3. Click to run code
LEDs regularly changes brightness
04/05/2013 Page 39 Copyright © Infineon Technologies 2013. All rights reserved.

Contents
LED Lighting Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with Colour LED Card
¬ RGB Lamp using COLORLAMP01 app
(RGBLamp_Example01_1Lamp_3Channels.zip)
Example Project with White LED Card
¬ Street Lamp using WHITELAMP01 app
(StreetLamp_Example01_1Lamp_4Channels.zip)
Example Projects Download
04/05/2013 Page 40 Copyright © Infineon Technologies 2013. All rights reserved.
Home

Example Projects Download
Two sets of Example Projects available
Additional Application Examples
¬ Can be downloaded directly from the web
DAVETM Project Library Examples
¬ Can be downloaded from library in DAVE
TM
¬ Can also be downloaded directly from the web
04/05/2013 Copyright © Infineon Technologies 2013. All rights reserved. Page 41

Example Projects Download
Additional Application Examples
Additional Application Examples available
RGB Lamps Example with Apps
(RGBLamp_Example02_3Lamps_9Channels.zip)
¬ Demonstrates 3 RGB Lamps functionality using 3 COLORLAMP01
apps (9 Channels, 3 Dimming Engines)
RGB Lamp Example with Apps
(RGBLamp_Example03_1Lamp_3Channels.zip)
¬ Demonstrates 1 RGB Lamp functionality using 3 BCCUCH01 apps
and 1 BCCUDIM01 app (3 Channel, 1 Dimming Engine)
RGB Lamp Example
(Simple_RGBLamp_Example_1Lamp_3Channels.zip)
¬ Demonstrates 1 RGB Lamp functionality without DAVETM apps
04/05/2013 Copyright © Infineon Technologies 2013. All rights reserved. Page 42

Example Projects Download
Additional Application Examples
Additional Application Examples available
Street Lamp Example
(Simple_StreetLamp_Example_1Lamp_4Channels.zip)
¬ Demonstrates Street Lamp functionality without DAVETM apps
Can be downloaded from the web HERE
04/05/2013 Copyright © Infineon Technologies 2013. All rights reserved. Page 43

Example Projects Download
DAVE
TM
Example Library
Download Example Projects via DAVE
Help Install DAVE Example Library
TM
library store
04/05/2013 Page 44 Copyright © Infineon Technologies 2013. All rights reserved.

Example Projects Download
DAVE
TM
Example Library
Select DAVE Project Library Manager in the drop-down menu
04/05/2013 Page 45 Copyright © Infineon Technologies 2013. All rights reserved.

Example Projects Download
DAVE
TM
Example Library
Select Examples in the Libraries window and click Next
04/05/2013 Page 46 Copyright © Infineon Technologies 2013. All rights reserved.

Example Projects Download
DAVE
TM
Example Library
Accept terms of the license agreement and click Finish
DAVETM Example Projects are installed
04/05/2013 Page 47 Copyright © Infineon Technologies 2013. All rights reserved.

Example Projects Download
DAVE
Download Example Projects from the web
http://www.infineon.com/cms/en/product/promopages/aim-
mc/DAVE_3_Support_Portal/DAVE_Example_Project_Download.html
TM
Example Library
Download the project zip file
Open DAVE™ and go to File Import Infineon DAVE
Project
Check “Select Archive File”
Browse to the downloaded DAVE project zip file
Press “Open”
04/05/2013 Page 48 Copyright © Infineon Technologies 2013. All rights reserved.