Download LightingDemo - Freescale Semiconductor
Transcript
48 led_hcs08.c is replaced by mini_dali_hcs08.c A separate CodeWarrior project is provided for building the mini-DALI version. LED Control A typical LED package consists of three or four separately controllable colours, e.g. Red, Green, Blue and White. Each colour, or channel, is controlled by a separate power stage on the slave board. The ‘fully-on’ current and voltage used by the LED channel are determined by hardware on the board (including current-limiting resistors to prevent LED damage). Colour control is achieved by using a PWM signal to control the channel current, varying the duty cycle in order to vary the brightness of the LED. The topic of colour balancing is discussed in more detail below. XML Descriptions of LED Types In order to perform colour balancing and thermal regulation, the slave board software needs to know the characteristics of each LED package. This information is stored in an easy-to-maintain XML format, stored in Flash on the slave. The same XML description is also used by the LightingDemo application on the PC for two purposes... When using the DMX512 RDM protocol, the controller board is able to interrogate the slave in order to determine the LED name, manufacturer, number of primaries, etc. This information is passed on to the LightingDemo application running on the PC. However, this is not possible in DALI because the DALI protocol only supports single byte responses from slave to controller. For DALI only, the LightingDemo application reads the information directly from its own copy of the XML file. When simulating a controller board and slave boards in software on the PC, the XML file is used to determine the LED characteristics. A typical XML description of an LED is as follows: