Download LightingDemo - Freescale Semiconductor
Transcript
51 dc.b dc.b dc.b " " " <id>1</id>" <name>Luxeon Rebel RGB + CW</name>" <manufacturer>Philips Lumileds</manufacturer>" The utility is a small .exe program that runs at the Windows command prompt. make_xml_asm <XML file> <assembler file> Full source code of the utility is included in the xml_utility folder. Colour Balancing Colour balancing is performed by the routine led_convert_xy_to_levels. The CIE 1931 Colour Space chromaticity coordinate (x,y)and luminance value Y are related to the equivalent XYZ tristimulus values by the following equations: x = Y / (X + Y + Z) y = Y / (X + Y + Z) Or, re-arranging: X = (Y / y ) x Z = (Y / y) (1 - x - y) The routine begins by computing the XYZ tristimulus values of the target colour. Using the information from the XML description of the LED, the software can also calculate the tristimulus values of the individual primaries like Red. The next step is to consider the simplified case of a package with only three primaries - e.g. consider Red, Green and Blue, and ignore any White channel. The software needs to calculate the duty cycles (in the range 0.0 - 1.0 for 0-100%) needed for each channel in order to achieve the target chromaticity at maximum brightness. The XYZ value of the target colour and the duty cycles are related by a matrix multiplication: X Y Z Duty Cycle Red = M x Duty Cycle Green Duty Cycle Blue Software needs to determine the 3 x 3 matrix M and then compute the inverse of M in order to calculate the duty cycles required. M can be determined from the XYZ tristimulus values of the primaries. For example when only the Red primary is illuminated using 100% duty cycle, it produces the lumens and (x,y) chromaticity