Firmware Description
PWM value input to one channel
Auto White balance?
No
Yes
Prompt for green channel PWM input and calculate the two remaining channels’ PWM values according to existing color temperature
Get the other two channel values from user input
Adjust PWM width in next PWM cycle
Figure 3-2. Firmware Flow: PWM Adjustment
3.2 PC Control Mode
Every time the MCU is powered up, the firmware detects the status of SW1. The LED lighting control box is operated in PC control mode if SW1 is not being pressed.
In this mode, you control the LED output through the host PC. The MCU uses the serial communication interface (SCI) module to communicate to the COM port of the host PC.
After entering this mode, the MCU sends out a number of string characters to the PC COM port. These strings are the contents of the user interface menu displayed in the PC screen. This user interface menu guides you on how to control the LED box by different function keys. The MCU also sends out existing PWM control parameters to the host for display. For examples, parameters such as existing RGB PWM output values, white balance mode, and PWM frequency are displayed. Figure
LED Lighting Control using the MC9S08AW60, Rev. 1
24 | Freescale Semiconductor |