7 performing curve fitting, An374, Figure 25. sample csv file for red current vs dim – Cirrus Logic AN374 User Manual
Page 30

AN374
30
AN374REV2
7 Performing Curve Fitting
7.1 Using the CS1630/31 Application Software to Perform Curve Fit
The CS1630/31 application software and graphical user interface (GUI) are designed to perform all necessary op-
erations to program the one-time programmable (OTP) registers. In this section, an overview of the utility is provided
to help understand how to perform the curve fit. The curve fitting utility is incorporated in the application software
and can be downloaded from the Cirrus web site.
The instructions for its installation can be found in application note
AN369: CS1630/31 Device Programmer User Guide. The curve fitter utility is found under the System Design tab.
In order to perform the curve fitting process, it is not necessary to be connected to an IC, and it can be done offline.
The curve fitter utility contains the following three tabs:
• White Gain: Curve fitting for white gain terms. In this section, enter the white current versus dim data. The
data can be manually entered in the fields. Right click in the data section to load a comma-separated values
(CSV) file. Format the CSV so that the dim values are in ascending order and the currents are entered in
Amperes (see Figure 24).
• Red Gain: Surface curve fitting tool for the red gain. Enter the red current versus dim across ambient
temperatures here. The data can be entered manually. Right click in the data section to load a CSV file.
Format the CSV so that the ambient temperature values are increasing when descending across the row
and the currents are entered in amperes (see Figure 25).
• NTC Data: Thermal equilibrium NTC data. The NTC data can be entered as a temperature value or as an
NTC resistance value. The NTC data and the red gain data should have the exact same dim and
temperature values. They should be a one-to-one correspondence. The data can be entered manually.
Right click in the data section to load a CSV file. Format the CSV file so that the NTC data is calculated
using the exact dim and ambient temperature values that were used for the red current.
A
B
1
0.085 0.005928
2
0.117
0.01028
3
0.165
0.01882
4
0.22 0.031378
5
0.26 0.042232
6
0.3 0.054425
7
0.35 0.071397
8
0.4 0.090116
9
0.5 0.132022
10
0.6 0.178605
11
0.7 0.228331
12
0.8 0.279663
13
0.9 0.331064
14
1 0.380998
Dim values in ascending order
Figure 24. Sample CSV File for White Current vs Dim
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
1
0.085
0.117
0.165
0.22
0.26
0.3
0.35
0.4
0.5
0.6
0.7
0.8
0.9
1
2
0 0.011601 0.017686 0.028347
0.04255 0.054017 0.066287 0.082542 0.099565 0.134836
0.16994
0.20272 0.231014 0.252666 0.265514
3
25 0.014113 0.021515 0.034485 0.051764 0.065714 0.080641 0.100416 0.121125 0.164034
0.20674 0.246617 0.281039 0.307379
0.32301
4
40
0.01623 0.024743 0.039658 0.059529 0.075571 0.092737 0.115478 0.139294 0.188639 0.237751
0.28361 0.323195 0.353486 0.371462
Dim values in ascending order
Ambient temperature values in ascending order
Figure 25. Sample CSV File for Red Current vs Dim
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
1
0.085
0.117
0.165
0.22
0.26
0.3
0.35
0.4
0.5
0.6
0.7
0.8
0.9
1
2
0 415756.2 411154.6 397406.6 388288.9 370170.5 343293.7 286373.6 264992.1 235572.1 198692.9 180684.3 157932.4 137249.8 120044.4
3
25
109000
108000
105000
103000
99000
93000
80000
75000
68000
59000
54500
48700
43300
38700
4
40 54213.34 53756.93 52385.42 51469.14
49631.8 46863.29 40808.96 38457.99 35143.39 30837.63
28664
25839.6 23184.32 20900.52
NTC data is calculated using the exact dim and ambient
temperature values that are used to derive the red current.
Figure 26. Sample CSV File for NTC Resistance vs Dim