lm9831 National Semiconductor Corporation, lm9831 Datasheet - Page 22

no-image

lm9831

Manufacturer Part Number
lm9831
Description
42-bit Color, 1200dpi Usb Image Scanner
Manufacturer
National Semiconductor Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
lm9831CCV
Manufacturer:
NS/国半
Quantity:
20 000
Part Number:
lm9831CCVJD
Manufacturer:
TI
Quantity:
4 425
The subtractor saturates at 0, i.e. if the coefficient to be sub-
tracted is greater than the ADC output code, the result is an out-
put of 0.
The offset words stored in DRAM are typically calculated by
scanning a black calibration strip at 14 bits, and storing the
results in the DRAM using the DataPort.
The offset subtractor only uses the upper 14 bits of the 16 bit
word. When scanning in 14 bit mode, a pixel is transmitted as a
16 bit word, with the upper 14 bits containing the image data. The
2 LSBs of the image data and the offset correction word should
be 00.
The offset correction equation is:
3.4 Pixel Rate Gain Correction Block
This is a digital multiplier that multiplies the output word from the
subtractor by a 16 bit digital correction coefficient corresponding
to that pixel’s gain error. The coefficients are stored in the exter-
nal RAM and accessed at the pixel rate.
The multiplier saturates at 16383, i.e. if the result of the multipli-
cation is greater than 16383, the multiplier output is 16383.
The gain equation is:
Note that a coefficient of 0 represents a gain of 0. On the LM9830
and previous parts, a coefficient of 0 represented a gain of 1. To
achieve a gain of 1, the coefficient should be set to 16384.
3.5 Gamma Correction Tables
There are 3 gamma lookup tables for R, G, and B. The input to
the table is the 12 MSBs (most significant bits) of the 14 bit pixel
data coming from the previous stage (3.4 Pixel Rate Gain Cor-
rection Block). The output is the 8 bit gamma corrected pixel
data. The tables consume 12k words (4K bytes x 16 bits, only the
8 LSBs of each word is used) of the external DRAM. Each
gamma table (red, green, and blue) can be loaded with any arbi-
trary user-defined transfer curve.
The gamma tables are loaded through the dataport (see 6.1 The
DataPort: Reading and Writing to Gamma, Offset, and Gain
Memory). The DataPort selects which color (Red, Green or Blue)
gamma table will be read from or written to.
255
0
0
Pixel
Pixel OUT
Figure 5: Gamma Table
12MSBs of 14 bit Output
OUT
=
=
Pixel
Pixel IN
IN
coefficient
-------------------------- -
coefficient
16384
4095
22
3.6 Pixel Packing/Thresholding Block
Some scans require only one bit per pixel (“line art” mode), others
may need only 2 or 4 bits/pixel. To increase scanning speed for
lower pixel depths, the LM9831 packs the desired MSBs of multi-
ple pixels together into 1 16 bit word, increasing the transmission
speed to the host by a factor of 2, 4, 8, or 16. Figure 6 shows how
the pixels are packed together for 8, 4, 2, and 1 bit pixel depths.
In Figure 6, “b” indicates the bit position (b7 = the most significant
and b0 = the least significant bit) of the original 8 bit pixel data,
and p
If there are not enough unpacked pixels at the end of a line to
complete the packed word for transmission, that final word is not
sent. For example, doing an 8 bit pixel rate scan with a HDPI
divider of 1 and an odd number of pixels will truncate the blue
component of the last pixel.
The gamma table in 3.5 Gamma Correction Tables allows the
user to set the threshold of each transition for various line art or
reduced pixel depth modes.
3.7 14 Bit Output Mode
For calibration purposes, it is useful to get the 14 bit data from the
ADC. This mode is set through register 9, bit 5. In the 14 bit out-
put mode, the gamma and pixel packing stages are bypassed,
and the 14 bit data from the ADC is stored in DRAM, formatted as
shown in Figure 7.
The 14 bit data is stored as a 16 bit word, with the 2 least signifi-
cant bits of the 16 bit word set to 0.
3.8 Line Buffer
The line buffer uses the external DRAM as a FIFO line buffer to
store the pixel data (which is generated at a fixed rate, synchro-
nous to the CCD clocks) and send it back to the PC at an asyn-
chronous, unpredictable, and non-constant rate.
The LM9831 supports 2 sizes of DRAM, 256k x 16bit and 1M x
16bit. 216kbytes (108kwords) of the capacity of the DRAM is con-
sumed by the offset and shading coefficients and the gamma
Depth
Pixel
MSB
LSB
8
4
2
1
8
4
2
1
n
Figure 6: Packing Multiple Pixels Into One Word
indicates the original pixel sequence, i.e p
Figure 7: 14 Bit Output Mode Data Format
b7 p
b7 p
b7 p
b7 p
b7 p
b7 p
b7 p
b7 p
b13
bit
bit
15
15
b5
7
7
0
0
0
0
1
2
4
8
b6 p
b6 p
b6 p
b7 p
b6 p
b6 p
b6 p
b7 p
b12
bit
bit
14
14
b4
6
6
0
0
0
1
1
2
4
9
b7 p
b5 p
b5 p
b7 p
b7 p
b5 p
b5 p
b7 p
b11
bit
13
bit
13
b3
5
5
10
0
0
1
2
1
2
5
b7 p
b4 p
b4 p
b6 p
b7 p
b4 p
b4 p
b6 p
b10
bit
bit
12
12
b2
4
4
11
0
0
1
3
1
2
5
b7 p
b3 p
b7 p
b7 p
b7 p
b3 p
b7 p
b7 p
bit
bit
11
11
b9
b1
3
3
12
0
1
2
4
1
3
6
b7 p
b2 p
b6 p
b6 p
b7 p
b2 p
b6 p
b6 p
bit
bit
10
10
b8
b0
2
2
13
0
1
2
5
1
3
6
www.national.com
b7 p
0
b1 p
b5 p
b7 p
b7 p
b1 p
b5 p
b7 p
, p
bit
bit
b7
9
1
9
1
0
1
14
, p
0
1
3
6
1
3
7
b7 p
b0 p
b4 p
b6 p
b7 p
b0 p
b4 p
b6 p
2
bit
bit
, p
b6
8
0
8
0
0
3
15
0
1
3
7
1
3
7
...

Related parts for lm9831