To provide the most up-to-date information, the revision of our documents on the World Wide Web is the
most current. Your printed copy may be an earlier revision. To verify you have the latest information
available, refer to:
http://www.freescale.com
The following revision history table summarizes changes contained in this document. For your
convenience, the page number designators have been linked to the appropriate location.
Revision History
Date
03/20060Initial releaseN/A
07/20071Overall edits for grammar, spelling, structure, and style.N/A
This manual describes a reference design of a multi-color LED lighting control solution by using the
MC9S08AW60 Microcontroller.
Using a microcontroller (MCU) to control the red/green/blue (RGB) color LEDs increases system flexibility
and functionality for the next generation of lighting applications, architectural/entertainment lighting or
LCD backlighting, that require a smart and adaptive control methodology to ensure optimized color space
rendering for various display contents, excellent color contrast for realistic display scene and a consistent
color setting in manufacturing. In many cases, these new applications are controlled by a central control
unit that requires a connectivity interface that can be implemented at a low cost using MCU-based lighting
controller.
A compact light-box with more than a million display colors is implemented to demonstrate the
advantages of using MCU to control RGB color LEDs with different luminosity settings. The average
current through each color LED is controlled by an individual PWM signal generated from MCU and the
LED luminosity is almost in linear relationship with the pulse width of the driving PWM signal. The final
display color is determined on the mix of light emitted by RGB LEDs, so one of the simple methods to set
the light source in different color is changing the RGB PWM duty cycles equal to the corresponding mixing
ratio required for a particular color. In addition, a serial control protocol with user interface is also
developed as a communication link to control and monitor system parameters through a personal
computer.
All hardware schematic diagrams and firmware source codes are available as reference materials.
1.2 Features
•Apply for architectural/entertainment lighting or LCD backlighting applications
•Exceptional color mixing
•Pre-set or dynamic RGB colors
•High resolution on dimming control
•Automatic white balance tracking on dimming
•Flexible connectivity interface
•User friendly control menu
LED Lighting Control using the MC9S08AW60, Rev. 1
Freescale Semiconductor7
Introduction
PWM
SCI
KBI
AW60
RGB
PWM
ADC
Button Switch
Detection
GPIO Port
RS232
Interface
To PC
Power Supply & Regulator
DC/DC
Converter
Blue LEDs
I/O Control
Red LEDs
Green LEDs
PWM
SCI
KBI
AW60
RGB
PWM
ADC
Button Switch
Detection
GPIO Port
RS232
Interface
To PC
Power Supply & Regulator
DC/DC
Converter
Blue LEDs
I/O Control
Red LEDs
Green LEDs
1.3 System Overview
A block diagram of the system is shown in Figure 1-1.
Figure 1-1 . System Block Diagram
1.4 MC9S08AW60
The MC9S08AW60, MC9S08AW48, MC9S08AW32, and MC9S08AW16 are members of the low-cost,
high-performance HCS08 family of 8-bit microcontroller units (MCUs). All MCUs in the family use the
enhanced HCS08 core and are available with a variety of modules, memory sizes, memory types, and
package types. Refer to Table 1-1 for memory sizes and package types.
Table 1-2 summarizes the peripheral availability per package type for the devices available in the
MC9S08AW60/48/32/16 series.
Table 1-1. Devices in the MC9S08AW60/48/32/16 Series
DeviceFlashRAMPackage
MC9S08AW6063,280
MC9S08AW4849,152
MC9S08AW3232,768
MC9S08AW1616,3841024
2048
64 QFP
64 LQFP
48 QFN
44 LQFP
LED Lighting Control using the MC9S08AW60, Rev. 1
8Freescale Semiconductor
Table 1-2. Peripherals Available per Package Type
Package Options
Feature64-Pin48-Pin44-Pin
ADC16-CH8-CH8-CH
IICYesYesYes
IRQYesYesYes
KBI1876
S C I 1Ye sYe sYe s
S C I 2Ye sYe sYe s
SPI1YesYesYes
TPM16-CH4-CH4-CH
TPM1CLKYesNoNo
TPM22-CH2-CH2-CH
TPM2CLKYesNoNo
MC9S08AW60
I/O Pins543834
LED Lighting Control using the MC9S08AW60, Rev. 1
Freescale Semiconductor9
Introduction
LED Lighting Control using the MC9S08AW60, Rev. 1
10Freescale Semiconductor
Chapter 2
AW60 Control Board
RGB LED Driving Board
Hardware Description
2.1 Introduction
The system consists of a MCU control board and a LED driving board. The MCU control board,
DEMO9S08AW60LED, is one of the demonstration boards for the Freescale MC9S08AW60. This board
allows easier developmet of code for LED control applications, architectural/entertainment lighting or LCD
backlighting. The on-board serial interface allows you to control and monitor the system status via the
RS232 serial port connection. The separated LED light-box with driving circuitries is also available as a
whole demo kit to demonstrate how to do the color mixing and see the visual effects on changing different
type of parameter settings.
Figure 2-1. Light-Box Demo
LED Lighting Control using the MC9S08AW60, Rev. 1
Freescale Semiconductor11
Hardware Description
2.2 DEMO9S08AW60LED Features
•MC9S08AW60 CPU
–44 pin LQFP package
–20 MHz Internal Bus Frequency
–60 Kbytes of on-chip in-circuit programmable FLASH
–2 Kbytes of on-chip RAM
–8-channel, 10-bit analog-to-digital converter
–Two SCI modules
–SPI module
•External power jack for DC power supply (+12 VDC)
•Four pushbutton user switches
•Four LEDs connected to I/O port
•Master reset switch
•RGB PWM output port
•Optical sensor input port
•On-board RS-232 serial port
•100mm x 80mm board size
2.3 DEMO9S08AW60LED Layout
Figure 2-2. DEMO9S08AW60LED Top Side
LED Lighting Control using the MC9S08AW60, Rev. 1
12Freescale Semiconductor
Development Support
2.4 Development Support
Application development and debug for the MC9S08AW60 is supported through a 6-pin BDM header
(CON8). The pinout is as follows:
Table 2-1. BDM Connector (CON8) Pinout
BKGD12GND
NC34RESET
NC56V
DD
2.5 Power
The DEMO9S08AW60LED is powered externally through the barrel connector CON2. This connector is
a 2.5 mm, center positive connector. Voltage supplied through this connector should be positive 12 volts
DC. This is also the supply voltage for the LED light box.
The DEMO9S08AW60LED can be run with V
set to 5 or 3 volts. To run the board at 3V, move jumper
DD
JP1 to the 1-2, 3V position.
LED D5 turns green to let you know that power has been correctly applied to the board.
2.6 Reset Switch
The reset switch (SW5) provides a way to apply a reset to the MCU. The reset switch is connected directly
to the RESET
signal of the MCU. A 10 kΩ pullup resistor to VDD on the RESET signal allows for normal
operation. When the reset switch is pressed, the RESET signal is grounded and the MCU recognizes a
reset.
2.7 Clock Source
An on-board 16 MHz crystal (X1) is connected between the XTAL and EXTAL pins of the MCU. This offers
flexibility on clock source selection. Refer to the MC9S08AW60 data sheet for details on how to use the
internal clock generation (ICG) module to generate the system clocks for the MCU.
2.8 RS-232
An RS-232 translator provides RS-232 communication on COM connector P2. This connector is a 9-pin
Dsub right angle connector. TXD and RXD signals are routed from the MCU to the RS-232 transceiver.
Table 2-2 . RS-232 Connections
MCU PortCOM SignalI/O Port Connector
PTE0/TXD1TXD OUTP2-2
PTE1/RXD1RXD INP2-3
LED Lighting Control using the MC9S08AW60, Rev. 1
Freescale Semiconductor13
Hardware Description
2.9 User Options
The DEMO9S08AW60LED includes various input and output devices to assist in application
development. These devices include four pushbutton switches, four LEDs, and an operational amplifier
with RC filter connected at each ADC input channel for signal amplification and filtering.
2.9.1 Pushbutton Switches
Four pushbutton switches provide momentary active low input for user applications. The table below
describes the pushbutton switch connections.
Four green LED indicators (D1-D4) are provided to assist during code development. The LEDs are active
low and illuminated when a logic low signal is driven from the MCU port pin. Two of the LEDs are
connected to port A, and the other two are connected to Port C. The connections are described below:
Table 2-4. LEDs (D1-D4) Connections
LEDMCU Port
D1PTA0
D2PTA1
D3PTC2
D4PTC4
2.9.3 ADC Interface
Eight operational amplifiers are provided to assist users in developing applications with feedback control
signals. For examples, the signal generated by an optical sensor in LED backlight system should be
scaled to a level matched with the ADC input range without any saturation. Each operational amplifier can
be configured as an inverting or non-inverting amplifier with variable gain setting by different resistor
connections. A RC filter is also connected at each output for noise filtering.
NOTE
The maximum operational amplifier output voltage should be limited to the
V
voltage applied to MCU to prevent any damage on input port.
DD
LED Lighting Control using the MC9S08AW60, Rev. 1
14Freescale Semiconductor
Loading...
+ 32 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.