
35
http://www.national.com
If 1.5 < Range < 2.0, then set the Multiplier Range bits (register
9, bits 3 and 2) to 01 (50%).
If 2.0 < Range < 3.0, then set the Multiplier Range bits (register
9, bits 3 and 2) to 00 (66%).
If Range > 3.0, then set the range is too large and the system
can not be calibrated.
4.5 Calculating the Pixel Rate Offset Coefficients
Scan one line of a pure black test pattern, or scan one line with
the light source turned off. (Caution: turning the light source on
and off may cause thermal drift in light intensity as the light
source warms up and cools down.) Scanning multiple black
lines and averaging each pixel from each line will reduce noise
and increase the accuracy of this step.
The value of each pixel is the offset error for that pixel. Store
each pixel value into that pixel's offset correction RAM
location.
Set the Pixel Rate Offset Adder Source to external (register 9,
bit 0 = 0)
4.6 Calculating the Pixel Rate Multiplier Coefficients
Scan one line of a pure white test pattern. Scanning multiple
white lines and averaging each pixel from each line will reduce
noise and increase the accuracy of this step.
The equation for the multiplier gain is:
where:
x is the 10 bit multiplier gain coefficient (0 to 1023),
N = 2048 (Multiplier range = 1:1.5),
N = 1024 (Multiplier range = 1:2),
N = 512 (Multiplier range = 1:3).
Determine the multiplier gain for each pixel n so the result is
the Target Code:
The multiplier coefficient required is therefore:
Store the Multiplier Gain Coefficients for each pixel into that
pixel's offset correction RAM location.
Set the Pixel Rate Multiplier Source to external (register 9, bit
1=0)
CALIBRATION COMPLETE
4.7 Additional Calibration Information
The procedure detailed in sections 4.1 through 4.6 is only one of
many approaches to scanner calibration. In some approaches it
may be useful to use a model for the analog front end and actu-
ally measure V
OS1
and V
OS2
.
Figure 13 is a mathematical model of the analog front end of one
channel of the LM9812. The constant C (typically 2, given in the
Electrical Characteristics table) represents the total gain error
from Vin through D
with G = 1V/V (PGA register setting = 1).
To further simplify the model, the signal is always assumed to be
0V for black and increasing in the positive direction as pixel
brightness increases. In reality, black may be offset from ground,
and white may be negative (CCD) or positive (CIS) with respect to
black, but this is all taken care of by the CDS function and the cor-
rect setting of the Signal Polarity bit (Register 24, bit 7).
The analog front end’s transfer function is shown in Equation 18.
The typical values of C (2) and V
REFIN
(2V) cancel each other
out. It is also useful to convert all the voltages to ADC codes,
since that is the domain in which they will be seen by the calibra-
tion software. V
IN
(in ADC codes) = V
IN
(in V)*1024. Calibration
can be more easily accomplished using the simplified model of
Equation 19.
Measurement of the two offset voltages (V
OS1
and V
OS2
) is done
by measuring the ADC output, with a black image on the sensor
(if a black reference image is not available, it may be created sim-
ply by turning off the scanner’s illumination). In this example, V
IN
is considered to be 0V, and any offsets from the sensor are
lumped in with the LM9812’s V
OS1
. If the ADC output is measured
with a PGA gain of 1V/V and 3V/V, then the offset errors (V
OS1
and V
OS2
) can be determined from the following two equations:
V
ADC1
= 1V
OS1
+ V
OS2
+ V
DAC2
(PGA gain = 1V/V)
V
ADC2
= 3V
OS1
+ V
OS2
+ V
DAC2
(PGA gain = 3V/V)
Solving for V
OS1
and V
OS2
:
V
OS1
= (V
ADC2
- V
ADC1
)/2
V
OS2
= (3V
ADC1
- V
ADC2
)/2
5.0 POWER SUPPLY CONSIDERATIONS
5.1 General
The LM9812 should be powered by a single +5V source (unless
3V-compatible digital I/O is required-see Section 5.2). The analog
supplies (V
) and the digital supplies (V
and V
) are brought
out individually to allow separate bypassing for each supply input.
They should notbe powered by two or more different supplies.
Multiplier Gain
1
x
N
---
+
=
Equation 15: Multiplier Gain Equation
Gain(n)
pixel datan
=
Equation 16: Gain Calculation for Each Pixel
Multiplier Coefficent (n)
Integer(N(Gain(n) - 1))
Integer NTarget Code
--------------------------------
=
Equation 17: Multiplier Coefficient Calculation for Each Pixel
pixel datan
1
–
=
V
OD
DAC
Offset
G
Σ
+
+
Figure 13: Simplified Model of One Channel of the Ana-
log Front End
10 Bit
ADC
+
+
+
+
V
OS2
V
OS1
V
IN
Σ
Σ
D
OUT
V
REF IN
C
DOUT
1024C
--VIN
VOS1
+
(
)
G
VOS2
VOD
+
+
VREFIN
=
Equation 18: AFE Transfer Equation
DOUT
VIN
VOS1
+
(
)
G
VOS2
VOD
+
+
=
Equation 19: AFE Transfer Equation (units of ADC LSBs)