Freescale Semiconductor S08 manual PC Control Mode, Firmware Flow PWM Adjustment

Page 24

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 3-3shows the PC screen for the user control menu.

LED Lighting Control using the MC9S08AW60, Rev. 1

24

Freescale Semiconductor

Image 24
Contents LED Lighting Control Using the MC9S08AW60 Page LED Lighting Control using the MC9S08AW60 Revision HistoryDesigner Reference Manual Freescale Semiconductor Table of Contents Appendix a Schematics Appendix B Bill of Materials Features Chapter IntroductionIntroduction System Overview MC9S08AW60Devices in the MC9S08AW60/48/32/16 Series Peripherals Available per Package Type Introduction LED Lighting Control using the MC9S08AW60, Rev Chapter Hardware Description AW60 Control BoardDEMO9S08AW60LED Features DEMO9S08AW60LED LayoutPower Reset SwitchDevelopment Support Clock SourcePushbutton Switches LED IndicatorsUser Options ADC InterfaceOther I/O Connectors IIC PortSCI Port SPI PortPWM Port LED Light Box Interface10. Sensor Interface Type a 12. Temperature Sensor Input 11. Sensor Interface Type H13. User Assignable Input LED Driving Board LED Driver Design Procedures RGB LED ChipCurrent Sense Resistor Boost ConverterEquations for Boost Converter Freescale Semiconductor Chapter Firmware Description Firmware Flow Main ProgramPC Control Mode Firmware Flow PWM AdjustmentUser Interface Menu Standalone Mode Firmware Files Freescale Semiconductor Chapter Demo Setup Hardware and Software SetupHardware Setup PC Software SetupEcho Typed Characters Setting Demo Examples Demo 1 Demonstration DisplayDemo 2 Preset Colors Display Demo 3 Auto White Balance ControlDemo 4 PWM Output Frequency Control Demo 5 Full Manual ControlTroubleshooting Program the MCU FlashDemo Setup Appendix a Schematics LED Lighting Control using the MC9S08AW60, Rev LED Lighting Control using the MC9S08AW60, Rev LED Lighting Control using the MC9S08AW60, Rev LED Lighting Control using the MC9S08AW60, Rev LED Lighting Control using the MC9S08AW60, Rev Appendix B Bill of Materials BOM for AW60 Control Board Part Description Quantity Value DesignatorsBOM for LED Driving Board Value DesignatorsLED Lighting Control using the MC9S08AW60, Rev Page How to Reach Us