lm9627 National Semiconductor Corporation, lm9627 Datasheet - Page 18

no-image

lm9627

Manufacturer Part Number
lm9627
Description
Color Cmos Image Sensor Vga 30 Fps
Manufacturer
National Semiconductor Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
lm9627CCEA
Manufacturer:
DIALIGHT
Quantity:
10 000
Functional Description
11.0 OFFSET ADJUSTMENT
For maximum image quality over a wide range of light conditions
it is necessary to set an appropriate offset voltage before using
the sensor to capture images. This offset voltage must be
applied to the offset pin (38) of the sensor, and is used to adjust
the analogue video signal being fed to the internal A/D.
The level of the offset voltage determines the black level of the
image and has a direct impact on the image quality. Too high an
offset results in a white washed or hazy looking image, while too
low of an offset results in a dark image with low contrast even
though the light conditions are good.
A fine offset adjustment should be applied to each part by pro-
gramming the offset voltage via the I
face. To program an offset voltage the following procedure
should be followed:
The sensor’s offset, fine_i & fine_ctrl pins should be connected
as shown in figure 2.
The following procedure should be followed to calibrate the off-
set
• Disable the black level compensation block by writing a logic
• The offset can be adjusted by writing to the Offset Compen-
• Run the following binary search algorithm
• For n=7 to 0 step -1
• {
• Enable the black level compensation block (if desired) by writ-
Confidential
1 to bit 4 of the Main Configuration Register 0 (MCFG0:
address 02Hex).
sation Registers (OCR: addresses 1F, 22 & 25 hex). Writing
00hex will give the largest voltage, while writing FF hex will
give the smallest value.
ing a logic 0 to bit 4 of the Main Configuration Register 0
(MCFG0: address 02Hex).
}
else
Hex) to a logic one by writing over the I
interface.
Read a full frame and calculate the average black level
(BL
row of the array
If (BL
Set bit n in the OCR registers (addresses 1F, 22 & 25
Reset bit n in the OCR registers (addresses 1F, 22 &
Keep bit n set to one.
25 Hex) to 0
average
average
) of the first and last 5 black pixels in the every
< 100) then
2
(continued)
C compatible serial inter-
2
C compatible
18
12.0
The fine offset adjustment and calibration method described in
section 11.0 will ensure that the sensor’s black level is optimized
for a fixed analog gain setting. However, when the analog gain is
changed substantially, the black level of the sensor will shift
resulting in a white washed image.
To stop this effect from occurring, the black level needs to be re-
calibrated. This can be done as part of the contrast adjustment
which is carried out by most digital image processors. If this is
not possible then the following method can be used.
The relationship between the gain and the offset can be
described with the following equation.
where:
The following procedure should be used to calculate the value of
C:
Use the calibration procedure described in section 11.0 to deter-
mine the offset at unity gain, offset(0). Note the VGAIN register
should be set to 0.
Set the sensor’s analog gain register (VGAIN) to its max setting,
31, and repeat the calibration procedure described in section
11.0. This will allow the offset at full gain, 31, that needs to be
programmed in the OCR1, OCR2 & OCR3 registers to ensure
the correct black level setting to be determined.
The value of C for a particular sensor can be calculated using
the following formula:
Once the value of C has been calculated, offset values for differ-
ent gain settings can be calculated using equation 1. It is recom-
mended that a two decimal point accuracy for C is maintained.
Offset(0)
G
Offset(G) is the offset that needs to be programmed in
C
OFFSET & GAIN
Offset(G) = Offset(0) + C * G
is the offset that needs to be programmed in
the OCR1, OCR2 & OCR3 registers to ensure
the correct black level setting for an analog
gain setting of G.
the OCR1, OCR2 & OCR3 registers to ensure
the correct black level setting for unity analog
gain, (G=0).
is a constant and will vary from sensor to sen-
sor
is the value programmed in the VGAIN regis-
ter of the sensor which determines the sen-
sor’s analog gain.
C =
Offset(31) - Offset(0)
3.95
0.4
www.national.com

Related parts for lm9627