An374 – Cirrus Logic AN374 User Manual
Page 34

AN374
34
AN374REV2
• Registers CH1CUR and CH2CUR: Channel 1 Reference targets should be the current at 100% brightness
on the white string. Channel 2 reference targets should be the currents at 100% brightness at 25
C ambient
temperature. The currents can be translated into their corresponding digital representation as shown in
application note AN368.
7.3 Using Commercially Available Curve Fitting Software
There are other curve fitting tools that are commercially available, and they can be used for performing the
curve fit. The criteria for using a curve fit utility are as follows:
1. There is a consistent (I
Red
, NTC) combination across the entire region of interest
2. There is an I
White
, I
Red
combination across the entire region of interest at room ambient temperature.
3. All the remaining bits mentioned above will have to be manually entered.
There are many commercially available curve-fitting software. Some of the advantages of using advanced
curve fitters are as follows:
• Ability to generate weighting methodology based on temperature codes. For example, the fitting
requirements for the cold ambient temperature data can be relaxed greatly as that is the least likely
operating space region for most designs.
• Advanced weighting error function
Some examples of curve fitting tools that match the criterion above are CurveExpert Professional and
ZunZun.com Online Curve Fitting. Cirrus Logic does not sponsor or endorse these third party products, any
use of which is done at your own risk. The third party products may include or reflect trademarks or logos of
companies other than Cirrus Logic, Inc. All such trademarks or logos are the property of their respective
owners, who are not affiliated in any way with Cirrus Logic.
7.4 Process of Converting a Given Gain Coefficients to CS1630/31 OTP Map
As mentioned previously, the color polynomial coefficients can have a maximum range of [-8, 8] and the actual
gain coefficients themselves can have a range of [0, 4]. If the coefficients have an absolute value greater than
8, check for the following items as a process of debug.
• Currents should be in Amperes.
• NTC resistances should be in Ohms.
• Normalize the whole equation such that the polynomial coefficients are now less than 8.
Step 1) Get the white gain equation in the normalized form as mentioned in the previous bullet.
Step 2) Take two’s compliment of the coefficient Q0, Q1, Q2, Q3. Refer to the CS1630/31 data sheet to see
exactly the way the bits are arranged (for more information about this data sheet, see Further Reading
on page 1).
Step 3) Take two’s compliment of the color gain coefficients. Refer to the CS1630/31 data sheet for conversion
into corresponding OTP map.
Step 4) At dim = 100%, 50%, calculate the blue/white gains and the red gains.
Step 5) Calculate the currents computed by the color gain and compute the error.
Step 6) On the fitting curve, look for the MSE at that point and see if the error calculated matches with the error
seen on the curve fitter output.