Freescale Semiconductor S08 manual Chapter Firmware Description, Firmware Flow Main Program

Page 23

Chapter 3

Firmware Description

3.1 Introduction

The MCU firmware in this LED lighting control design is responsible for:

Controlling timer channels for the RGB LED color PWM output

Communicating with the host PC for receiving command and data input/output

Operating as a standalone LED box through on board buttons

Figure 3-1and Figure 3-2shows the firmware flow. The LED box can operate in PC control operation mode or standalone operation mode.

Initialization

PC Control Mode

Operation?

Yes

Display control menu through

SCI

No

*Standalone demo box without PC control

Enable I/O for PCB button

detection

Valid command from PC?

No

Yes

Process commands and adjust PWM

output

No

Any PCB button

pressed?

Yes

Adjust PWM output according to button

event

Figure 3-1. Firmware Flow: Main Program

LED Lighting Control using the MC9S08AW60, Rev. 1

Freescale Semiconductor

23

Image 23
Contents LED Lighting Control Using the MC9S08AW60 Page Designer Reference Manual LED Lighting Control using the MC9S08AW60Revision History Freescale Semiconductor Table of Contents Appendix a Schematics Appendix B Bill of Materials Introduction FeaturesChapter Introduction Devices in the MC9S08AW60/48/32/16 Series System OverviewMC9S08AW60 Peripherals Available per Package Type Introduction LED Lighting Control using the MC9S08AW60, Rev AW60 Control Board Chapter Hardware DescriptionDEMO9S08AW60LED Layout DEMO9S08AW60LED FeaturesClock Source PowerReset Switch Development SupportADC Interface Pushbutton SwitchesLED Indicators User OptionsSPI Port Other I/O ConnectorsIIC Port SCI Port10. Sensor Interface Type a PWM PortLED Light Box Interface 13. User Assignable Input 12. Temperature Sensor Input11. Sensor Interface Type H LED Driving Board RGB LED Chip LED Driver Design ProceduresBoost Converter Current Sense ResistorEquations for Boost Converter Freescale Semiconductor Firmware Flow Main Program Chapter Firmware DescriptionFirmware Flow PWM Adjustment PC Control ModeUser Interface Menu Standalone Mode Firmware Files Freescale Semiconductor PC Software Setup Chapter Demo SetupHardware and Software Setup Hardware SetupEcho Typed Characters Setting Demo 1 Demonstration Display Demo ExamplesDemo 5 Full Manual Control Demo 2 Preset Colors DisplayDemo 3 Auto White Balance Control Demo 4 PWM Output Frequency ControlProgram the MCU Flash TroubleshootingDemo 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 Part Description Quantity Value Designators BOM for AW60 Control BoardValue Designators BOM for LED Driving BoardLED Lighting Control using the MC9S08AW60, Rev Page How to Reach Us