Datasheet

AD8557
Rev. C | Page 20 of 24
Determining Optimal Gain and Offset Codes
First, determine the desired gain:
1. Determine the desired gain, G
A
(using the measurements
obtained from the simulation).
2. Use Table 7 to determine G
2
, the second stage gain, such
that (2.8 × 1.05) < (G
A
/G
2
) < (5.2/1.05). This ensures the
first and last codes for the first stage gain are not used,
thereby allowing enough first stage gain codes within each
second stage gain range to adjust for the 3% accuracy.
Next, set the second stage gain:
1. Use the simulation mode to set the second stage gain to G
2
.
2. Set the output offset to allow the AD8557 gain to be
measured, for example, use Code 128 to set it to midsupply.
3. Use Table 6 or Equation 1 to set the first stage gain code
C
G1
, so the first stage gain is nominally G
A
/G
2
.
4. Measure the resulting gain (G
B
). G
B
should be within
3% of G
A
.
5. Calculate the first stage gain error (in relative terms)
E
G1
= G
B
/G
A
− 1.
6. Calculate the error (in the number of the first stage gain
codes) C
EG1
= E
G1
/0.00489.
7. Set the first stage gain code to C
G1
− C
EG1
.
8. Measure the gain (G
C
). G
C
should be closer to G
A
than to G
B
.
9. Calculate the error (in relative terms) E
G2
= G
C
/G
A
− 1.
10. Calculate the error (in the number of the first stage gain
codes) C
EG2
= E
G2
/0.00489.
11. Set the first stage gain code to C
G1
− C
EG1
− C
EG2
. The
resulting gain should be within one code of G
A
.
Finally, determine the desired output offset:
1. Determine the desired output offset O
A
(using the
measurements obtained from the simulation).
2. Use Equation 2 to set the output offset code C
O1
such that
the output offset is nominally O
A
.
3. Measure the output offset (O
B
). O
B
should be within
3% of O
A
.
4. Calculate the error (in relative terms) E
O1
= O
B
/O
A
− 1.
5. Calculate the error (in the number of the output offset
codes) C
EO1
= E
O1
/0.00392.
6. Set the output offset code to C
O1
− C
EO1
.
7. Measure the output offset (O
C
). O
C
should be closer to O
A
than to O
B
.
8. Calculate the error (in relative terms) E
O2
= O
C
/O
A
− 1.
9. Calculate the error (in the number of the output offset
codes) C
EO2
= E
O2
/0.00392.
10. Set the output offset code to C
O1
− C
EO1
− C
EO2
. The
resulting offset should be within one code of O
A
.