
33
http://www.national.com
The maximum size of the clamp capacitor is determined by the
amount of time available to charge it to the desired value during
the optical black portion of the sensor output. The internal clamp
is on for each pixel for the time specified in Registers 19 and 20
(see Diagram 11). This time can be calculated using this equa-
tion:
Where Start is the Optical Black Clamp Start Position (Register
19), Stop is the Optical Black Clamp Stop Position (Register 20),
f
MCLK
is the MCLK frequency, and t
DARK
is the amount of time
(per pixel) that the clamp is on.
The following equation takes the number of optical black pixels,
the amount of time (per pixel) that the clamp is closed, the sen-
sor’s output impedance, and the desired accuracy of the final
clamp voltage and provides the maximum clamp capacitor value
that allows the clamp capacitor to settle to the desired accuracy
within a single line:
t
R
Where n = the number of optical black pixels, t
DARK
is the amount
of time (per pixel) that the clamp is on, R
OUT
is the output imped-
ance of the CCD, and accuracy is the ratio of the worst-case ini-
tial capacitor voltage to the desired final capacitor voltage. For
example, if a sensor has 18 black reference pixels, the output
impedance of the sensor is 1500
, the LM9812 is configured to
clamp for 375ns, the worst case initial voltage across the capaci-
tor is 10V, and the desired voltage after clamping is 0.1V (accu-
racy = 10/0.1 = 100), then:
The final value for C
CLAMP
should be less than or equal to
C
CLAMP MAX
, but no less than C
CLAMP MIN
. A value of 470pF will
work in this example.
In some cases, depending primarily on the choice of sensor,
C
CLAMP MAX
may actually be lessthan C
CLAMP MIN
, meaning that
the capacitor can not be charged to its final voltage during the
black pixels at the beginning of a line and hold it’s voltage without
drooping for the duration of that line. This is usually not a problem
because in most applications the sensor is clocked continuously
as soon as power is applied. In this case, a larger capacitor can
be used (guaranteeing that the C
CLAMP MIN
requirement is met),
and the final clamp voltage is forced across the capacitor over
multiple lines. This equation calculates how many lines are
required before the capacitor settles to the desired accuracy:
Equation 11: Line Settling Formula
Using the values shown before and a clamp capacitor value of
0.01μF, this works out to be:
1500
Equation 12: Line Settling Example
At a 2MHz conversion rate, this is about 14ms.
In this example a 0.01μF capacitor takes 14ms after power-up to
charge to its final value, but its droop across all subsequent lines
is now less than 3mV (using the previous example’s values). This
wide margin is the reason a C
CLAMP
value of 0.01μF will work in
most applications.
4.0 CALIBRATION
System calibration is required to correct the many sources of
error in a scanner and optimize image quality. There are many dif-
ferent ways to calibrate a system, some take a long time but pro-
duce better results, others are faster with potentially lower quality
images. The method described below should produce very good
results, but it is by no means the only way to approach scanner
calibration. Some calibration steps could be eliminated to speed
up the calibration procedure. Other steps could be improved by
iteratively repeating them, verifying that the previous calculation
achieved the desired result. Every scanner system is different, so
every system may benefit from optimization of the calibration rou-
tine.
4.0.1 LM9812 Configuration Sequence After Power-On
The power-on reset circuit of the LM9812 may take several hun-
dred microseconds. Wait 1ms after power-on before writing to the
Configuration Registers.
Make sure the SYNC and RUN/STOP inputs are low before writ-
ing to the Configuration Registers. When SYNC is high, you can
not read the configuration register (but you can still write to it).
The LM9812 configuration sequence:
Set bit 2 of Test Register 28 to 0 (to allow writing of
configuration data). This register is reset to 0 by the power-on
reset, but this step is still recommended to ensure that writes
will work even if this register was corrupted.
Program bit 4 of register 24 to determine if the LM9812 will be
used in the SYNC OUT or SYNC IN mode.
Cycle the Powerdown bit to reset the LM9812’s state
machines. (Take bit 7 of register 25 to a 1, then back to a 0).
This procedure will completely reset the part. At this time the
LM9812 is ready for data to be written to all 28 configuration reg-
isters. Data can also be read back from all 28 registers if write
confirmation is desired.
After all 28 configuration registers have been programmed, scan-
ning can begin by taking SYNC high (in the SYNC IN mode) or
RUN/STOP high (in the SYNC OUT mode).
4.1 Calibration Initialization
Set the Offset DACs to their maximum positive value (Offset
DAC registers 0, 1, and 2 =31)
Set the PGA gains to 1V/V (PGA gain registers 3, 4, and 5 =1)
Set the Pixel Rate Offset Adder Source to internal (register 9,
bit 0=1)
Set the Pixel Rate Multiplier Source to internal (register 9, bit
1=1)
Set the Internal Pixel Rate Offset Adder value to 0 (register
6=0)
Set the Internal Pixel Rate Multiplier value for a gain of 1
(registers 7 and 8 = 0)
tDARK(s)
Equation 8: t
DARK
Calculation
2 fMCLK(Hz)
=
CCLAMP MAX
-----
ln(ac 1
=
ROUT
ln(accuracy)
=
Equation 9: C
CLAMP MAX
Calculation
CCLAMP MAX
18
977pF
1500
ln(100)
=
=
Equation 10: C
CLAMP MAX
Example
lines
Rn
CCLAMP
Final Voltage
ln
=
lines
---18
-375ns
0.1V
10.2 lines
=
ln
=