MPC5121eRM: MPC5121e Preliminary Reference Manual

Remote Control of High-Brightness
LEDs
Devices Supported
MC1321x
Document Number: DRM097
Rev. 0
04/2008
How to Reach Us:
Home Page:
www.freescale.com
Web Support:
http://www.freescale.com/support
USA/Europe or Locations Not Listed:
Freescale Semiconductor, Inc.
Technical Information Center, EL516
2100 East Elliot Road
Tempe, Arizona 85284
1-800-521-6274 or +1-480-768-2130
www.freescale.com/support
Europe, Middle East, and Africa:
Freescale Halbleiter Deutschland GmbH
Technical Information Center
Schatzbogen 7
81829 Muenchen, Germany
+44 1296 380 456 (English)
+46 8 52200080 (English)
+49 89 92103 559 (German)
+33 1 69 35 48 48 (French)
www.freescale.com/support
Japan:
Freescale Semiconductor Japan Ltd.
Headquarters
ARCO Tower 15F
1-8-1, Shimo-Meguro, Meguro-ku,
Tokyo 153-0064
Japan
0120 191014 or +81 3 5437 9125
[email protected]
Asia/Pacific:
Freescale Semiconductor China Ltd.
Exchange Building 23F
No. 118 Jianguo Road
Chaoyang District
Beijing 100022
China
+86 10 5879 8000
[email protected]
Freescale Semiconductor Literature Distribution Center
P.O. Box 5405
Denver, Colorado 80217
1-800-441-2447 or +1-303-675-2140
Fax: +1-303-675-2150
[email protected]
Information in this document is provided solely to enable system and
software implementers to use Freescale Semiconductor products. There are
no express or implied copyright licenses granted hereunder to design or
fabricate any integrated circuits or integrated circuits based on the
information in this document.
Freescale Semiconductor reserves the right to make changes without further
notice to any products herein. Freescale Semiconductor makes no warranty,
representation or guarantee regarding the suitability of its products for any
particular purpose, nor does Freescale Semiconductor assume any liability
arising out of the application or use of any product or circuit, and specifically
disclaims any and all liability, including without limitation consequential or
incidental damages. “Typical” parameters that may be provided in Freescale
Semiconductor data sheets and/or specifications can and do vary in different
applications and actual performance may vary over time. All operating
parameters, including “Typicals”, must be validated for each customer
application by customer’s technical experts. Freescale Semiconductor does
not convey any license under its patent rights nor the rights of others.
Freescale Semiconductor products are not designed, intended, or authorized
for use as components in systems intended for surgical implant into the body,
or other applications intended to support or sustain life, or for any other
application in which the failure of the Freescale Semiconductor product could
create a situation where personal injury or death may occur. Should Buyer
purchase or use Freescale Semiconductor products for any such unintended
or unauthorized application, Buyer shall indemnify and hold Freescale
Semiconductor and its officers, employees, subsidiaries, affiliates, and
distributors harmless against all claims, costs, damages, and expenses, and
reasonable attorney fees arising out of, directly or indirectly, any claim of
personal injury or death associated with such unintended or unauthorized
use, even if such claim alleges that Freescale Semiconductor was negligent
regarding the design or manufacture of the part.
Freescale™ and the Freescale logo are trademarks of Freescale
Semiconductor, Inc. The ARM POWERED logo is a registered trademark of
ARM Limited. ARM7TDMI-S is a trademark of ARM Limited.
Java and all other Java-based marks are trademarks or registered
trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
The PowerPC name is a trademark of IBM Corp. and is used under license.The
described product contains a PowerPC processor core. The PowerPC name is
a trademark of IBM Corp. and used under license. The described product is a
PowerPC microprocessor. The PowerPC name is a trademark of IBM Corp.
and is used under license. The described product is a PowerPC
microprocessor core. The PowerPC name is a trademark of IBM Corp. and is
used under license. All other product or service names are the property of their
respective owners.
© Freescale Semiconductor, Inc. 2006. All rights reserved.
DRM097
Rev. 0
04/2008
Chapter 1
Introduction
1.1
1.2
1.3
1.4
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Featured Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.1 MC13213—2.4 GHz RF Transceiver and 8-Bit MCU . . . . . . . . . . . . . . . . . . . .
1.4.2 MM908E625 – Integrated Quad Half H-Bridge with Power Supply . . . . . . . . . .
1.4.3 Triple Axis Accelerometer MMA7260QT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-2
1-2
1-3
1-3
1-6
1-7
Chapter 2
Control Theory for HBLED Lighting
2.1
2.2
2.3
2.4
2.5
2.6
Switching Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Buck Converter Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MM908E625 Driving High Brightness LED’s Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Selection of Inductor L for Driving the High- Brightness LEDs . . . . . . . . . . . . . . . . . . . .
Advantages Using the MM908E625 to Drive High-Brightness LEDs . . . . . . . . . . . . . . .
Dimming the Four High-Brightness LEDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-1
1-2
1-4
1-5
1-6
Chapter 3
ZCOMM Board Description
3.1
3.2
3.3
3.4
Board Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ZCOMM Board Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ZCOMM Board Hardware Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.1 ZCOMM Board MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.2 Power Supply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Background Debug Mode Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.1 Button Connections and LED Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.2 Serial Communication (RS232 Interface) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.3 MC13213 RF Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.4 Clock Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.5 ZCOMM Board Power Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.6 Application Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.7 Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.8 PCB Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-3
1-3
1-3
1-3
1-4
1-4
1-5
1-6
1-7
1-7
1-8
1-9
1-9
Chapter 4
Demo System Description
4.1
4.2
General System Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
High-Brightness LED Demo System Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.2 LIN Transceiver Board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-1
1-2
1-2
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
I
4.3
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
4.3.1 Quadrunner Lumiled Demo Board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Chapter 5
Software Implementation
5.1
5.2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ZCOMM Board S/W Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.1 ZCOMM Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.2 ZCOMM SCI Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2.3 ZCOMM RF Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-2
1-2
1-3
1-4
Chapter 6
Demo Setup
6.1
6.2
6.3
6.4
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setup Instructions and User Guide for Controlling the HB LED Demo System . . . . . . .
6.2.1 Configuration Jumpers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Starting Up the HB LED demo system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3.1 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FreeMASTER GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.1 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-1
1-1
1-1
1-3
1-4
1-4
1-5
Appendix A
Schematics
Appendix B
ZCOMM Board – Bill of Materials
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
II
Chapter 1
Introduction
1.1
Introduction
This document describes the design of a high-brightness LED demo system, which demonstrates wireless
communication using Freescale’s MC13213 (SiP) device, high-brightness LED dimming control using
Freescale’s MM908E625 (Quad Half H-Bridge with power supply + HC08), and the 3-axis acceleration
sensor MMA7260QT from Freescale.
This demo system is a versatile remote control for different applications. For the application in this demo,
the Freescale Luxeon Evaluation Kit by Future Electronics, with an HB LED board, was chosen.
Wireless communication is preferable because it provides flexibility in the positioning of application
devices without a wire medium. Light emitting diodes (LEDs) are popular in general lighting areas.
Advantages of using LED lighting are a long operating life, no fragile glass, no mercury, and low-voltage
DC operation.
The HB LED demo system performs light dimming on the red, green, blue, and white high-brightness
LEDs depending on the 3-axis acceleration sensor (MMA7260Q) readings on the ZSTAR remote control.
This design uses boards already available, such as the RD3152MMA7260Q (ZSTAR), Freescale Luxeon
Evaluation Kit by Future Electronics, and the LIN evaluation kit. The wireless communication board, the
ZCOMM (wireleZ-COMMunication) board, is a newly designed board.
The current device ZCOMM board introduces users to the MC13213 low-cost 8-bit microcontroller with
2.4 GHz wireless data transceiver. It includes a universal application connector used for direct connection
to the application board, an RS232 port for communication with a control device, a background debug
module BDM, for in-circuit hardware debugging and programming, switches, LEDs for monitoring
purposes, and a host MCU, allowing the user flexibility in establishing wireless data networks between
various electrical applications.
This reference design includes basic radio freqency theory, the system design concept, hardware
implementation, and the software design, including the FreeMASTER software visualization tool.
Each wireless part communicates over the RF medium using the freely available software stack SMAC
from Freescale.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
1-1
Introduction
Figure 1-1. HB LED Demo System
1.2
•
•
•
•
•
•
•
•
•
•
1.3
Features
Versitile wireless communication (2.4 GHz) between remote control, computer interface—ZSTAR
(sensor, USB stick)—and application board—ZCOMM with MC13213 device
Communication based on SMAC protocol layer
Universal application connector and RS232 connector on ZCOMM board for different application
boards to be connected
Addressed networking (each end application is assigned a unique address)
Visualization of the 3-axis accelerometer features
SCI to LIN level shifting (LIN transceiver, KIT33661DEVB)
High-brightness LEDs dimming control—Freescale Luxeon Evaluation Kit
(MM908E625Quadrunner MCU) with a 370 mA current driving capability for each color
Two lightning modes—RGB (red, green, blue) and white
Input supply voltage from +3.5 V DC to +12 V DC
FreeMASTER graphical user interface
System Overview
A block diagram of the system is shown in Figure 1-2.
A detailed description of the ZCOMM board is found in Chapter 3, “ZCOMM Board Description”.
Remote Control of High-Brightness LEDs, Rev. 0
1-2
Freescale Semiconductor
Introduction
Figure 1-2. High-Brightness LED Demo System Block Diagram
1.4
Featured Products
This demo consists of several Freescale products. Their main features are listed below.
1.4.1
MC13213—2.4 GHz RF Transceiver and 8-Bit MCU
The MC1321x family is Freescale’s second-generation ZigBee™ platform, which incorporates a
low-power 2.4 GHz radio frequency transceiver and an 8-bit microcontroller on a single 9x9x1 mm 71-pin
LGA package.
The MC1321x solution can be used for wireless applications from simple proprietary point-to-point
connectivity to a complete ZigBee mesh network. The combination of the radio and a microcontroller in
a small footprint package allows for a cost-effective solution. The MC1321x contains an RF transceiver
that is an IEEE 802.15.4-compliant radio that operates in the 2.4 GHz ISM frequency band. The
transceiver includes a low-noise amplifier, 1 mW nominal output power, PA with internal voltage
controlled oscillator (VCO), integrated transmit/receive switch, on-board power supply regulation, and
full spread-spectrum encoding and decoding.
The MC1321x also contains a microcontroller based on the HCS08 family of microcontrollers and can
provide up to 60 KB of flash memory and 4 KB of RAM. The onboard MCU allows the communications
stack and also the application to reside on the same system-in-package (SiP). Table 1-1 shows the
MC1321x family organization.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
1-3
Introduction
Table 1-1. Memory Configuration
Microcontroller
Program Flash
Unified Data/Program RAM
Extended Features
MC13211
16 Kbyte
1 Kbyte
—
MC13212
32 Kbyte
2 Kbyte
—
MC13213
60 Kbyte
4 Kbyte
—
MC13214
60 Kbyte
4 Kbyte
ZigBee stack
Analog
receiver
HCS08
CPU
Background
debug
mode
Flash
memory
8 Channel
10 Bit ADC
Digital
control
logic
RAM
2xSCI
SPI
Dedicated
SPI
I2C
Low
voltage
interrupt
16 Bit
Timers
Keyboard
interrupt
COP
Internal
clock
generator
Up to 32
GPIOs
RFIC
timers
Transmmit
receive
switch
Frequency
generator
Analog
transmitter
CT_Bias
Buffer RAM
7 GPIO
IRQ arbiter
Power
mangement
RAM arbiter
Voltage
regulators
802.15.4 Modem
HCS08 MCU
Figure 1-3. MC13213 Block Diagram
1.4.1.1
•
•
•
•
•
•
General Platform Features
IEEE 802.15.4 standard compliant on-chip transceiver/modem
— 2.4 GHz
— 16 selectable channels
— Programmable output power
Multiple power saving modes
2 V to 3.4 V operating voltage with on-chip voltage regulators for modem
–40°C to +85°C temperature range
Low external component count
Supports single 16 MHz crystal clock source operation or dual crystal operation
Remote Control of High-Brightness LEDs, Rev. 0
1-4
Freescale Semiconductor
Introduction
•
•
Support for SMAC, IEEE 802.15.4, and ZigBee software
9 mm x 9 mm x 1 mm 71-pin LGA
1.4.1.2
•
•
•
•
•
•
•
•
•
•
•
•
•
Low-voltage MCU with a 40 MHz low-power HCS08 CPU core
Up to 60K flash memory with block protection and security and 4K RAM
— MC13211: 16 KB flash, 1 KB RAM
— MC13212: 32 KB flash, 2 KB RAM
— MC13213: 60 KB flash, 4 KB RAM
— MC13214: 60 KB flash, 4 KB RAM with ZigBee Z-stack
Low-power modes (Wait and three stop modes)
Dedicated serial peripheral interface (SPI) connected internally to an 802.15.4 modem
One 4-channel and one 1-channel 16-bit timer/pulse-width modulator (TPM) module with
selectable input capture, output capture, and PWM capability
8-bit port keyboard interrupt (KBI)
8-channel 8-10-bit ADC
Two independent serial communication interfaces (SCI)
Multiple clock source options
— Internal clock generator (ICG) with a 243 kHz oscillator that has ±0.2% trimming resolution
and ±0.5% deviation across voltage.
— Start-up oscillator of approximately 8 MHz
— External crystal or resonator
— External source from the modem clock for high accuracy source or a low-cost system option
Inter-integrated circuit (IIC) interface with 100 kbps operation
In-circuit debug and flash programming available via on-chip background debug module (BDM)
— Two comparator and nine trigger modes
— Eight deep FIFO for storing change-of-flow addresses and event-only data
— Tag and force breakpoints
— In-circuit debugging with single breakpoint
System protection features
— Programmable low voltage interrupt (LVI)
— Optional watchdog timer (COP)
— Illegal opcode detection
Up to 32 MCU GPIOs with programmable pull-ups
1.4.1.3
•
Microcontroller Features
RF Modem Features
Fully compliant IEEE 802.15.4 transciever supports 250 kbps O-QPSK data in 5.0 MHz channels
and full spread-spectrum encode and decode
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
1-5
Introduction
•
•
•
•
•
•
•
•
•
•
•
Operates on one of 16 selectable channels in the 2.4 GHz ISM band
–1 to 0 dBm nominal output power, programmable from –27 dBm to +3 dBm typical
Receive sensitivity of ≤92 dBm (typical) at 1% PER, 20-byte packet, much better than the IEEE
802.15.4 specification of –85 dBm
Integrated transmit/receive switch
Dual PA output pairs that can be programmed for full differential single port or dual port operation
that supports an external LNA and/or PA
Three low-power modes for increased battery life
Programmable frequency clock output for use by the MCU
Onboard trim capability for the 16 MHz crystal reference oscillator eliminates the need for external
variable capacitors and allows for automated production frequency calibration
Four internal timer comparators available to supplement the MCU timer resources
Supports packet mode and streaming mode
Seven GPIOs to supplement the MCU GPIO
1.4.2
MM908E625 – Integrated Quad Half H-Bridge with Power Supply
The 908E625 is an integrated single-package solution including a high-performance HC08
microcontroller with a SMARTMOS™ analog control IC. The HC08 includes flash memory, a timer,
enhanced serial communications interface (ESCI), an analog-to-digital converter (ADC), serial peripheral
interface (SPI) (only internal), and an internal clock generator (ICG) module. The analog control die
provides fully protected H-Bridge/high-side outputs, voltage regulator, autonomous watchdog with cyclic
wake-up, and a local interconnect network (LIN) physical layer. The single-package solution, together
with the LIN, provides optimal application performance adjustments and space-saving PCB design. It is
suited for the control of automotive mirror, doorlock, and light-leveling applications.
1.4.2.1
•
•
•
•
•
•
•
•
•
•
•
•
•
MM908E625 Features
High-performance M68HC908EY16 core
16 KB of on-chip flash memory
512 bytes of RAM
Internal clock generation module
Two 16-bit, 2-Channel Timers
10-bit analog-to-digital converter
LIN physical layer
Autonomous watchdog with cyclic wakeup
Three two-terminal hall-effect sensor input ports
One analog input with switchable current source
Four low RDS(ON) half-bridge outputs
One low RDS(ON) high-side output
13 microcontroller I/Os
Remote Control of High-Brightness LEDs, Rev. 0
1-6
Freescale Semiconductor
Introduction
1.4.3
Triple Axis Accelerometer MMA7260QT
The MMA7260QT is a low-g accelerometer with a selectable 1.5 g to 6 g range. The MMA7260QT has
many unique features that make it an ideal solution for many consumer applications, such as freefall
protection for laptops and MP3 players, tilt detection for e-compass compensation and mobile phone
scrolling, motion detection for handheld games and game controllers, position sensing for g-mice, shock
detection for warranty monitors, and vibration for out of balance detection. Features such as low power,
low current, and a sleep mode with a quick turn on time, allow the battery life to be extended in end
applications. The 3-axis sensing in a small QFN package requires a 6mm x 6mm board space, with a
profile of 1.45 mm, allowing easy integration into many small handheld electronics.
There are several other derivatives of the MMA7260QT:
• • MMA7261QT XYZ-axis 2.5g/3.3g/6.7g/10g
• • MMA6270QT XY-axis 1.5g/2g/4g/6g
• • MMA6271QT XY-axis 2.5g/3.3g/6.7g/10g
• • MMA6280QT XZ-axis 1.5g/2g/4g/6g
• • MMA6281QT XZ-axis 2.5g/3.3g/6.7g/10g
All members of this sensor family are footprint (QFN package) compatible, which simplifies evaluation
and design of the target application.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
1-7
Introduction
Remote Control of High-Brightness LEDs, Rev. 0
1-8
Freescale Semiconductor
Chapter 2
Control Theory for HBLED Lighting
2.1
Switching Regulator
A switching regulator regulates a current flow by dividing the input voltage and controlling the average
current by means of the duty cycle. When a higher load current is required by the load, the percentage of
on-time is increased to accommodate the change. There are two basic types of switching regulators:
forward-mode regulators and flyback-mode regulators. The name of each type is derived from the way the
magnetic elements are used within the regulator. In this design, forward-mode switching is used and you
can find the theory below.
Forward-mode switching regulators have four functional components: a power switch, a rectifier, a series
inductor, and a capacitor (see Figure 2-1). The power switch may be a power transistor or a metal oxide
semiconductor field-effect transistor (MOSFET) placed directly between the input voltage and the LC
filter section. The shunt diode, series inductor, and shunt capacitor form an energy storage tank whose
purpose is to store enough energy to maintain the load voltage and current over the entire off-time of the
power switch. The power switch serves only to fill up the energy lost to the load during its off-time.
Flyback-mode switching regulators have the same four basic elements as the forward-mode regulators
except that they have been rearranged in another configuration.
SW1
Vin
L
D
Co
RL
Figure 2-1. Forward Mode Switching Regulator
2.2
Buck Converter Basics
A buck, or step-down converter, is the most elementary forward-mode converter. Figure 2-1shows its basic
schematic.
The operation of this regulator topology has two distinct time periods. The first occurs when the series
switch SW1 is on, the input voltage Vin is connected to the input of the inductor (L). The output of the
inductor is the output voltage, and the rectifier (or catch diode) is reverse biased. During this period,
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
2-1
Control Theory for HBLED Lighting
because there is a constant voltage source connected across the inductor, the inductor current begins to
linearly ramp upwards, as described by the following equation:
IL(on) = [(Vin – Vout) x ton] / L
Eqn. 2-1
During this on period, energy is stored within the core material in the form of magnetic flux. If the inductor
is properly designed, there is sufficient energy stored to carry the requirements of the load during the off
period.
The next period is the off period of the power switch. When the power switch turns off, the voltage across
the inductor reverses its polarity and is clamped at one diode voltage drop below ground by the catch diode.
The current flows through the catch diode, thus maintaining the load current loop. This removes the stored
energy from the inductor. The inductor current during this time is:
IL(off) = [(Vout – VD) x toff] / L
Eqn. 2-2
This period ends when the power switch is turned on again. Regulation of the converter is accomplished
by varying the duty cycle of the power switch according to the loading conditions. To achieve this, the
power switch requires electronic control for proper operation. It is possible to describe the duty cycle as:
d = ton / T
Eqn. 2-3
where T is the switching period.
For the buck converter with ideal components, the duty cycle can also be described as:
d = Vout / Vin
2.3
Eqn. 2-4
MM908E625 Driving High Brightness LED’s Basics
This section contains a brief introduction to the basic circuit design used to drive the high-brightness LEDs
using the MM908E625 integrated quad half H-bridge with power supply, embedded MCU, and LIN serial
communication.
The main idea behind the circuit design to control the amount of current flowing through the high
brightness LEDs is to implement a type of step-down buck regulator, controlling the current instead of the
voltage output. Taking advantage of the low-side MOSFET current limit feature of the MM908E625
simplifies the overall design.
The circuit configuration in Figure 2-2 illustrates the basic operation of the current regulator.
Remote Control of High-Brightness LEDs, Rev. 0
2-2
Freescale Semiconductor
Control Theory for HBLED Lighting
V+
High-brightness LED
D
L
908E625 Internal circuit
HBx
On/off
Low-side driver
current limitation
Status
Control
Current limit
GND
Figure 2-2. Basic Circuit Used to Drive the High Brightness LEDs
When switching on the low-side MOSFET (Figure 2-3), current flows through the high-brightness LED
and inductor (L). When it reaches the current limit previously defined inside the MM908E625, the
MOSFET is turned off automatically. At this point, the energy stored in the inductor (L) continues to flow
through the LED because of the Schottky diode (D). The idea is to maintain a constant flow of current
through the high-brightness LED. Before the current drops to zero, the low-side MOSFET is turned on
again to start a new current cycle.
The switching frequency of the regulator was set up at 25 kHz. It is internally generated by the
MM908E625 using the timer interface A (TIMA) module in a PWM configuration, feeding this signal in
to the FGEN input.
Each low-side MOSFET switches off if a current above the selected current limit is detected. The
MM908E625 offers five different current limits, the 370 mA was selected to comply with the LED's
specification. The low-side MOSFET switches ON again if a rising edge on the FGEN input is detected.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
2-3
Control Theory for HBLED Lighting
HB low-side MOSFET is switched off
when it reaches the selected current limit
HB low-side MOSFET turns on
with each rising edge of the FGEN input
370 mA
DC component
ILS Low-side MOSFET
current
ID
ID
ILS
Diode current
Half-bridge
Low-side output
OFF
OFF
OFF
ON
ON
ON
Time
FGEN input
(MCU PWM signal)
Time
40us
Figure 2-3. Low-Side MOSFET Switching on the MM908E625 to Drive the High-Brightness LEDs
2.4
Selection of Inductor L for Driving the High- Brightness LEDs
Looking closely at the specifications of the device, there is a feature essential to this application. Each of
the four half-bridge outputs has a programmable current limit mode of operation when the low-side
MOSFETs are used in PWM mode. This limit is implemented by turning off the MOSFET on a
cycle-by-cycle basis after it reaches the preset current limit (Figure 2-3). In this application, the low side
MOSFET conduction is activated on the rising edge of a base clock provided by the MCU. The MOSFET
is on until the current limit is reached, at which time the limit circuit terminates the current cycle, turning
off the MOSFET. Driving only the LED in this mode would not work properly because the current limit
would be reached quickly and the MOSFET would turn off. An inductor is used to limit the speed of
current change in the circuit (di/dt), effectively creating an efficient 4-channel buck switching current
regulator.
The maximum low-side PWM clock frequency specification for the MM908E625 is 25 KHz. This rate is
easily provided by the MCU timer output. TimerA CH1 (PTD1/TACH1) is used as a programmable
25 KHz clock source, driving the signal FGEN that controls the MOSFET conduction period (Figure 2-4).
Remote Control of High-Brightness LEDs, Rev. 0
2-4
Freescale Semiconductor
Control Theory for HBLED Lighting
Vs
Internal to MM908E625
Fgen
LED
D
S
L
Flip Flop
Q
R
+
Rc
Vref
Figure 2-4. MM908E625 H-Bridge Output
The external inductor value determines the current ripple into the LED at the 25 KHz rate. The higher the
PWM frequency is, the lower the value of the inductor can be. Selecting a value too low results in a high
ripple current into the LED. Select a value that satisfies the average current that the LED requires, but do
not exceed the peak current of the device. The only other external component required is a fast diode to
catch the voltage spike that results when the MOSFET turns off. In this application, a 1 mH inductor was
selected, providing roughly 150 mA of current ripple ΔIPP when driving a single LED with a Vf of 3.8 V
and a supply voltage VL of +12 Vdc by using the formula:
L = (VL * Δt) / ΔIPP
Eqn. 2-5
The Δt is the charging time, the time the low-side MOSFET switches stay ON. Considering a switching
frequency of 25 kHz with a duty cycle of 50%, the time the MOSFET switches are on is 20 μs.
If we substitute the known values in the formula we get:
L = ((12 V – 3.8 V) * 20 μs) / 150 mA
L = 1.093 mH
2.5
Eqn. 2-6
Advantages Using the MM908E625 to Drive High-Brightness
LEDs
Advantages over other solutions to drive today's high brightness LEDs using the MM908E625 are:
• Low-cost solution to drive four high brightness LEDs with one chip
• Simple software and hardware design to control LED brightness
• Independent control over the four high-brightness LEDs
• High efficiency output control implementing a step-down buck switching regulator
• On-chip low-side MOSFET current limit feature used to control the amount of current flowing
through the high brightness LEDs
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
2-5
Control Theory for HBLED Lighting
•
•
2.6
Low heat generation due to the use of the MM908E625 internal power MOSFETs with low RDS(ON)
RF communication can be established interfacing to a ZCOMM board by emulating SCI
communication
Dimming the Four High-Brightness LEDs
A PWM mechanism was chosen for dimming the four LEDs. Having set the maximum current through the
LEDs, by switching on and off the low-side MOSFETs using the FGEN signal and taking advantage of the
current limit feature on the MM908E625 ( Figure 2-4).
NOTE
If a 100% brightness is required, it is only necessary to turn on the low-side
MOSFETs and have the automatic feature to take place. If a percentage
different than full brightness is required, switch on and off the driving of the
LEDs. This needs to be done at a low frequency with a certain duty cycle to
generate a dimming sensation to the human eye, reducing the amount of
current flowing through the LED over time.
The recommended refresh frequency for this PWM can be from 75 Hz to 100 Hz, to avoid any flickering
sensation to the human eye. Also, it was decided to have a 20-step resolution for the duty cycle to keep the
whole implementation as simple as possible.
Figure 2-5 shows a graphical representation of the PWM implementation used to dim the high brightness
LEDs.
Each of the MM908E625’s four half-bridge outputs has a programmable current limit mode of operation
when the low-side MOSFETs are used in PWM mode. This limit is implemented by turning off the
MOSFET on a cycle-by-cycle basis after it reaches the pre-set current limit (Figure 2-3). In this
application, the low-side MOSFET conduction is activated on the rising edge of a base clock provided by
the MCU. The MOSFET is on until the current limit is reached, at which time the limit circuit terminates
the current cycle, turning off the MOSFET. Driving only the LED in this mode does not work properly
because the current limit is reached quickly and the MOSFET turns off. An inductor is used to limit the
speed of current change in the circuit (di/dt), effectively creating an efficient 4-channel buck switching
current regulator.
The maximum low-side PWM clock frequency specification for the MM908E625 is 25 KHz. This rate is
easily provided by the MCU timer output. TimerA CH1 (PTD1/TACH1) is used as a programmable
25 KHz clock source, driving the signal FGEN that controls the MOSFET conduction period.
Remote Control of High-Brightness LEDs, Rev. 0
2-6
Freescale Semiconductor
Control Theory for HBLED Lighting
LED current
Time
100%
Duty Cycle
100%
Time
LED current
Time
Results in 50%
duty cycle
Duty Cycle
100%
100%
Time
10ms
Figure 2-5. PWM Implementation for Dimming the High-Brightness LEDs
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
2-7
Control Theory for HBLED Lighting
Remote Control of High-Brightness LEDs, Rev. 0
2-8
Freescale Semiconductor
Chapter 3
ZCOMM Board Description
3.1
Board Overview
The main tasks of the ZCOMM board are to:
• Provide wireless communication (2.4 GHz) between the PC (ZSTAR USB stick) and application
board using SMAC or IEEE 802.15.4 packet structure
• Make wireless communication as a master or slave device (transmit, receive, or duplex
communication)
• Receive remote control for a different application board connected to the ZCOMM (via RS232,
application connector)
• Control the application board wirelessly (with a compatible transceiver on the other side)
16 MHz crystal
Application
PCB antenna
connector
Buttons
MC13213
BDM interface
Reset switch
ON/OFF switch
Power supply
indicator
LED indicators
Power supply
connector
DB9 female
connector
Figure 3-1. ZCOMM Board Overview (Top view)
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
3-1
ZCOMM Board Description
Voltage regulator
NCP502SQ33T1
SP3220
(RS232transceiver)
Application
connector
Figure 3-2. ZCOMM Board Overview (Bottom view)
BDM
interface 4x Button
SCI Level MC13213
Converter
9-PIN
CANNON
(RS-232)
LEDs
Application
Connector
+3.3 V DC
GPIO
VCC
(+3.3V ... +12V DC)
PTA/KBD
HCS08 MCU
PTC/TxRx/I2C
GND
15x2
PIN
PTB/AD
RESET button
802.15.4 Modem
PTD/TPM
Loop Antenna
16 MHz crystal
Figure 3-3. ZCOMM Board Block Diagram
The ZCOMM board uses a dual-layer printed circuit board (PCB) containing all the necessary circuitry for
the MC13213 device, SCI communication, transferring data over a radio frequency (RF), and application
connection (application connector).
The board can be powered from a DC voltage power supply of +3.3 V to +12 V. The application runs on
Freescale’s MC13213 device. Figure 3-3 shows the block diagram of the board.
Remote Control of High-Brightness LEDs, Rev. 0
3-2
Freescale Semiconductor
ZCOMM Board Description
3.2
•
•
•
•
•
•
•
•
•
•
•
•
•
3.3
3.3.1
ZCOMM Board Features
Provides all hardware required for a complete 2.4 GHz wireless node using IEEE 802.15.4 packet
structure
One MC13213 low-power, low-voltage MCU with 3 2KB of on-chip flash and 2.4 GHz ZigBee™
transceiver RF reference design with printed circuit loop antenna (integrated transmit/receive
switch)
16 MHz external crystal for 802.15.4 modem
Background debug module (BDM) programming port for support of CodeWarrior™ Development
Studio
Provides an IEEE 802.15.4 modem
Application connector provides the microcontroller ports for universal use in various applications
SCI level converter (Sipex SP3220)
RS-232 port (DB9 female connector) for interface with a personal computer or various applications
On/Off switch
Power supply jack (supply voltage of +3.3 V DC up to +12 V DC)
Four switches and LEDs for control and monitoring
Reset push button for program reset
Scalable software support:
— Proprietary point-to-point or star networking using Freescale’s simple medium access control
(SMAC) software
— IEEE 802.15.4 Standard compliant networking using Freescale’s MAC/PHY
— ZigBee networking using Freescale’s Z-stack software
ZCOMM Board Hardware Overview
ZCOMM Board MCU
The MC1321x contains a microcontroller based on the HCS08 family of MCUs and can provide up to
60 KB of flash memory and 4 KB of RAM. The onboard MCU allows the communications stack and also
the application to reside on the same system-in-package (SiP). ZCOMM Board uses the MC13213 (see
Section 1.4.1, “MC13213—2.4 GHz RF Transceiver and 8-Bit MCU”) device.
3.3.2
Power Supply
The ZCOMM board can be powered from an external DC voltage power supply of +3.3 V up to +12 V
through power jack J1. This external power supply voltage is switched to tthe dropout voltage regulator
by on/off switch SW1. The 80 mA low-dropout voltage regulator NCP502SQ33T1 (+3.3 V) from ON
Semiconductor provides voltage for all onboard devices.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
3-3
ZCOMM Board Description
Alps/SSSS811101
VCC
-V2 +V
-V1
J1
1
ON
GND
OFF
2
2
D1
1N4448
GND
GND
D2
RED
3
3
+3.3V
U1
NCP502SQ33T1G
1
5
Vin Vout
SW1
Enable
+5V - +12V External power supply
C1
1uF
C2
1uF
GND
GND
GND
R1
560
GND
Figure 3-4. ZCOMM Board Power Supply Circuitry
The device is protected from power supply polarity changes by diode D1.
3.4
Background Debug Mode Interface
All MCUs in the HCS08 family contain a single-wire background debug interface that supports in-circuit
programming of on-chip non-volatile memory and sophisticated non-intrusive debug capabilities.
Typically, a simple interface pod is used to translate commands from a host computer into commands for
the custom serial interface to the single-wire background debug system. The pod connects to the target
system with ground (GND), the BKGD pin, RESET, and VDD.
The J4 connector has a standard footprint intended for BDM purposes. The J4 connector carries all
standard signals for background debug mode communication. J4 is a BDM port for use with a P&E
BDM-Multilink cable. The BDM cable is used with CodeWarrior for the HCS08 to program the MCU
flash memory as well as to perform in-circuit debugging.
BKGD 1
2 GND
NO CONNECT 3
4 RESET
NO CONNECT 5
6 VDD
Figure 3-5. BDM Connector J4
3.4.1
Button Connections and LED Indicators
Four buttons (SW1, SW2, SW3, SW4) are connected directly to pins PTC4 – PTC7. These pins have
internal pull-up resistors, but are not a part of the keyboard interrupt module. Therefore, do not allow a
direct microcontroller wakeup from the stop modes.
The ZCOMM board contains also one RESET button (SW5), which is connected to the RESET pin.
Remote Control of High-Brightness LEDs, Rev. 0
3-4
Freescale Semiconductor
ZCOMM Board Description
PTB4–PTB7 pins are used for LED indicators. D3–D6 are LEDs connected to these pins. D2 is the LED
(red) for power indication and D3–D6 are green LEDs used for optional purposes.
Connections to MCU ports are listed in Table 3-1.
Table 3-1. LED and Button Connections to MC13213
3.4.2
LED/Switch
MC13213 Pin
I/O
D3 (LED)
PTB4
Output
D4 (LED)
PTB5
Output
D5 (LED)
PTB6
Output
D6 (LED)
PTB7
Output
S1
PTC4
Input
S2
PTC5
Input
S3
PTC6
Input
S4
PTC7
Input
RESET(S5)
RESET
—
Serial Communication (RS232 Interface)
Serial communication uses the SCI1 module of the GB60 microcontroller in the MC1321x, a SP3220 from
Sipex, and a DB9 female connector.
The RS232 port is J2, a DB9 connector. A standard straight-through DB9 serial cable can be used with a
PC or other application that uses an RS232 communication port. The port follows the non-standard RS232
DCE DB9 convention, but only a three-wire modification with RxD,TxD and GND pins, as shown in
Figure 3-7. This modification doesn’t need any control communication channels. Conversion from TTL
levels from the microcontroller into RS232 levels is provided by the SP3220 device.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
3-5
ZCOMM Board Description
+3.3V
C3
100nF
CON/CANNON9
J2
+3.3V
GND
15
12
10
1
6
2
7
3
8
4
9
5
16
13
8
3
7
GND
GND
C6
C7
100nF
100nF
NC
NC
U2
VCC
SHDN
C2+
C2-
TOUT
RIN
TIN
ROUT
V+
V-
C4
100nF
C5
100nF
5
6
PTE0/TxD1
PTE1/RxD1
11
9
1
EN
GND
14
GND
2
4
C1+
C1-
SP3220
GND
GND
Figure 3-6. Serial Communication Circuitry
The transmit-receive pin of the SP3220 is connected with the PTE0/TxD1-PTE1/RxD1 pin of the
MC13213. The SP3220 is powered by a +3.3 V DC derived from the voltage regulator. The enable pin of
the SP3220 (pin1) is fixed to GND. Therefore, the SP3220 remains in working mode. This RS232 interface
is inteded to enable control, to communicate or receive data from, an external application.
If RS232 is not needed, the SP3220 can be shut down by low level voltage on the GPIO7 pin of the
microcontroller MC13213 for lower power consumption. For normal function, a high level on GPIO7 is
needed.
1
Transmitted Data
Received Data
2
3
4
5
6
7
8
9
Signal Ground
Shield
Figure 3-7. DB9 Female Connector (Looking into the Connector)
3.4.3
MC13213 RF Interface
The RF interfaces (antennas) were designed with the cost and board size in mind. Among several designs,
the PCB layout antennas were the main consideration (cost). Of several PCB antenna designs available for
the 2.4 GHz band (F-antenna, dipole, loop), the loop antenna has been selected mainly because of the size
required on the PCB.
Remote Control of High-Brightness LEDs, Rev. 0
3-6
Freescale Semiconductor
ZCOMM Board Description
The MC1321x transceiver includes an integrated transmit/receive switch. The RFIN_P and RFIN_M pins
can be used for receive and transmit paths with the same loop antenna.
The loop antenna is placed on the top side of the ZCOMM Board (see <st-blue>Figure 3-1). The antenna
is designed as a rectangle, 26.4 x 16.8 mm (1040 x 660 mils), and made of 1.25 mm (50 mils) wide trace
copper. The corners are rounded with a 1.85 mm (73 mils) radius.
The matching is provided by the L1 (transmit/receive antenna) coils. L2 and L3 coils bias the transmitter
output transistors to the VDDA level.
The inductors used in this design are manufactured by TDK:
• L1 (4.7 nH) MLG1608B4N7ST
• L2, L3 (22 nH) MLG1608B22NJT
3.4.4
Clock Configuration
The MC1321x device allows for an array of system clock configurations. The ZCOMM board uses a single
crystal system clock solution. The modem provides a CLKO programmable frequency clock output used
as an external source to the CPU (Figure 3-8).
MC1321x
802.15.4 MODEM
XTAL1
27
C8
6.8pF
XTAL2
X100
16MHz
28
HCS08 MCU
CLKO
10
EXTAL
XTAL
9
8
C9
6.8pF
Figure 3-8. ZCOMM Board Single Crystal System Clock Structure
3.4.5
ZCOMM Board Power Connections
When designing the power connection for the MC1321x SiP, these points must be considered:
• The LNA SiP package has a single common ground flag (VSS)
• The MCU has a single common power pin VDD except for the VDDAD power supply to the ATD
module
• For the modem, there are two primary power inputs, including VBATT for modem power and
VDDINT for digital interface power
• For logic level compatibility between the chips, VDD, VBATT, and VDDINT must be connected
to a common source supply of +2.0 to +3.4 Vdc
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
3-7
ZCOMM Board Description
•
•
VDDAD analog supply to the MCU ATD is also normally wired to the common source supply
Modem input VBATT feeds the common supply to the analog and digital circuitry regulators; the
analog regulator output VDDA is provided for bypassing and supplying VDDLO1 and VDDLO2,
which are the power rails for the local oscillators
Modem output VDDVCO is provided to allow a separate bypass of the modem radio VCO
regulated supply
•
+3.3V
10nF
GND
GND
60
61
+3.3V
GND
VREFH
VREFL
+3.3V
VBATT
VDDINT
+3.3V
45
6
72
C12
C13
C14
100nF
100nF
100nF
VDD
VDDAD
VDDA
VDDLO1
VDDLO2
VDDD
VDDVCO
Exposed Pad
32
23
33
30
29
22
31
C15
C16
C17
C18
100nF
100nF
100nF
1uF
MC13211
GND
GND
GND
GND
GND
GND
GND
GND
Figure 3-9. ZCOMM Board Power Supply Connections
3.4.6
Application Connector
The application connector is J3, a 15x2 female header (SSM series from Samtec), placed at the bottom of
the board (see Figure 3-2). The connector makes it possible to plug the male header not only the from
bottom, but also from the top of the board through holes, the special attribute of this connector. It provides
I/O ports for the MCU, ADC, timers, SCI2 port, I2C bus, GPIO and KBD pins, which can be used for
various purposes. Application connector pin connections to the MC13213 are shown in Figure 3-2. The
function of every pin can be defined during the programming algorithm for the ZCOMM board. The
connector also offers the useful voltage VCC, which is directly connected from the DC connector,
stabilised +3.3 Vdc and GND.
Table 3-1. Application Connector Pin Cnnections to MC13213
PIN
MC13213 Port
PIN
MC13213 Port
1
GND
2
VCC
3
PTA7/KBD7
4
+3.3 V
5
PTA6/KBD6
6
PTC0/TxD2
7
PTA5/KBD5
8
PTC1/RxD2
9
PTA4/KBD4
10
PTC2/SDA
11
PTA3/KBD3
12
PTC3/SCL
13
PTA2/KBD2
14
PTB3/AD3
15
PTA1/KBD1
16
PTB2/AD2
Remote Control of High-Brightness LEDs, Rev. 0
3-8
Freescale Semiconductor
ZCOMM Board Description
Table 3-1. Application Connector Pin Cnnections to MC13213 (continued)
3.4.7
PIN
MC13213 Port
PIN
MC13213 Port
17
PTA0/KBD0
18
PTB1/AD1
19
GPIO1
20
PTB0/AD0
21
GPIO2
22
PTD7/TPM2CH4
23
GPIO3
24
PTD6/TPM2CH3
25
GPIO4
26
PTD5/TPM2CH2
27
GPIO5
28
PTD4/TPM2CH1
29
GPIO6
30
PTD2/TPM1CH2
Schematic
The ZCOMM board schematic can be seen in Figure C-2. It is a simple system from the hardware point of
view, designed to demonstrate the performance of Freescale’s ZigBee and MCU with external crystal used
in the application.
3.4.8
PCB Layout
The PCB is designed to a smaller design, so can also use relatively small SMD 0603 parts. The dimensions
of the board are 55 x 45 mm and are mainly limited by dimensions of the connectors. The PCB layout can
be seen in Figure 3-10, Figure 3-11, and parts placement in Figure 3-12 and Figure 3-13.
Figure 3-10. ZCOMM PCB Layout—Top
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
3-9
ZCOMM Board Description
Figure 3-11. ZCOMM PCB Layout—Bottom
Figure 3-12. ZCOMM Component Layout—Top
Remote Control of High-Brightness LEDs, Rev. 0
3-10
Freescale Semiconductor
ZCOMM Board Description
Figure 3-13. ZCOMM Component Layout—Bottom
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
3-11
ZCOMM Board Description
Remote Control of High-Brightness LEDs, Rev. 0
3-12
Freescale Semiconductor
Chapter 4
Demo System Description
4.1
General System Concept
A standard system control concept includes these hardware boards:
• Remote control board (i.e. the ZSTAR accelerometer control board)
• ZCOMM board
• Application board (i.e. the HB LED demo system board)
The remote control board runs the main control algorithm and generates a control signal converted to data
(i.e. the ZSTAR generates data from the accelerometer sensor), which is transmitted by the 2.4 GHz RF
wireless signal. The ZCOMM board receives, evaluates, and converts this data signal for further required
communication via the application connector or RS-232 port to any application board. The application
board uses this data for its own purpose (i.e. the HB LED demo control light intensity in RGB LEDs). This
communication is bidirectional.
Remote Control Board
ZSTAR remote
control board
RF 2.4GHz
RF 2.4GHz
9-pin
Cannon
Application connector
(e.g. HB_LED)
Application connector
ZCOMM Board
Application Board
Figure 4-1. System Concept
4.2
High-Brightness LED Demo System Concept
The High-Brightness LED demo system consists of:
• ZCOMM board (<st-blue>Chapter 3)
• LIN transceiver board
• Quadrunner board + LED board
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
4-1
Demo System Description
•
ZSTAR boards (remote control, USB stick)
This chapter describes the remaining boards of the HB LED demo system and operation of the system.
4.2.1
Communication
The scope concept of the HB LED demo is to control an RGB LED board (from Quadrunner kit) with a
remote control board from ZSTAR. To display data on a PC using the USB stick from ZSTAR design.
Figure 1-2 shows the main system block diagram. Communication between the ZCOMM and remote
control is bidirectional. The ZCOMM sends a broadcast to find any transmitting remote control with an
address matching the ZCOMM board. If there is a transmitting device with the requested match,
communication is set up. The ZCOMM then receives data from the sensor and the remote control buttons.
The USB stick behaves as a sniffer only, receiving data from the ZCOMM board, moving it forward to the
PC for the FreeMASTER GUI. The ZCOMM controls the brightness levels of the RGBW LEDs on the
Quadrunner LED board. The LIN transceiver board with an MC33661 is used, due to the MM908E625
used on the Quadrunner board. The MM908E625 performs serial communication through the LIN
physical layer. A SCI to LIN level shifter was used to make the SCI levels from the ZCOMM signal
compatible with LIN levels on the MM908E625.
The HB LED demo system performs light dimming of the red, green, blue, and white high-brightness
LEDs depending on the 3-axis acceleration sensor (MMA7260Q) positioned on the ZSTAR remote
control. The red, green, blue colors correspond to the X, Y, Z axis. White color corresponds to the X axis
in separate mode. Moving the remote control in different directions with different acceleration, you can
mix each partial color to get a final color on the light pipe. Z-data packets with position data are sent from
the remote control wirelessly (2.4 GHz) to the ZCOMM board. Based on these values, the HB LEDs are
PWM controlled. XYZ information is then sent from the ZCOMM board to the ZSTAR USB stick on the
PC, where the FreeMASTER GUI provides a better visualization for colour management.
4.2.2
LIN Transceiver Board
This evaluation kit (KIT33661DEVB – Evaluation Kit – LIN enhanced Physical Interface), featuring the
MC33661 local interconnect network (LIN), is a serial communication protocol designed to support
automotive networks in conjunction with a controller area network (CAN). As the lowest level of a
hierarchical network, LIN enables cost-effective communication with sensors and actuators when all the
features of CAN are not required.
The MC33661 is a physical layer component dedicated to automotive LIN subbus applications. It offers
slew rate selection for optimized operation at 10 kbps and 20 kbps, fast baud rates (above 100 kbps) for
test and programming modes, excellent radiated emission performance, and a safe behavior in the event
of LIN bus short-to-ground or LIN bus leakage during low-power modes.
4.3
•
•
•
Features
Operational from VSUP 6.0 V to 18 V DC, functional up to 27 V DC, and handles 40 V during
load dump
Active bus waveshaping offering excellent radiated emission performance
5.0 kV ESD on LIN bus terminal
Remote Control of High-Brightness LEDs, Rev. 0
4-2
Freescale Semiconductor
Demo System Description
•
•
•
•
•
•
30 kΩ internal pull-up resistor
LIN bus short-to-ground or high leakage in sleep mode
–18 V to +40 V DC voltage at LIN terminal
8.0 µA standby current in sleep mode
Local and remote wake-up capability reported by the INH and RXD terminals
5.0 V and 3.3 V compatible digital inputs without any external components required
GND
Vpwr
+12VDC
LIN bus
Figure 4-2. Jumpers Configuration
The LIN transceiver board in the HB LED demo system is a functional reuse of the KIT33661DEVB with
several changes and connections to achieve the requested function. The main goal of using a LIN
transceiver is to convert an SCI level ZCOMM (0 to +3.3 Vdc) into a LIN level signal (0 to +12 Vdc),
compatible to the Quadrunner board. This is done by the MC33661 device. The SCI signal from the
ZCOMM is attached to pin4 (Tx) of the MC33661. The translated LIN signal required is available at pin6
(LIN). The application connector (J3) on the ZCOMM board is connected to the JP2 connector on the LIN
transceiver board. The system of interconnections between the ZCOMM and the LIN board for +3.3Vdc,
GND and an SCI—TxD2 signal, can be seen in Figure 4-3. To match the ZCOMM board with the LIN
board, pin1 of the ZCOMM must connect with pin11 of the LIN board. A +12 Vdc Vpwr is connected to
the LIN Board J2 power supply connector externally from a power supply black box. For proper
functioning of the LIN board, 2x1 header connectors (JP3, JP4, JP6) must be connected by jumper, and
pins 2-3 of the 3x1 header connectors (JP5, JP7) must be connected together. Jumper configurations are
shown in Figure 4-2.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
4-3
Demo System Description
Vpwr
+12Vdc
ON/OFF switch
GND
Vpwr +12Vdc
ZCOMM
GND
TxD/2
6
power supply
ON/OFF
GND
1
J3
4
+3.3V dc
14
16
Quadrunner
board
40
JP2
JP1
1 11
GND
Tx
EN
GND
J1
GND
Vpwr +12Vdc
J2
GND
LIN bus
J4
SW1
ID sel
GND
LIN bus
Vpwr +12Vdc
on
off
1
jumper
2
3
4
J7
1
RUN PGM
LIN Transceiver
board
Figure 4-3. HB LED Demo System Boards Interconnection
4.3.1
Quadrunner Lumiled Demo Board
This chapter introduces a fully integrated 4-channel Luxeon LED driver solution controlled by a single
device that includes an 8-bit microcontroller and power drive circuitry (Figure 4-4). One to four Luxeon
LEDs, driven at 350 mA or 700 mA and connected in series, can be controlled per channel. Up to 16 LEDs
can be driven from a single device. The on-chip LIN PHY interface supports single-wire, half-duplex
networking communication, making this solution efficient for remote control of generated light, which is
what is actually used for the HB LED demo system. Applications such as automotive, consumer indoor
and outdoor lighting, emergency vehicles, and entertainment can see significant cost benefits from this
level of integration.
Remote Control of High-Brightness LEDs, Rev. 0
4-4
Freescale Semiconductor
Demo System Description
Power
Communication
Ground
MM908E625
Figure 4-4. Networked Four Channel LED Driver
Luxeon I, 1-watt LEDs from Lumileds, require a regulated constant-current source of 350 mA at a forward
voltage of ~3.7 V for the blue, green, and white colors, due to their InGaN process technology. Red and
amber devices are of AlInGaP process technology and require a lower forward voltage of ~2.85 V. Luxeon
III, 3-watt devices can be driven at their rated 700 mA, or overdriven at up to 1 amp. The high-power
5-watt LEDs are constructed internally with a series die on a substrate. Therefore, they have twice the
forward voltage drop, but require 700 mA of constant-current.
To get detailed information on driving a high-brightness LED, please see Control Theory for HBLED
Lighting.
4.3.1.1
Dimming and Intensity
Dimming, the variation of the LEDs intensity, is accomplished by varying the ratio of the on-time versus
off-time (duty cycle; see Figure 4-5) of the clock signal driving the FGEN pin (see Figure 2-4). When the
LEDs are quickly turned on and off at the rated current, the eye does not notice the blanking of the emitted
light. It is not recommended to vary the current into the LED. This does not yield a linear response and is
difficult to manage at low intensities. The software pulse-width modulation (PWM) technique is widely
used in the industry. It easily provides the minimum required refresh rate of between 60 and 100 Hz to
minimize any visible flicker in the LEDs light output. The higher the refresh rate, the better the visible
results are. The algorithm described in Section 2.6, “Dimming the Four High-Brightness LEDs”, provides
250 levels of intensity on each independent channel at a refresh rate of 100 Hz.
Duty Factor (%) = ton/(ton+toff)*100
Eqn. 4-1
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
4-5
Demo System Description
DF . . . . DUTY FACTOR
If
DF = 10%
0 1
10
20
time (ms)
If
ton
DF = 50%
toff
0
5
10
20
time (ms)
0
5
10
20
time (ms)
DF = 100%
Figure 4-5. Intensity Modulation
The Quadrunner Lumiled demo board is powered by +12 Vdc from an external power supply (see
Figure 4-3). The white wire to the Quadrunner board (in Figure 4-6 ) is the GND connection, the red wire
is the +12 Vdc connection. The blue color in the middle of connector JP1 is the LIN connection. The
Quadrunner Lumiled demo board can work in more functions associated with the dip switch positions on
the demo board. One of the functions is to work in a master slave mode. To set the Quadrunner Lumiled
demo board in this mode, place switches 2-4 on dip switch SW1 in positions closest to U1, and switch 1
away from U1 on the demo board (see Default Jumper/Switch Configuration). In this mode, the
Quadrunner board acts like a slave device, controlled from ZCOMM instructions translated into LIN level
signals.
Remote Control of High-Brightness LEDs, Rev. 0
4-6
Freescale Semiconductor
Demo System Description
Working mode selection
Master and slave
mode selected
GND
LIN bus
+12 Vdc
Figure 4-6. Quadrunner Lumiled Demo Board Control Settings
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
4-7
Demo System Description
Remote Control of High-Brightness LEDs, Rev. 0
4-8
Freescale Semiconductor
Chapter 5
Software Implementation
5.1
Introduction
The software implementation of the HB LED demo system has four parts:
• The first is in charge of the ZSTAR software
— Accelerometer
— RF protocol
• The second is in charge of the ZCOMM Board software
— RF protocol
— SCI
• The third is in charge of the LIN Transceiver software
— SCI
— LIN
• The fourth part is in charge of the LumiLED Board software
— LIN
— Dimming
Accelerometer
ZSTAR
SCI
RF protocol
ZCOMM
LIN Transceiver
LIN
Dimming
LumiLED
Figure 5-1. Software String
The ZSTAR, LIN Transceiver, and LumiLED are standard boards and their software was not changed.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
5-1
Software Implementation
5.2
5.2.1
ZCOMM Board S/W Description
ZCOMM Flow Diagram
START
MCU Init (GPIO,SPI,ITRQ)
RF Init
SMAC 4.1a MC13192 Init
Variables Initialization
Get calibration Values
SCI2 Init
Enable Interrupts
ConnDataCB
callback to main, when
xyz data received
Protocol
Figure 5-2. ZCOMM Software Main Flow Diagram
The main routine initializes the MCU, RF modem, SMAC protocol, variables, gets calibrated values of the
X, Y, Z axes from the accelerometer, initializes the SCI2 communication, enables interrupts, and then
enters an endless loop.
The endless loop contains specific execution modules (RF protocol). ConnDataCB (callback function)
from Protocol() is called in every cycle when xyz data is received. After xyz data has been received, these
variables are converted and filtered into 8-bit resolution values. If switch_mode is white, the white LED
brightness is controlled by the converted x-axis variable. The red, green, and blue colors stay off. If
switch_mode is not white, the white LED stays off and the red, green, and blue colors are controlled by
the converted x,y,z-axis variables.
Remote Control of High-Brightness LEDs, Rev. 0
5-2
Freescale Semiconductor
Software Implementation
Conn Data CB
convert X,Y,Z variables from
sensor into 8-bit values
if
yes
no
switch_mode == WHITE
address 0x01
R=0
G=0
B=0
W = axe_x
address 0x01
R = axe_x
G = axe_y
B = axe_z
W=0
SCI Transmit
Interrupt Routine
Send SCI2_TX
Buffer
Figure 5-3. ConnData CB (CallBack) Flow Diagram
The address 0x01 with four values (R,G,B,W) is saved to the SCI transmit buffer and then via SCI2 channel
into SCI ZCOMM data format and sent to the LIN Transceiver board.
5.2.2
ZCOMM SCI Data Format
To control the Quadrunner board remotely from the ZCOMM board, the DIP switch SW1 on the
Quadrunner board must be configured according to the master-slave mode (ZCOMM—master;
Quadrunner—slave).
DIP switch positions for master-slave mode:
4-3-2-1
ON - X - X - X
For the HB LED demo system, this configuration was chosen:
4-3-2-1
ON - ON - ON - OFF
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
5-3
Software Implementation
This configuration represents the address of the slave device (address 0x01). When the DIP switch
configuration does not match the address in the source code, the system does not communicate properly.
The ZCOMM data packet format to the Quadrunner board is based on this rule.
ZCOMM uses a simple packet format for light dimming management of the Lumiled board
high-brightness LEDs. The packet becomes the address (0x01) of the slave (Quadrunner), the payload data
(X, Y and Z axis) for the RGB, and white color LEDs. X, Y and Z are variables converted into 8-bit values.
These data packets are sent to the Quadrunner board in 30 Hz intervals in the RF protocol loop.
~30 ms
~30 ms
idle
idle
L .... low
H .... high
Light level information
Slave address
0x01
X axe
Y axe
Z axe
8bit data
L
LSB
MSB
start
bit
L
H
9bit
stop
bit
8bit data
L
1
0
0
0
0
0
start
bit
0
0
H
H
9bit
stop
bit
Figure 5-4. ZCOMM SCI Data Packet Structure
The light level information goes from 0, to indicate the lowest level (channel OFF), to a value of 255 to
indicate the maximum light level (fully ON).
5.2.3
ZCOMM RF Protocol
This section describes the design of the ZCOMM software blocks. The software description is composed
of these topics:
• Simple Media Access Controller (SMAC) modifications description
• Air ZCOMM RF protocol description
• Serial STAR Protocol and ZCOMM Extensions (Over USB) protocol description
Remote Control of High-Brightness LEDs, Rev. 0
5-4
Freescale Semiconductor
Software Implementation
5.2.3.1
Simple Media Access Controller (SMAC)
The SMAC is a simple ANSI C-based code stack available as sample source code that can be used to
develop proprietary RF transceiver applications using the MC13192.
SMAC features include:
• Compact footprint:
— 2-KB flash
— 10 bytes (+ maximum packet length) RAM
— As low as 16 kHz bus clock
•
•
•
•
•
•
•
•
Can be used to demonstrate coin cell operation for a remote control
MC13192 compatible
Low-power, proprietary, bidirectional RF communication link
ANSI C source code targeted at the HCS08 core and portable to almost any CPU core (including
4-bit)
Low-priority IRQ
Sample application included, extremely easy to use
Liberally commented
CodeWarrior™ experimental edition for support
The development of the ZCOMM software is based on the free SMAC stack available from Freescale. The
SMAC version used was 4.1a. All changes are based on reusing ZSTAR RF protocol definitions and
SMAC modifications. One modification was made because the original version did not support the
MC13213 device. All changes are made using conditional compile options, using the MC13213
definition.
A fully detailed description of the SMAC is in the SMAC Reference Manual (SMACRM.pdf), available
together with SMAC source code, and a description of the ZSTAR design available in the ZSTAR
Reference Manual (ZSTARRM.pdf).
5.2.3.2
SMAC Modification
The modification of the SMAC is minimal, because the core, peripherals, and naming conventions are the
same as in the MC9S08GB/GT code (originally in the SMAC 4.1a code) and the ZSTAR code.
MC13192_hw_config.c
#if defined(ZSTARJW32) || defined(ZSTARQG8)
SPIDrvWrite(0x07,0x0800);
#else
SPIDrvWrite(0x07,0x5C00);
/* RF_switch mode, CT_bias EN */
#endif
5.2.3.3
/* Disable CLKo in Doze */
ZCOMM RF protocol
ZCOMM uses a simple protocol for an RF transfer of information between ZCOMM and ZSTAR (Sensor
Board and USB Sniffer). Acceleration (X, Y, and Z axis), temperature, bandgap voltage, button, and
calibration data can be accessed. The protocol is built on top of Simple Media Access Controller (SMAC)
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
5-5
Software Implementation
drivers available for the MC13191/2 transceiver family. The protocol is bidirectional, allowing the set up
of address dependent connections amongst ZCOMM and ZSTAR sensor board also known as PAIRING
protocol. All data is transferred in Zpackets. This protocol is primarily targeted at simple demo purposes,
allowing a fast transfer of the accelerometer data in short packets with minimum overheads and with
minimum battery loads.
The ZCOMM board acts as a master of the communication connection. After power on, ZCOMM
transmits a broadcast call every 40 ms, trying to get a connection and waiting for an answer from any
device for pairing. If 255 broadcast calls go without answer, the GetConnected() function returns 0 and
ZCOMM goes to idle mode. Each ZCOMM board has a specific network number and connects only with
the sensor board matching its network number. This network number is stored in flash memory on the
ZCOMM and ZSTAR boards (sensor, USB). This network number is 16 bit long.
The ZSTAR sensor board network number can be rewritten for any other ZCOMM board. After the sensor
board is turned off, press both buttons and turn the sensor board on. The first received network number
from the air is then stored to flash memory as a new network number.
The ZSTAR USB board acts as a sniffer, only receiving data packets from a ZCOMM board after a
connection is started, containing ZSTAR_ACK, axis X, axis Y, axis Z, and switch_mode data. This data is
displayed on a PC FreeMASTER GUI.
There is the main RF protocol loop (RF Protocol Data Flow Chart) from zstar_rf.c:
void Protocol(void)
{ for(;;)
{
MLMESetChannelRequest(SiteSurvey());
if (GetConnected() == 1)
DoProtocol();
}
}
SiteSurvey() finds a quiet channel for communication. GetConnected() returns 1 when the sensor board
answers a broadcast with the proper network number and, after starting communication, starts to transmit
zstar data packets. After that, ZCOMM sends a ZSTAR_ACK (acknowledge) to the sensor and the USB
board after every data packet is received from the sensor board.
Remote Control of High-Brightness LEDs, Rev. 0
5-6
Freescale Semiconductor
Software Implementation
Protocol
MLMESetChannelRequest(SiteSurvey());
find a quiet communication channel
if
GetConnected() == 1
No
Yes
DoProtocol
Figure 5-5. RF Protocol Data Flow Chart
DoProtocol
cnt = 0
If
No
RF data() == 1
Yes
Wait 1ms
If
cnt >= 10
No
Yes
ConnDataCB
ZSTAR_ACK
axe_x
axe_y
axe_z
switch_mode
Break
Figure 5-6. DoProtocol Data Flow Chart
If RF data is received, a 1ms delay is performed and then ConnDataCB is called.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
5-7
Software Implementation
ZSTAR_ACK is sent as the data acknowledgement so the ZCOMM board board knows that the connection
is alive. If the receive window is opened by the ZCOMM board and the ZSTAR_ACK has not been
received, the operation (periodic transmission of a data packet) continues, but the ZCOMM board tries to
receive an acknowledgement more frequently. If the acknowledgement is not received several times, the
connection is dropped and the ZCOMM board tries to re-establish the connection.
Remote Control of High-Brightness LEDs, Rev. 0
5-8
Freescale Semiconductor
Chapter 6
Demo Setup
6.1
Introduction
This section shows how to setup the high-brightness LED demo system and run the included
FreeMASTER GUI. You can use the on board open source BDM module to program the MCU flash
memory and debug new applications.
6.2
Setup Instructions and User Guide for Controlling the HB LED
Demo System
The required elements for running and controlling the HB LED demo system with FreeMASTER GUI are:
• Quadrunner Lumiled demo board + Lightpipe
• ZCOMM board
• ZSTAR; sensor board + USB stick (sniffer)
• LIN transceiver board
• +12 Vdc external power supply
• FreeMASTER GUI running on a PC
6.2.1
Configuration Jumpers
Configuration jumpers of the HB LED demo system are:
• JP3, JP4, JP5, JP6, JP7 on the LIN transceiver board
• ID selection switch SW1 and J7 on the Quadrunner board
Table 6-1. Default Jumper/Switch Configuration
Jumper/Switch
Configuration
Board
JP3
Closed
LIN board
JP4
Closed
LIN board
JP5
Position 2-3 closed
LIN board
JP6
Closed
LIN board
JP7
Position 2-3 closed
LIN board
SW1
1-2-3-4; Off-On-On-On
Quadrunner
J7
Postion 1-2 closed
Quadrunner
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
6-1
Demo Setup
The default jumper configuration is shown in Default Jumper/Switch Configuration.
Figure 6-1. HB LED Demo System (Without Lightpipe)
Figure 6-2. HB LED Demo System (Lightpipe Mounted)
Remote Control of High-Brightness LEDs, Rev. 0
6-2
Freescale Semiconductor
Demo Setup
FreeMASTER GUI
PC
RF using IEEE802.15.4
Standard
Figure 6-3. System Communication Overview
6.3
Starting Up the HB LED demo system
This sequence gets the HB LED demo system up and running and gets the FreeMASTER graphical user
interface ready to display RGBW color elements.
• Verify that the ZCOMM, LIN, and Quadrunner boards are connected together properly.
• Put the Lightpipe into the gap in the plastic cover over the LEDs (see <st-blue>Figure 6-2.) .
• Plug the +12 Vdc wall-mount power supply into the power supply black box.
• Turn on the ZCOMM board with on/off switch SW1.
• Turn on the main ON/OFF switch on the power supply box. ZCOMM LED D2 (red-power on)
should turn on and LED D3 (green) should blink.
• Power the ZSTAR remote control with a +3 Vdc battery (CR2032) and turn switch SW1 to the on
position. LED D2 should blink.
• When communication starts, ZCOMM LED D4 and ZSTAR LED D1 should blink and ZSTAR
LED D2 flashes, turning off and on again when acknowledging RF messages coming in from the
ZCOMM board.
• The HB LED demo system works in two modes. First mode (after start, power on) controls the
white LED separately from the RGB LEDs. Brightness level is given by the X axis of the sensor
in the remote control.
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
6-3
Demo Setup
•
•
•
Second mode controls the red, green, and blue LED according to the X, Y, Z axes.
To switch between these two modes, push the button S2 on the remote control.
It is now time to run the graphical user interface program, RGB_LEDdemo.pmp, on the PC. On
startup, the interface should look like <st-blue>Figure 6-4.. To run the GUI properly, see section
FreeMASTER GUI.
Figure 6-4. FreeMASTER Graphical User Interface Startup Window
6.3.1
Troubleshooting
Communication is not running
• Verify that the boards are powered properly
• Verify that the ZCOMM and ZSTAR remote control boards are turned on
Remote control can not control the Quadrunner Lumiled board even when communication is running
• Check the ID selection switch on the Quadrunner board
• Check the default jumper configuration (Default Jumper/Switch Configuration)
6.4
FreeMASTER GUI
To run FreeMASTER on your computer, run the installation file fmaster13-2.exe from the
FreeMASTER/freemaster_install directory on the enclosed CD.
After you have installed the FreeMASTER software, finish setting up the system and connect the power
supply. Turn the demo on with switch SW1. You can then start the FreeMASTER program.
• Plug the ZSTAR USB stick (sniffer) into the USB com port of the PC.
Remote Control of High-Brightness LEDs, Rev. 0
6-4
Freescale Semiconductor
Demo Setup
•
•
•
6.4.1
Run the graphical user interface program, RGB_LEDdemo.pmp, on the PC.
Setup the communication. Open the Options window by selecting the menu sequence Project
/Options. Choose an appropriate COM port (usually COM7). Change the port if necessary. The
baud rate should be at 57600 baud.
Click on the start/stop button on the FreeMASTER toolbar. When proper communication options
are chosen, the white bowl should change the intensity of its color. Switch to the RGB mode
(remote control S2 button) and the RGB bowls change their level of brightness.
Troubleshooting
FreeMASTER GUI—not connected
• Verify communication options are correct (COMx port, Baud Rate- 57600)
• Click on the Start/Stop communication button on the toolbar menu
• Remove and plug in the USB sniffer again
FreeMASTER GUI—Connected (receiving strange network values)
• Push button S1 on the USB sniffer (proper network channel selection)
red
blue
green
255
colour
diagram
spectrum
1.mode White bowl
min intensity (black)
max intensity (white)
max
level
intensity
0
min
2.mode RGB bowl
min intensity (black)
max intensity (RGB)
mixed colour
resulting colour (showing on light pipe)
Figure 6-5. FreeMASTER Software Control Page
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
6-5
Demo Setup
Remote Control of High-Brightness LEDs, Rev. 0
6-6
Freescale Semiconductor
Appendix A
Schematics
Alps/SSSS811101
VCC
1
OFF
Vin Vout
2
2
D1
1N4448
GND
GND
5
Enable
-V2 +V
-V1
GND
J1
ON
1
+3.3V
U1
NCP502SQ33T1G
SW1
3
D2
RED
3
+5V - +12V External power supply
C1
1uF
GND
C2
1uF
GND
GND
R1
560
GND
J3
PTA7/KBD7
PTA6/KBD6
PTA5/KBD5
PTA4/KBD4
PTA3/KBD3
PTA2/KBD2
PTA1/KBD1
PTA0/KBD0
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
GND
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
PTC0/TxD2
PTC1/RxD2
PTC2/SDA
PTC3/SCL
PTB3/AD3
PTB2/AD2
PTB1/AD1
PTB0/AD0
PTD7/TPM2CH4
PTD6/TPM2CH3
PTD5/TPM2CH2
PTD4/TPM2CH1
PTD2/TPM1CH2
VCC
+3.3V
Application connector/15X2
Figure A-1. ZCOMM Board (Power Supply, Application Connector)
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
A-1
Schematics
A-2
+3.3V
+3.3V
+3.3V
+3.3V
IC1
PTA0/KBD0
PTA1/KBD1
PTA2/KBD2
PTA3/KBD3
PTA4/KBD4
PTA5/KBD5
PTA6/KBD6
PTA7/KBD7
62
63
64
1
2
3
4
5
PTA0/KBD0
PTA1/KBD1
PTA2/KBD2
PTA3/KBD3
PTA4/KBD4
PTA5/KBD5
PTA6/KBD6
PTA7/KBD7
+3.3V
PTB0/AD0
PTB1/AD1
PTB2/AD2
PTB3/AD3
PTB4/AD4
PTB5/AD5
PTB6/AD6
PTB7/AD7
C3
100nF
15
S1
U2
Remote Control of High-Brightness LEDs, Rev. 0
1
6
2
7
3
8
4
9
5
12
10
16
13
8
3
7
C6
C7
100nF
GND
GND
GND
PTC0/TxD2
PTC1/RxD2
PTC2/SDA
PTC3/SCL
GND
NC
NC
VCC
SHDN
C2+
C2-
TOUT
RIN
V+
V-
C1+
C1-
TIN
ROUT
EN
2
4
C4
100nF
C5
100nF
5
6
SW2
1
3
2
4
Alps SKRP
GND
PTE0/TxD1
PTE1/RxD1
11
9
PTC0/TxD2
PTC1/RxD2
PTC2/SDA
PTC3/SCL
PTC4
PTC5
PTC6
PTC7
SP3220
ATNBi
IRQ/IRQo
GND
S3
100nF
GND
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
GPIO7
S2
1
GND
14
SW1
1
3
2
4
Alps SKRP
12
13
14
15
16
17
18
19
GND
SW3
1
3
2
4
Alps SKRP
SW4
1
3
2
4
Alps SKRP
GND
PTE0/TxD1
PTE0/RxD1
52
53
54
55
56
57
58
59
PTB0/AD0
PTB1/AD1
PTB2/AD2
PTB3/AD3
PTB4/AD4
PTB5/AD5
PTB6/AD6
PTB7/AD7
44
43
42
41
24
25
26
D3
Green
R3
560
PTD2/TPM1CH2
PTD4/TPM2CH1
PTD5/TPM2CH2
PTD6/TPM2CH3
PTD7/TPM2CH4
70
47
71
48
49
50
51
7
8
9
10
11
PTD1/RXTXENi
PTD2
PTD3/RSTBi
PTD4
PTD5
PTD6
PTD7
PAO_M
PAO_P
TINJ_M
RFIN_P
RFIN_M
CT_Bias
SM
39
38
37
36
35
34
40
L1
4.7nH
L3
22nH
XTAL1
PTG0/BKGD/MS
PTG1/XTAL
PTG2/EXTAL
CLKOo
RESET
+3.3V
27
6.8PF
X100
C10
6.8PF
4
3
C9
XTAL2
28
GND
6.8PF
16MHz NX2520SA
10nF
GND
GND
60
61
BDM PORT
J4
5
3
1
GND
+3.3V
R2
10K
VREFH
VREFL
+3.3V
VBATT
VDDINT
+3.3V
45
6
6
4
2
Jumper_2x3
72
GND
C12
C13
C14
100nF
100nF
100nF
VDD
VDDAD
Exposed Pad
VDDA
VDDLO1
VDDLO2
VDDD
VDDVCO
32
23
33
30
29
22
31
C15
C16
C17
100nF
100nF
100nF
C18
MC13211
S5
1
2
SW5
GND
3
4
Alps SKRP
R5
560
46
69
GND
C11
D7
MR0520LT1
R4
560
D6
Green
GPIO1
GPIO2
GPIO3
GPIO4
GPIO5
GPIO6
C8
+3.3V
D5
Green
S4
GND
+3.3V
D4
Green
1
+3.3V
20
21
68
67
66
65
2
CON/CANNON9
J2
PTE0/TxD1
PTE1/RxD1
PTE2/CEBi
PTE3/MISOo
PTE4/MOSIi
PTE5/SPICLK
GND
GND
GND
GND
RESET Switch
Freescale Semiconductor
Figure A-2. ZCOMM Board (MC13213, RS232)
GND
GND
GND
1uF
GND
L2
22nH
R6
560
Freescale Semiconductor
Vdd
JP4
1
2
J1
CON/Vdd
2
1
+
C5
100n
C4
47u/16V
R6
2k2
Vsup
JP3
D1 1N4002
JP_VDD
JP_VSUP
D5
L_VDD
1
2
3
J3
CON/RXTX
CON/40
R3
5k6
C1
47u/16V
C2
100n
J2
CON/Vsup
D8
L_INH
JP2
CON/40
JP5
JP_EN
R5
2k2
TP2
RX
R1
2k2
TP1
TX
TP3
40RX
Vsup
Vdd
TP4
40EN
TP5
40TX
8
7
6
5
TP7
R_LIN1
MC33661D
JP6
JP_WAKE
TP8
40GND
RX
INH
EN
Vcc
WAKE LIN
TX
GND
J4
CON/LIN
TP6
LIN
U1
1
2
3
4
1
2
R7
1k
TP10
WAKE
C6
1n
R2 47k
TP11
R_LIN2
Vsup
TP9
C_LIN+
TP12
C_LIN-
D2
P6KE30A
D3
P6KE30A
TP13
D_LIN-
R4
10k
D4
1N4002
TP14
40INH
TP15
D_LIN+
Vsup
3
2
1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
1
2
3
Remote Control of High-Brightness LEDs, Rev. 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
+
D6
L_VSUP
D7
L_EN
1
2
JP1
1
2
2
1
JP7
JP_INH
Figure A-3. LIN Transceiver
Schematics
A-3
Schematics
A-4
9-18 VDC
JP1
JP2
CONN PCB 2
L1
U1
330uF 25V
20
J2
C7
0.1uF
LIN
HB1
PTE1/RxD
RxD
HB2
JP8
23
26
JP3
CONN PCB 2
D5 SCHOTTKY
L2
1
2
42
41
J6
2
4
6
8
10
12
14
16
PA1
1
2
PTC2/MCLK
PTC3/OSC2
HVdd
Vdd
R6
VAR Resistor 5k
12
13
C4
0.1uF
43
44
45
1
2
3
1
2
2
1
6
5
4
3
2
1
C9
0.1uF
JP10
VCC
38
R10
1K
JP5
CONN PCB 2
D7
SCHOTTKY
L4
+
C2
10uF 16V TANT
1 mH
C10
0.1uF
J5
40
JP11
12
11
10
9
8
7
SSB
FLSVpp
NC
FGEN
VrefH
VddA
EVdd
VrefL
VssA
EVss
J7
1
2
3
1 mH
MM908E625
BEMF
18
LN01301
15
16
D8 SCHOTTKY
EXTERNAL LED CONNECTION
D2
19
CONN PCB 2
1
2
48
47
46
IRQB_SMOS
IRQB_MCU/FLSEPGMN
HEATSINK
VCC
L3
NC1
NC2
NC3
33
22
21
D4X
D3X
LUMILED
2
1
D2X
LUMILED
2
1
D1X
LUMILED
2
1
LUMILED
2
1
55
51
14
GND2
9
1
2
3
4
5
6
7
8
9
10
RSTB_MCU
RSTB_SMOS
30
VCC
J8
D6 SCHOTTKY
1
2
PTD0/TACH0/BEMF
PTD1/TACH1
GND1
10
17
JP4
CONN PCB 2
SEL
J4
C14
0.1uF
Vss
C6
22pF
SW3
R5
1K
PTC4/OSC1
25
Intensity
34
R9
750
2
1
3
37
36
35
JP9
12
11
10
9
8
7
H1
H2
H3
39
1
2
5
4
3
Debug
MODE
SW2
1
2
Y1
8MHz
VCC
PTC4/OSC1
GND
VCC
IRQ_MCU
IRQ_SMOS
RSTB
PTA0/KBD0
PTA1/KBD1
PTB3/AD3
PTB4/AD4
R8
750
6
5
4
3
2
1
C5
22pF
1
28
1 mH
2
1
PTB1/AD1
PTB3/AD3
PTB4/AD4
PTB5/AD5
PTB6/AD6/TBCH0
PTB7/AD7/TBCH1
HS
11
8
7
6
2
1
C8
0.1uF
J3
32
1
2
4
6
8
10
12
14
16
29
2
1
3
5
7
9
11
13
15
HB4
2
Remote Control of High-Brightness LEDs, Rev. 0
1
3
5
7
9
11
13
15
HB3
6
5
4
3
2
1
debug
PTA0/KBD0
PTA1/KBD1
PTA2/KBD2
PTA3/KBD3
PTA4/KBD4
12
11
10
9
8
7
54
53
52
50
49
1 mH
2
1
C3
0.1uF
6
5
4
3
2
1
C13
0.1uF
12
11
10
9
8
7
C12
1
2
330uF 25V
+
Vsup1
330uF 25V
C11
31
+
27
C1
Vsup3
+
Vsup2
CONN PW R 3-R
24
1
2
1
2
3
2
1
3
2
1
R7
20K
NOTE:
D2X, D3X AND D4X DEPEND ON APPLICATION
Vin SHOULD BE AT LEAST 2V HIGHER THAN
THE SUM OF THE IN-LINE LUMILED'S
FORWARD VOLTAGE
IRQ sel
VCC
R4 10K
R3 10K
Net ID sel
SW1
1
2
3
4
8
7
6
5
R2 10K
Title
R1 10K
QUAD CHANNEL LUMILED DRIVER
Size
B
SW DIP-4
Date:
Freescale Semiconductor
Figure A-4. Quadrunner Lumiled Board
Document Number
ERC-SCH-0016
Thursday September 02 2004
Rev
2
Sheet
1
of
1
Appendix B
ZCOMM Board – Bill of Materials
Table B-1. ZCOMM Board BOM
Reference
Part Value
Description
Mfg.
Mfg. Part No.
C8-10
6.8pF
ceramic SMD 0603
any acceptable
C11
10nF
ceramic SMD 0603
TDK
C1608X7R1H103K
C3-7, C12-17
100nF
ceramic SMD 0603
TDK
C1608X7R1H104K
C1-2, C18
1uF
ceramic SMD 0603
TDK
C1608X7R1H105K
D1
1N4148/1N4448
SMD Switching Diode
SOD80C (minimelf)
any acceptable
D2
Red SMD 0603 LED
any acceptable
D3-6
Green SMD 0603 LED
any acceptable
D7
MBR0520
Schotky Rectifier
OnSemi
R1, R3-6
560
SMD Resistor 0603
any acceptable
R2
10K
SMD Resistor 0603
any acceptable
L1
4.7nH
SMD Inductor 0603
TDK
MLG1608B4N7ST
L2-3
22nH
SMD Inductor 0603
TDK
MLG1608B22NJT
X100
NX2520SA
crystal, 16MHz
NDK
NX2520SA 16MHz
EXS00A-02940
U1
NCP502SQ33T1G
voltage regulator
ONSEMI
NCP502SQ33T1G
U2
SP3220
RS232 transceiver
Sipex
SP3220EBCA
IC1
MC13213
Freescale ZigBee
Platform + MCU
Freescale
MC13213
S1-5
Alps SKRP
button
Alps
SKRPADE010
SW1
Alps/SSSS811101
On/Off switch
Alps
SSSS811101
Power Jack type
connector 2.1mm
Elekon
K375A
Cannon 9-pin(RS232)
female 90°
any acceptable
Application Connector
15x2
Samtec
J1
J2
J3
DB9/female
MBR0520LT1
SSM-115-S-DV
Remote Control of High-Brightness LEDs, Rev. 0
Freescale Semiconductor
B-1
ZCOMM Board – Bill of Materials
Remote Control of High-Brightness LEDs, Rev. 0
B-2
Freescale Semiconductor