LM9830VJDX NSC [National Semiconductor], LM9830VJDX Datasheet - Page 37

no-image

LM9830VJDX

Manufacturer Part Number
LM9830VJDX
Description
LM9830 36-Bit Color Document Scanner
Manufacturer
NSC [National Semiconductor]
Datasheet
from the LM9830 in a continuous stream. First, write to register 3
to set what the data is (gamma or offset/gain) and what color
(red, green, or blue) the data is for. Then write to registers 4 and 5
to set the initial address (usually 0), and the R/W mode (R in this
case). To read data from the DataPort, the DataPort address (6)
needs to be inserted before every read to prefetch the data from
the external SRAM. The timing is shown in Figure 59. Note that
this applies only to offset and gain coefficient reads; the gamma
table may be read with or without the additional address writes.
The DataPort Address stored in registers 4 and 5 will be automat-
ically incremented after every read (if reading gamma data) or
every second read (if reading offset/gain coefficient words).
8.0 Scanning
8.1 Start Scanning - Initiating an Image Scan
An image scan is started by setting the Scanning bit in the Con-
figuration Register. The LM9830 will move the paper forward the
number of steps specified in the Stepper Motor Configuration reg-
ister and begin scanning. Scanning ends when the host writes a
new command to the command register (Idle, Paper Feed to Start
or Paper Feed to End) or when Paper Sensor #1 or Paper Sensor
#2 changes state (if programmed to do so).
The line buffer is reset when the Scanning bit is SET, not when it
is cleared. The host can continue to read stored data out of the
line buffer after a scan has stopped.
The LM9830 pixel data is read from configuration register
address 00. To read pixel data, the host should latch address 00
into the LM9830’s address pointer. Subsequent reads from the
host will read the next byte of pixel data stored in the line buffer.
Here are examples of two consecutive image data reads in the
three possible interface modes:
(AUTOFEED)
(SELECTIN)
CS (INIT)
(STROBE)
AUTOFEED
SELECT IN
D0 - D7
Figure 59: Reading Gain and Offset Coefficients
STROBE
D0 - D7
BUSY
WR
ALE
RD
Figure 60: Reading Pixel Data (EPP)
through the DataPort (µP mode)
6
Pixel n
Data
n
6
Pixel n+1
Data
n+1
6
37
Image data can flow as fast as possible from the LM9830 to the
host, but can be interrupted at any time (by latching a different
address) to read the LM9830’s status registers, abort the scan,
etc.
If for some reason you want to pause the scan for some length of
time and resume later, do NOT reset the Scanning bits (return to
Idle). Simply stop reading pixel data. When the buffer fills up, the
LM9830 will automatically stop scanning and turn off power to the
stepper motor (when the delay goes beyond the time specified in
the Hold Current Timeout register).
The last byte of every line is the status byte (register 02). If the
line just transmitted was the beginning of a stepper motor pause
or reverse cycle, the Pause bit is set. For scanners unable to
reverse, this feature potentially allows the software to correct
images distorted by motor starting/stopping.
8.2 Reconstructing the Image Data Received By the PC
When reconstructing an image from the stream of data received
from the LM9830, it is useful to know the format of the data. The
LM9830 does not perform deinterleaving on the pixel data, it
comes out exactly as the sensor sends it. Deinterleaving and
other processing must be performed on the host PC.
For a single output CCD/CIS that outputs one line of data with
colors alternating at the line rate, the output format is:
R
G
B
For a triple output CCD/CIS that outputs 3 lines of data (each x
pixels apart in the vertical direction) with colors alternating at the
1
1
1
, B
, R
, G
(SELECTIN)
AUTOFEED
2
SELECT IN
2
NIBBLE
2
RD (AUTO-
, B
, R
(STROBE)
CS (INIT)
, G
Figure 61: Reading Pixel Data (Nibble Mode)
STROBE
D0 - D7
3
D0 - D7
3
3
, B
, R
FEED)
BUSY
, G
ALE
4
4
WR
4
,..., B
Figure 62: Reading Pixel Data (µP)
,..., R
,..., G
n-2
n-2
n-2
, B
D7-D4
, R
, G
Pixel n
n-1
n-1
n-1
, B
, R
, G
n
SELECT (D1, D5)
n
ERROR (D0, D4)
n
(line m + 2)
(line m)
D3-D0
(line m + 1)
ACK (D3, D7)
PE (D2, D6)
Pixel n+1
http://www.national.com
D7-D4
D3-D0

Related parts for LM9830VJDX