
AN3667| Application Note
Maxim/Dallas > App Notes > DISPLAY DRIVERS Keywords: microcontrollers, assembler, LUT, look-up table, gamma correction
Oct 10, 2005
APPLICATION NOTE 3667
Using Lookup Tables to Perform Gamma Correction on LEDs
Gamma correction is used to correct for the nonlinear relationship between luminance and brightness. This application note presents an assembly program written for the MAXQ2000 microcontroller (uC) that uses gamma correction with a fixed-frequency PWM signal to linearly increase and decrease the brightness of an LED. The PWM duty cycles, stored in a Lookup Table (LUT) located in Utility ROM memory, are gamma corrected to produce linear brightness changes. The software compiles using the free MAX-IDE development tool and runs on the MAXQ2000 evaluation kit.
Background
When an LED emits light, gamma correction is used to account for the power-law relationship between luminance and brightness. Although often used interchangeably, luminance and brightness are not synonyms. Luminance: The emitted light, projected per unit area measured in cd/m2 (candela/ meter2). Brightness: The perceived luminance attributed by the human eye. The power-law relationship can be approximated by:
In this discussion,
is equal to 2.5.
Controlling the LED Intensity
Appendix A is an assembly program that linearly ramps-up and ramps-down the brightness of an LED. The intensity values have been gamma corrected to approximate a linear change in brightness. The LED is controlled using PWM. Timer 0 generates the PWM signal on P0.0 (visible on LED3 of U11 on the MAX2000 evaluation kit) and is set for 16-bit reload/compare timer mode. In this mode, Timer 0 generates two interrupt requests (IRQs): one on timer overflow, and one when the timer is equal to the compared value in T2C0. Figure 1 illustrates how this process creates a PWM signal. Note that the Overflow IRQ controls the PWM period, while the Compare IRQ controls the PWM duty cycle.
AN3667 Application Note maxim Download PDF
Add this permalink to your bookmarks for future download of AN3667 ApplicationNote
Permalink: http://application.emcelettronica.com/maxim/AN3667