VV5300 is a highly-int egrated CMOS image sensi ng
device. In addition to a 160 x 120 pixel image sensor
array, the device includes on-chip circuitry to drive
and sense the array.
The output stage of the sensor contains a successive
approximation circuit which performs analogue-todigital conversion of the photodiode array to produce
8-bit or 4-bit pixel data.
•Reduced flicker operation with 50Hz and 60Hz
mains frequencies
•2 serial data output modes
•Automatic exposure and gain controller
•Automatic black level calibration
•Options selectable via serial interface
y
VV5300 features electronic exposure and gain control over a wide range, enabling the use of a single
fixed-aperture lens.
A bi-directional 2-wire serial communications inter-
inar
face allows the device to be configured and its operating status monitored. The status information may
also be multiplexed onto the digital output bus.
m
CLKI
CLKO
VBLTW
VRT
VCM
VREF2V5
VPED/VBG
VCDS
The primary image size is 160 x 120 but border pixels/lines can be enabled to give an effective image
size of 164 x 124.
BLOCK DIAGRAM
Preli
VERTICAL
SHIFT
REGISTER
CLOCK
CIRCUIT
ANALOG
VOLTAGE
REFS.
PHOTO DIODE ARRAY
SAMPLE & HOLD
HORIZONTAL SHIFT REGISTER
A/D CONVERTOR
DIGITAL
CONTROL
LOGIC
IMAGE
FORMAT
SDA
SCL
D[7:0]
SIN
FST
QCK
Pixel Resolution160 x 120
Pixel Size12µm x 12µm
Array Size1.92mm x 1.44mm
Power Supply5v +/-10%
Min.illumination0.1 Lux
Power 175 mW (Typ.)
S/N36 dB (Typ.)
Exposure controlAutomatic (25000:1)
Temperature-20
o
C to +70oC
cd34011-b.fm17/10/971
Page 2
VV5300 Sensor
Main Features
On-chip 8-bit successive approximation analogue-to-digital convertor with 8-wire, 4-wire parallel and two
serial data output modes.
The default image format is 160x 120. Extra border pixel/lines can be enabled to give an image size of 164
x 124. Digital pixel data coding assigns 10
frame sync periods.
The VV5300 frame rates can be integer multiples of the mains supply frequencies used worldwide, i.e. 50Hz
and 60Hz. This ensures reduced flicker operation of the sensor
All VV5300 operating modes and system status information can be accessed via a two wire bidirectional
serial interface.
VV5300 features an automatic electronic exposure algorithm that enables the use of a single fixed-aperture
lens. Automatic gain control enhances operation under low light conditions.
Automatic black level control ensures consistent picture quality across the whole range of operating
conditions. Extensive use of automated operation and on chip references means that only a small number of
passive components are needed to realise a complete video camera.
as black and F0H as white. Other codes specify line sync and
H
y
On-chip voltage references simplifies the support circuitry and maintains device stability over a wide range
of operating conditions.
This device is also available with bayer pattern colour filters (VV6300), see seperate datasheet.
Exposure Control
With automatic exposure control selected VV5300 uses a complex algorithm to automatically set the
exposure value for the current sc ene. When comb ined with clock co ntrol and gain c ontrol the VV5 300 can
operate over a very wide range of illumination levels.
Where direct control of the exposure is required the exposure value can be directly selected by writing to the
appropriate registers via the serial interface.
Clock Control
The system clock can be divided down internally to extend the operating range of VV5300 by allowing longer
exposure times. The clock divisor can be varied from 2 to 16 in times two steps i.e there are 4 different values.
Note: changing the system clock divisor modifies the pixel and frame rate.
Gain Control
If the image is to dark and the exposur e is alrea dy clos e to its m aximum, VV5300 wi ll incr ease the system
gain.
Gain can be varied from x1 to x8 in times two steps i.e there are 4 different gain settings. If the scene is too
dark and integration period has almost reached its maximum value the gain value is incremented by one step
(i.e. doubled). If the gain setting changes the exposure value is automatically set to half the maximum
integration period. The exposure controller then increases the exposure value as necessary.
Preli
m
inar
Similarly if the image is too bright and the integra tion period is sh ort then gain will be redu ced by one step
(i.e. divide by two). As before, the exposure value is set to half the maximum integration period. The exposure
controller can then adjust the exposure value as necessary to provide a correctly exposed image.
cd34011-b.fm17/10/972
Page 3
VV5300 Sensor
Device Pinout
CLKI
CLKO
SDA
SCL
VSS
DVSS
AUTOLOADB
CE
NC
VREG
NC
NC
VDD
31
32
33
34
35
36
37
38
39
40
41
42
VV5300
24 23 22 21 20 1930 29 28 27 26 25
18 NC
17 QCK
16 FST
15 SIN
14 VDD
13 DVDD
12
NC
11
NC
10
NC
AVDD
9
NC
8
NC
7
VDD
VSS
D[7]
D[6]
D[5]
D[4]
D[3]
D[2]
D[1]
D[0]
VSS
Pad List
12345643 44 45 46 47 48
VRT
VCDS
TEST
HPIX
NC
AVSS
Viewed from above
NC
VBLOOM
VBLTW
VBG
VREF2V7
NC
inar
m
PinNameTypeDescription
POWER SUPPLIES
6AVSSGNDAnalogue ground
9AVDDPWRAnalogue power
13DVDDPWRDigital power
14VDDPWRPower
19VDDPWRPower
20VSSGNDGround
40VREGΙΑReference voltage input
44VBLOOMΟΑInternal reference voltage
45VBLTWIABitline test white reference
46VBGOAInternally generated bangap reference voltage
47VREF2V5ΟΑInternally generated reference voltage 2.5V
16FSTODFrame start. Synchronises external image
1.22V
DIGITAL OUTPUTS
capture.
17QCKODPixel sample clock. Qualifies video output for
external image capture.
25-28D[3:0]BI↓Parallel 4-bit databus. D[0] serial data bus.
21-24D[7:4]OD↓Parallel 4-bit databus.
DIGITAL CONTROL SIGNALS
34SCLBI↑Serial bus clock (bidirectional, open drain)
33SDABI↑Serial bus data (bidirectional, open drain)
37AUTOLO
OA - Analogue outputA - Analogue input
OD - Digital outputD - Digital input
BI - Bidirection alID↑ − Digital input with internal pull-up
OD↓ − Digital output with internal pull-down
cd34011-b.fm17/10/974
Page 5
VV5300 Sensor
SPECIFICATIONS
Package Details
14.22
Viewed from below
Spectral Response
0.51
1.56
1.016 PITCH
1.0
2.16
PIN 1
13.7
0.55
0.53
The optical array is centred within the
package to a tolerance of ± 0.2 mm, and
rotated no more than ± 0.5
Tolerances on package dimensions ±10%
Glass lid placement is controlled so that no
package overhang exists.
All dimensions in millimetres +/-
Glass Lid
Die
Base
Viewed from side
o
y
inar
0.5
0.86
0.8
m
0.6
0.4
0.2
Normalised Response
0
400
500
600
Preli
Wavelength nm
700
800
900
1000
1100
cd34011-b.fm17/10/975
Page 6
VV5300 Sensor
Absolute Maximum Ratings
ParameterValue
Supply Voltage-0.5 to +7.0 volts
Voltage on other input pins-0.5 to V
Temperature under bias-15
Storage Temperature-30
Maximum DC TTL output Current Magnitude10mA (per o/p, one at a time, 1sec. duration)
Note: Stresses exceeding the Absolute Maximum Ratings may induce failure. Exposure to absolute
maximum ratings for extended periods may reduce reliability. Functionality at or above these
conditions is not implied.
o
C to 85oC
o
C to 125oC
+ 0.5 volts
DD
DC Operating Conditions
y
SymbolParameterMin.Typ.Max.UnitsNotes
V
DD
V
IH
V
IL
T
A
Operating supply voltage4.755.05.25Volts
Input Voltage Logic “1”2.4VDD+0.5Volts
Input Voltage Logic “0”-0.50.8Volts
Ambient Operating Temperature070
inar
o
CStill air
m
AC Operating Conditions
SymbolParameterMin.Typ.Max.UnitsNotes
CKIN
SCL
Crystal frequency14.318MHz1
Serial Data Clock100KHz2
Preli
1. Pixel Clock =
2. Serial Interface clock must be generated by host processor.
Electrical Characteristics
SymbolParameterMin.Typ.Max.UnitsNotes
I
DCC
I
ADD
CKIN
/
2
Digital supply current
Analog supply current
Typical conditions, VDD = 5.0 V, TA = 27oC
10mA1
25mA1
cd34011-b.fm17/10/976
Page 7
VV5300 Sensor
SymbolParameterMin.Typ.Max.UnitsNotes
I
DD
V
REF2V7
V
BG
V
OH
V
OL
I
ILK
1. Digital and Analogue outputs unloaded - add output current.
Overall supply current
Internal voltage reference2.700Volts
Internal bandgap reference1.22Volts
Output Voltage Logic “1”2.4VoltsI
Output Voltage Logic “0”0.6VoltsI
Input Leakage current
Typical conditions, VDD = 5.0 V, TA = 27oC
-1µA
35mA1
1µA
OH
OL
VIH on
input
VIL on
input
y
= 2mA
= -2mA
m
Preli
inar
cd34011-b.fm17/10/977
Page 8
VV5300 Sensor
Operating Characteristics
Parametermin.typ.max.unitsNote
Dark Current Signal50mV/SecModal pixel voltage due to photodiode leak-
age under zero illumination with Gain=1
= (Vt1 - Vt2)/(t1-t2), calculated over
(V
dark
two different frames
Sensitivity6V/Lux·SecV
Min. Illumination0.1LuxStandard CCIR clock
ShadingTBA%Variance of V
Random Noise-36dBRMS variance of all pixels, at 66% satura-
SmearTBA%Ratio of V
FlickerTBA%Variation of V
LagTBA%Average residual signal with no illumination
BloomingTBARatio of spot illumination level that produces
m
/Lux·10ms, where Lux gives 50% satu-
Ave
ration with Gain=1 and Exposure=10ms
over eight equal blocks at
66% saturation level illumination
tion, over four frames
25 lines high illuminated at 500xV
to V
Ave
at 66% saturation level illumination
in the field following one field of 66% sat.
inar
illumination
0.1xV
sat
spot to the V
hole target)
ave
of the area outside a rectangle
ave
of the rectangle
ave
output from immediately around the
sat
y
of one line from f iel d to fiel d
spot illumination level (pin-
50%
level
Note: Devices are normally not 100% tested for the above characterisation parameters, other than
Dark Current Signal (see Blemish Specification below).
All voltage (VA, V
blemishes are excluded (see Blemish Specificatio n below). V
saturation, that is peak white
est Conditio ns
T
The sensor is tested using the example support
circuit illustrated later in this document. Standard
imaging conditions used for optical tests employ a
tungsten halogen lamp to uniformly illuminate the
sensor (to better than 0.5%), or to illuminate
specific areas. A neutral density filter is used to
control the level of illumination where required.
cd34011-b.fm17/10/978
ave
, V
, V
) measurements are referenced to the black level, V
Preli
sat
xx%
, and spot
refers to the output that is xx% of
xx%
Illumination Colour Temp.3200o K
Clock Frequency14.318MHz
ExposureMaximum
Gainx1
Auto. Gain Control (AGC)Off
black
Page 9
VV5300 Sensor
Blemish Specification
A Blemish is an area of pixels that produces output sign ificantly different fr om its surrounding pixels
for the same illumination level. The definition of a Blemish Pixel varies according to testing conditions as follows:
1 - Black FrameMinimumBlackDiffering more than ± 100 mV. from modal
value.
2 - Dark CurrentMaximumBlackOutput more than three times the modal value
(see Dark Current Signal above).
3 - Pixel VariationMid range66% Sat.Differing more than ±35mV from modal value.
Note: The mode of pixel values must be within
±70 mV of 66% of V
for all devices.
sat
y
Note: Gain is set to Minimum and Correction set to Linear for all tests; measurement of blemishes for
Test 3 is conducted under standard illumination (see above), set to produce average output of
66% saturation level.
The blemish specification is then defined as follows:
inar
Max. No. of BlemishesNotes
4Unconnected single pixels
1Of up to four connected pixels (2x2 max.)
NB, pixel blemishes may occur anywhere on the array.
m
Preli
cd34011-b.fm17/10/979
Page 10
VV5300 Sensor
System Clock Generation
VV5300 generates a system clock when a quartz crystal or ceramic resonator circuit is connected to the CLKI
and CLKO pins. The device can also be driven directly from an external clock source driving CLKI.
CLK
CLOCK
DIVISION
VV5300
CKIN
C1=C2=47pF
R1=1MΩ
R2=510Ω
X1= 14.318MHz (up to 60fps)
17.73MHz (up to 50fps)
For greater flexibility the input frequency can be divided by 2, 4, 8 or 16 to select the pixel clock frequency.
Two bits in the clock division register in the serial interface select the input clock frequency divisor. The table
below gives the different frame rates that can be selected, when CLKI = 14.318MHz, for each divisor. The
default clock divisor setting is a divide by 2. To achieve maximum frame rates data is converted at 4 bit
resolution.
C1
CKOUT
32 31
R1
R2
C2
X1
Camera Clock Source
Clock
Source
inar
VV5300
CMOS Driver
CKIN
y
CLK
CLOCK
DIVISION
CKOUT
3231
m
CLKI
(MHz)
14.318002179059.98default
14.31801489529.99
14.31810844815.01
14.31811162247.5
1.Approximate frame rate. Assumes 160 x 120 image format, parallel data output and 4 bit data
conversion
Preli
Clock Division (60Hz Video Mode)
Divisor
Pixel Freq.
(kHz)
Frame rate
(fps)
1
Comments
cd34011-b.fm17/10/9710
Page 11
VV5300 Sensor
Image Format
VV5300 has a single output image size, 160 x 120 pixel. The image size can be modified by asserting the
“enable borders” serial interface register bit, (Setup1, [001_0001
pixels. The default image format is 160 pixels by 120 lines.
Enable bordersImage size (column x row)Comment
0160 x 120default
1164 x 124
Image Format Selection
The diagram below shows the relationship between the default 160 x 120 pixel image and the extended 164
x 124 pixel format. A border, 2 pixels wide is enabled around the basic array.
164
]). The extended image size is 164 x 124
2
y
160
m
Output Image Dimensions
Preli
120
124
inar
cd34011-b.fm17/10/9711
Page 12
VV5300 Sensor
Frame Timing
The VV5300 frame rate depends upon:
(i)the frequency of the clock input (CLKI)
(ii) the ADC conversion accuracy
(ii)the internal clock divis or cho se n.
Users can set their own values for CLKI, the ADC conversion rate and also the clock divisor setting, subject
to achieving a frame rate up to 60 frames/sec.
The frame rate is determined in the following way:
An example is given with a clock input of 14.318MHz, 160 x120 image format, 8 bit ADC conversion rate and
a clock divisor of 4.
1.Determine clock input (CLKI) frequency - 14.318MHz
2. Pixel period = (Divisor x 8) / CLKI
y
Example: Pixel period= (4 x 8) / 14.318MHz= 2.235µs
3.Line period = (no. of active pixels + line overhead) * pixel period
The number of active pixels per line is either 160 or 164. The interline pixel period overhead (including the 4
border pixels that can be enabled to qualify extra video information) is mode dependent, 43 pixel periods for
60fps or 135 pixel periods for 50fps. Refer to figure * for more information.
Example:Line period = (160 + 43) x 2.235µs= 453.705µs
4.Frame period = (no. of active lines + frame overhead) * line period
For the purposes of calc ul ating th e effective frame rate the nu mbe r of ac tiv e l ine s is a ssumed to be fixed at
120. The frame overhead (which includes the 4 border lines that can be enabled to qualify extra video
information) has a constant value of 27 line periods. Refer to table * for more information.
Example:Frame period = (120 + 27) x 453.705µs= 66.694ms
Frame rate= 1 / frame period= 15 frames per second
Preli
m
inar
cd34011-b.fm17/10/9712
Page 13
VV5300 Sensor
Digital Data Output Modes
VV5300 provides several different output modes. The different data formats are selected via the appropriate
register in the serial interface, Setup0, [001_0000
selected via the serial interface, Setup1, [001_0001
Wire parallel output format then 2 consecutive pixel nibbles may be packed into a single output byte therefore
increasing the effective frame rate.
], bits 5 and 6. 8-bit or 4-bit pixel data conversion is also
2
]. If 4-bit pixel data conversion is selected as well as 8-
2
Setup
Bit 6
008-Wire Parallel
014-Wire Paralleldefault
10Serial
11 Serial UART
Setup
Bit 5
DescriptionComment
Data Output Modes
y
Frame Level Formatting
The frame level format for each mode is common and is given below. FST can be used for frame
synchronisation. The FST pulse is exactly one line period in length and the rising edge occurs just before the
status line start sequence (see line level formatting) is output.
FST
Line
BL STBK BK BL
Start / Status Line (ST)
Frame Start
Black Lines (BK)
BL BL BL BL
Blank Lines (BL)
BL BL
m
inar
BL
BL VL VL VL VLVL VL VL
BL
Visible Lines (VL)
VL
120 Visible Lines
FST
Line
VL BL
BL
BL BL
BL
BL
Frame End (FE)
Preli
BL FE BLST
BL BL
Frame Period = 147 Lines
BLBLBL BLBL BLBL
BL BL
Frame Format (160 x 120 mode)
FST
Line
BL STBK BK BL
Start / Status Line (ST)
FST
VL VL
Line
Black Lines (BK)
VL
Frame Start
BL BL
BL BL BL BL
Blank Lines (BL)
BL
BL
BL BL
Frame End (FE)
BL
Visible Lines (VL)
VL VL VL VL VLVL VL VL
VL
124 Visible Lines
BL FE BLST
BL BL
Frame Period = 147 Lines
BLBLBL BLBL BLBL
VL
BL BL
Frame Format (164 x 124 mode)
cd34011-b.fm17/10/9713
Page 14
VV5300 Sensor
Line Level Formatting
Each line type (black, blank, visible) has a specific format associated with it independent of the data output
format selected. Each line begins with a start sequence of FF
the line type. The next two bytes provide supplementary data (specifically the line number within the current
frame). Following this data are two guaranteed blank bytes (07
If the border lines/pixels have been enabled the next 2 bytes will be visible pixels otherwise they shall appear
as blank bytes. The next part of the line is reserved for the 160 visible pixels. The 4 bytes following the visible
pixels are formatted in the same way as the 4 bytes preceeding the 160 visible pixels. At the end of each line,
an end of line sequence is produced, (FF
(lines 11 to 134 if the border lines are enabled otherwise lines 13 to 132), the end of line sequence is
immediately followed by 2 bytes containing the mean values for the central 128 pixels. The first byte contains
the mean value for the first 64 pixels of the middle 128 pixels and the second byte contains the mean value
for the latter 64 pixels of the middle 128 pixels. The 128 pixels comprise the standard 120 visible pixels, the
4 border pixels and an extra 4 border pixels that are never enabled as visible pixels but are used for exposure
control and hence contribute to the mean pixel value for the line. If the line type is not visible then the two
bytes following the end of line sequence will contain 07
data output is always FF
Sensor status and configuration information is output during the frame start line, (line 0), each data byte is
separated by a blank value (07
information output during the status line reflects, if the sensor is operating in 8bit ADC mode, the first 64
locations in the serial interface register map. If the sensor is operating in 4 bit mode less data can be output
during the status line. All the serial interface registers are 8bit values therefore 2, 4bit pixel periods are
required to output a single serial interface location. Note that the serial interface data is only output during
the visible monochrome pixels of the status line. This allows for one quarter of the serial interface address
space to be output during any status line. It is possible to select the remaining registers in the serial interface
for output, (see serial interface register setup 2, bits 7:6).
The “end of frame” line, it is actually 2 lines prior to the status line will output the 4 exposure control bin
averages during the first 4, (or 8 if operating in 4bit modes), monochrome pixels. Again the data is separated
by mode dependent padding data.
.
H
) to avoid possible false line start conditions being generated. The
H
FFH 00H 80H). If the line is within the visible part of the frame,
H
m
FFH 00H followed by XYH where XYH indicates
H
for 8 bit modes, 01H01H for 4 bit modes).
H 07H
07H. For the remainder of the interline period the
H
y
inar
Preli
cd34011-b.fm17/10/9714
Page 15
VV5300 Sensor
Escape/Sync Sequence
8-wire output mode
4-wire output mode
Command
C
1
Nibble X
Supplementary Data
(i) Line Number (L11 MSB)
0
Nibble D
0
Nibble D
(Line Code)
C1C
2
0
H
L10L
11
3
L4L
5
1
Odd word parity
P
P
3
Nibble Y
L
9
Nibble D
L
3
Nibble D
8
2
2
P1P
L
7
L
1
Line CodeNibble XH [1 C2 C1 C0]Nibble YH [P3P2P1P0]
FF
F
F
H
0
H
L6PL
2
L0PL
0
FF
H
F
F
H
H
or (ii) If Line Code = End of Line then
Mean Pixel Value for first half of the line
Mean Pixel Value for second half of the line
00
H
0
H
H
M
M
7
N
N
7
H
0
6
6
H
M5M
N5N
X
XY
H
4
4
D3D2D1D
H
Y
D
H
M
M
3
y
N
N
2
3
3
2
N1N
D
2
M1M
0
D
D
0
1
0
0
inar
End of Line10002 (8H)00002 (0H)
Blank Line (BL)1001
Black line (BK)1010
Visible Line (VL)10112 (BH)0110
Start of Frame (SOF)1100
End of Frame (EOF)1101
Reserved11102 (EH)11002 (CH)
Reserved1111
Preli
)11012 (DH)
m
2 (9H
)1011
2 (AH
)01112 (7H)
2 (CH
)1010
2 (DH
)00012 (1H)
2 (FH
(BH)
2
(6H)
2
(AH)
2
Line Level Formatting
cd34011-b.fm17/10/9715
Page 16
VV5300 Sensor
FRAME
START
BLACK
BLANK
Line Start Sequence
FFHFF
H
Line Start
SD07HSD07
Line Start Sequence
FFHFF
H
Line Start
PVPVPVPV
Line Start Sequence
FFHFF
H
Line Start
07H07H07H07
C7HLN07H07
00
H
Line Type
ABHLN07H07
00
H
Line Type
9DHLN07H07
00
H
Line Type
Line Number
07
H
H
Line Number
07
H
Line Number
07H07
H
LN
07
LN
07
LN
H
H
H
07H07
07H07
07H07
07
H
H
FFHFFH00
H
Line End
07
H
H
FFHFFH00
H
Line End
07H07
H
FFHFFH00
H
Line End
Sensor Status Data
07
SD07HSD07HSD07HSD07HSD07
H
Line End Sequence
80
H
H
PVPVPVPVPVPVPVPVPVPV
07
H
Line End Sequence
80
H
H
07H07H07H07H07H07H07H07H07H07
H
Line End Sequence
80
H
H
07
07
H
H
Black Level Pixel Values (Nominally - 10H)
07
07
H
H
Blank Level (07H)
inar
07
07
H
H
Inter-Line Period
FF
FF
H
Inter-Line Period
FF
FF
H
Inter-Line Period
FF
FF
H
FF
H
H
FF
H
H
FF
H
H
m
FF
H
FF
H
y
FF
H
H
FF
H
FF
H
H
FF
H
SD07
H
Next Line Start
FF
FF
H
H
PVPV
Next Line Start
FF
FF
H
H
07H07
H
Next Line Start
FF
FF
H
H
00
H
00
H
00
H
VISIBLE
FRAME
END
Line Start Sequence
FFHFF
H
Line Start
PVPVPVPV
Line Start Sequence
FFHFF
H
Line Start
07H07H07H07
B6HLN07H07
00
H
Line Type
DAHLN07H07
00
H
Line Type
Line Number
07
H
Line Number
07H07
H
LN
07
H
07H07
07H07
H
FFHFFH00
H
PVPVPVPVPVPVPVPVPVPV
H
Line End Sequence
H
Preli
Line End
MN
LN
H
07H07
H
FFHFFH00
H
Line End
07
H
H
Line End Sequence
80
H
Line Coding
160 Visible Pixels
MN80
MN
H
Line Mean Values
Frame Mean Values
MNMN
07
H
07
07
H
H
H
Inter-Line Period
FF
FF
H
07
H
Inter-Line Period
FF
FF
H
Black = 10H - White = F0
FF
FF
H
H
MN07H07
07
H
FF
H
H
H
07H07
FF
H
FF
H
H
FF
H
H
PVPV
Next Line Start
FF
FF
H
H
07H07
H
Next Line Start
FF
FF
H
H
00
H
00
H
cd34011-b.fm17/10/9716
Page 17
VV5300 Sensor
8-Wire Parallel Mode
8-Wire parallel mode is selected when the appropriate bits are set via the serial interface.
When 8-bit conversion mode is selected the 8-bit pixel data is output on pins DATA[7:0]. The start of a frame
is indicated by a pulse on FST. The data is valid on the falling edge of the pixel sample clock fast QCK (QCK
or on each edge of the slow QCK (QCK
Line StartLine No.Line Type
).
S
F
)
DATA[7:0]
QCK
QCK
DATA[7:0]
QCK
QCK
FF
H
F
S
P117 P118 P119 P120
F
S
FF
FF
H
P1P2
B6HLN07H07
00
H
H
07
H
LN
07H07
07
H
H
07H07
H
Line End
FFHFFH00
P0
H
Line Mean
MN
H
H
MN80
P3P4P5
FF
FF
H
H
P6P7P8P9P10
FF
FF
H
y
FF
H
FF
H
8-Wire Parallel Mode (8-bit Pixel Data)
When 4-bit conversion mode is selected the 4-bit pixel data is output two bytes at a time on the DATA[7:0]
pins. The first pixel is mapped onto DATA[7:4] and the second pixel is output on DATA[3:0]. This effectively
doubles the pixel rate (and halves the frame period).
inar
m
Line StartLine No.Line Type
DATA[7:4]
DATA[3:0]
FHF
F
H
F
H
FHF
H
H
BHLN1
H
6HLN1
H
LN
P0LNP2P4P6P8P10 P12 P14 P16 P18 P200
1
H
H
1
P1
H
H
P3P5P7P9P11 P13 P15 P17 P19 P210
P22
P23
H
P24
P25
H
H
00
FF
QCK
F
QCK
DATA[7:4]
DATA[3:0]
QCK
QCK
S
P104 P106 P108
P102
P105 P107 P109
P103
F
S
Preli
H
H
Line Mean
MN8
MN
MN0
F
H
F
H
Line End
1
P110 P112 P114 P116F
P118
P119MNP111 P113 P115 P117F
1HFHFH0
H
1
1HFHFH0
H
H
H
H
H
8-Wire Parallel Mode (4-bit Pixel Data)
cd34011-b.fm17/10/9717
F
H
F
H
H
H
0
F
H
H
0
F
Page 18
VV5300 Sensor
4-Wire Parallel Mode
4-Wire parallel mode is selected when the appropriate bits are set via the serial interface. When 8-bit data
conversion mode is selected (CONV8 = 1) the 8-bit pixel data is output on pins DATA[7:4] in two 4-bit nibbles.
The start of a frame is indicated by a pulse on FST. A QCK sample edge is generated for each nibble.
Line StartLine No.Line Type
DATA[7:4]
QCK
QCK
DATA[7:4]
QCK
QCK
0
7
H
H
0
0
H
H
7
H
H
LNLN
0H7
FHF
F
H
F
S
F
S
H
FH0
F
H
H
0H7
P119P118P116 P117P115
BH6
0
H
0
H
H
LNLN0H7H0H7
0H7
H
FHFHF
H
H
H
Line End
F
H
0
H
8H0
7
H
H
y
P0
MN
MN
DATA[7:4]
QCK
QCK
MN
F
S
FHF
H
F
H
H
FHFHF
F
H
H
FHF
H
FH0
F
H
H
BH6
0
H
H
LNLN
MN F
inar
4-Wire Parallel Mode (8-bit Pixel Data)
When 4-bit data conversion mode is selected (CONV8 = 0) the 4-bit pixel data is output on pins DATA[7:4].
Line StartLine No.Line Type
DATA[7:4]
QCK
QCK
FHF
F
H
F
S
H
FH0
F
H
H
BH6
0
H
H
m
LNLN
LNLN1H1
1H1
H
P0P1P2P3
H
Preli
Line End
P119P118P117P116P115P114P113
DATA[7:4]
QCK
QCK
1H1
F
S
H
1H1
FHFHF
H
F
H
H
0
H
8H0
0
H
H
MN
MN
LNLN
P4
F
H
F
H
DATA[7:4]
QCK
QCK
F
S
FHF
F
H
FHF
H
F
H
H
FHFHF
F
H
H
FHF
H
FH0
F
H
H
BH6
0
H
H
LNLN
4-Wire Parallel Mode (4-bit Pixel Data)
cd34011-b.fm17/10/9718
LNLN
Page 19
VV5300 Sensor
Serial Mode
Serial mode is selected when the appropriate bits are set via the serial interface. When 8-bit data conversion
mode is selected the 8-bit pixel data is output on pin DATA[0] least significant bit first.
DATA[0]
QCK
DATA[0]
QCK
DATA[0]
QCK
QCK
Line Start
FF
FF
H
H
P116 P117 P118 P119
F
S
Line Type
FF
H
B6HLN07H07
00
H
07
H
0123
Line No.
LN
07
07H07
H
Pixel_0
FFHFFH00
H
5
4
H
07H07
Line End
6
P0P1P2P3P4P5P6P7P8P9
H
FF
MN
H
H
7
0123
MN80
FF
H
Pixel_1Pixel_2
FF
H
H
50123
4
6
FF
7
y
H
H
H
FF
FF
Serial Mode (8-bit Pixel Data)
When 4-bit data conversion mode is selected (CONV8 = 0) the 4-bit pixel data is output on pin DATA[0] least
significant bit first.
inar
P10
FF
00
H
H
DATA[0]
QCK
DATA[0]
QCK
DATA[0]
QCK
DATA[0]
QCK
QCK
F
F
H
F
S
F
H
H
P112P111
FHF
Line StartLine No.
F
H
F
H
F
0
H
H
0
P117 P118P116P114 P115P113
H
Line Type
B
6
H
H
P119
Preli
H
Pixel_0
F
H
FHFHF
Pixel_1Pixel_2
1
0
FHF
H
0321
LNLN
1
1
H
F
H
2
H
H
m
LNLN1H1
1H1
H
FHF
H
3
0321
H
FHFHF
FH0
F
H
P2P3
1
1
H
H
Line End
F
0
H
H
H
0
H
BH6
0
H
Pixel_3Pixel_4
2
1
P4
8H0
0
H
LNLN
H
021
3
P5P6
MN
H
LNLN
MN
3
Serial Mode (4-bit Pixel Data)
cd34011-b.fm17/10/9719
Page 20
VV5300 Sensor
Serial UART Mode
Serial UART mode is selected when the appropriate bits are set via the serial interface. When 8-bit data
conversion mode is selected the 8-bit pixel data is output on pin DATA[0] least significant bit first. Each pixel
is preceded by a start bit and followed by an additional data bit and two stop bits.
Line StartLine No.Line Type
DATA[0]
DATA[0]
FF
H
P116 P117 P118 P119
FF
FF
H
00
H
B6HLN07H07
H
07
H
07
H
LN
07H07
H
FFHFFH00
H
07H07
Line End
P0P1P2P3P4P5P6P7P 8P9
H
FF
MN80
MN
H
H
FF
H
FF
H
H
FF
H
FF
FF
H
H
P10
FF
00
H
H
DATA[0]
0123
Least Significant Bi t Fir s t
Start Bit
Pixel_0
4
6
5
7
Unused Data Bit
Two Stop Bits
0
1
Pixel_1
3
2567
4
y
Serial UART Mode (8-bit Pixel Data)
When 4-bit data conversion mode is selected the 4-bit pixel data is output two pixels at a time on pin DATA[0]
least significant bit first. Each pixel is preceded by a start bit and followed by an additional data bit and two
stop bits.
DATA[0]
DATA[0]
Line StartLine No.
F
H
F
F
H
H
P112P111
FH0
F
H
H
0
H
P117 P118P116P114 P115P113
Line Type
0H8
P119
H
m
LNLN
1
1
H
H
inar
LNLN1H1
1H1
H
H1H
FHFHF
H
1
P0P1
H
Line End
F
0
H
P2
P3P4
0HE
0
H
H
Preli
MN
MN
H
DATA[0]
DATA[0]
MN
FHF
H
Pixel_0Pixel_1
0123
Start Bit
Least Signif icant Bit First
F
H
H
0
FHFHF
2
1
Unused Data Bit
H
3
F
H
FHF
Two Stop Bits
H
FH0
F
H
H
Pixel_2
0
1
0H8
0
H
3
2123
0
H
LNLN
Pixel_3
MN F
Serial UART Mode (4-bit Pixel Data)
cd34011-b.fm17/10/9720
LNLN
Page 21
VV5300 Sensor
Qualifying the Output Data
Data is output from VV5300 in a continuous stream. By utilising signals, like FST, and key events, like the
start of a line or the end of line, the user can sample and display the image data. QCK is used to sample the
data, as described in the previous section. By default the falling edge of QCK will sample the data, however
it is possible to use both the rising and falling edges of a slow QCK QCK
Different sections of the frame can be enabled by QCK. The options, which are selected via setup register4
in the serial interface, are as follows, firstly the QCK can be disabled, therefore no data will be qualified. This
is the default option.
The second option is to have the QCK free running where all the data is qualified.
The third option is to only qualify the image data, which also includes the 2 black calibration monitor lines,
lines 1 and 2 in the frame. This option is further complicated in that extra black lines and the extra border
pixels/lines can be enabled giving the following 4 options:
to sample the data.
S
1. Black lines (1-2) plus image (160 pixels by 120 lines)
2. Black lines (1-8) plus image (160 pixels by 120 lines)
3. Black lines (1-2) plus image (164 pixels by 124 lines)
4. Black lines (1-8) plus image (164 pixels by 124 lines)
The final option is to qualify the embedded frame control sequences as well as the image data. These control
sequences are the 6 bytes at the start and at the end of each image line, where an image line is defined
above. The frame start or status line, image and control sequence pixels, will also be qualified during this
mode.
QCK Exceptions
The output data from VV5300 can be formatted in many ways, as detailed in an earlier section of this
document. Under certain operating conditions the relationship between QCK and the output data is
compromised.
It is vital that the phase relationship between the output data stream and the QCK must be maintained from
line to line, for example ensuring that, if enabled, the line code byte is always qualified by the same edge of
the QCK, clearly only applicable when considering slow QCK qualification. It is known that there are an odd
number of pixel periods in each line of the frame. If the slow QCK is selected then clearly two pixels are
qualified during each QCK cycle resulting in the following modes of operation requiring special care: 4 bit
ADC 8 wire output, 8 bit ADC 8 wire output and 4 bit ADC 4 wire output. During the interline period, when the
data bus is outputting data fixed at FF (8bit ADC) or F (4bit ADC), the phase of the QCK is toggled, this will
occur during every interline period. For the 8bit 8wire or 4bit 4 wire options this change is a simple inversion.
The 4bit 8wire option is not quite as straightforward. During the interline period the QCK signal is changed
from its former state to 1 of 3 other states. In addition 2 out of the 4 possible states are video timing mode
dependent.
Preli
m
inar
y
Please note that the number of nibbles/bytes qualified by the clocks described above, during the free running
QCK mode, will differ from the expected value, as follows:
The process of writing timed exposure, clock division or gain settings to VV5300 using the serial interface
requires special attention. These timed parameters can be written to the serial interface at any point within
the frame timing but will only be transferred from shadow registers to their active registers at a specific point
within the frame timing, see diagram below. Please note that writing immediate clock division or gain
parameters are treated as a “normal” serial interface write messages.
odd frame
flag
50 frames per second
QCK
F
Pixel qualification exceptions
QCK
S
Number of pixels qualified
60 frames per second
QCK
F
QCK
S
y
inar
old_exp
new_exp
m
old_clock_div
old_gain
Preli
Since the new external exposure, clock division or gain settings are written to shadow registers the user
continues to have full read/write access to the serial interface. A handshake system has been implemented
between the exposure controller and the serial interface to avoid the user writing, for example, a second
external timed gain value while the exposure controller has yet to transfer the first external timed gain value
from the shadow register to the active register. If an external timed gain message has been written a special
flag will be raised to indicate that it has yet to be transferred to the active register. This flag is available to the
user via reading the status 0 register in the serial interface. Until the flag is lowered the user knows that it is
not safe to write a further external gain value. Identical handshake protocols are used to implement timed
external exposure and cloc k div isi on w rites .
1 frame period
new_clock_div
new_gain
cd34011-b.fm17/10/9722
Page 23
VV5300 Sensor
Auto Black Calibration
Black calibration is used to remove voltage offsets that cause shifts in the black level of the video signal.
VV5300 is equipped with an automatic function that continually monitors the output black level and calibrates
if it has moved out of range. Black calibration can be split into two stages, monitor (1 cycle) and update (3
cycles). During the monitor phase the current black level is compared against two threshold values. If the
current value falls outside the threshold window then an update cycle is triggered. The update cycle can also
be triggered by a change in the gain applied to sensor core or via the serial interface.
Serial Interface
In order to be controlled and configured by its host, VV5300 can receive and transmit data via a two-wire
serial interface.
Serial Communication Protocol
The host must perform the role of a communications master and the camera acts as either a slave receiver
or transmitter.The communication from host to camera takes the form of 8-bit data with a maximum serial
clock frequency of up to 100kHz. Since the serial clock is generated by the host it determines the data
transfer rate. The bus address for VV5300 is 20
. Data transfer protocol on the bus is shown below.
H
y
Start condition
SDA
MSB
Read/Write bitAcknowledge from receiver
inar
SCL
S
2
1
7891
ACK
m
Data Transfer Protocol
Data format
A message contains at least two bytes preceded by a
start
followed by another message.
The first byte contains the device address byte which includes the data direction read/write bit. The device
address is 32
address byte indicates the direction of the message. An even address causes the addressed slave to receive
information from the master (write), an odd address indicates message read by the master.
Write, 3310 Read. The 5 msbs of the address byte are fixed as 0010_02. The lsb of the
10
Sensor acknowledges valid address
address[7:1]
S
0 0 1 0 0 0 0
Preli
[0]
A
start
condition and followed by either a
INDEX[6:0]INC
2
3 - 89
Acknowledge from slave
DATA[7:0]
A
stop
P
or
ACK
Stop condition
A
repeated
R
/W bit
Data Format
After the read/write bit is sampled, the data direction cannot be changed, until the read/write bit next message
is received. The next byte contains the location of the first data byte (also referred to as the
be up to 128 such locations. If the msb of the second byte is set the automatic increment feature of the
address index is selected.
cd34011-b.fm17/10/9723
DATA[7:0]
A
P
index
).There may
Page 24
VV5300 Sensor
Message interpr e tation
All serial interface communications with the sensor must begin with a
followed by a valid address byte then further communications can take place. The sensor will acknowledge
the receipt of a valid address by driving SDA low. The state of the read/write bit (lsb of the address byte) is
stored and the next byte of data can be interpreted.
During a write sequence the second byte received is an address index and is used to point to one of the
internal registers. The msbit of the following byte is the
serial interface will automatically increment the index address by one location after each slave acknowledge.
The master can therefore send data bytes continuously to the slave until the slave fails to provide an
acknowledge or the master terminates the write communication with a
,
(Sr)
start
data bytes.
As data is received by the slave it is written bit by bit to a serial/parallel register. After each data byte has
been received by the slave, an acknowledge is generated, the data is then stored in the internal register
addressed by the current index.
During a read message, the current index is read out in the byte following the device address byte. The next
byte read from the slave device are the contents of the register addressed by the current index. The contents
of this register are then parallel loaded into the serial/parallel register and clocked out of the device by
At the end of each byte, in both read and write message sequences, an acknowledge is issued by the
receiving device. Although VV5300 is always considered to be a slave device, it acts as a transmitter when
the bus master requests a read from the sensor.
. If the auto increment feature is used the master does
index auto increment
start
condition. If the
flag. If this flag is set then the
stop
condition or sends a
not
have to send indexes to accompany the
start
condition is
repeated
y
scl.
At the end of a sequence of incremental reads or writes, the terminal index value in the register will be one
greater
from the internal registers.
A message can only be terminated by the bus master, either by issuing a stop condition, a repeated start
condition or by a negative acknowledge after reading a complete byte during a read operation.
The programmers model
There are 128, 8-bit registers within the camera, accessible by the user via the serial interface. They are
grouped according to function with each group occupying a 16-byte page of the location address space.
There are eight such groups, The primary categories are given below:
the last location read from or written to. A subsequent read will use this index to begin retrieving data
inar
m
• Setup registers with bit significant funct ions including status (read only) bits
Preli
• Exposure parameters that influence output i mage brightness.
• System functions and test bit significant registers.
Any internal register that can be written to can also be read from.
cd34011-b.fm17/10/9724
Page 25
VV5300 Sensor
IndexNameR/WDefaultComments
000_0000RO1100 00002 (C0H)
000_0001RO0001 0010
000_0010status0RO0 000 100 0
000_0011unused000_0100line_countROCurrent line counter value
000_0101leftavROAverage value of pixels in the first
Status
000_0110rghtavROAverage value of pixels in the second
000_0111frame_avROAverage value of pixels in a frame.
000_1000bin1ROPartial frame average - bin1
000_1001bin2ROPartial frame average - bin2
000_1010bin3ROPartial frame average - bin3
000_1011bin4ROPartial fra me aver age - bin 4
000_11xxunus ed001_0000setup0R/W0010_01112 (27H)Configure the digital logic
001_0001setup1R/W0111_0000
001_0010setup2R/W0001_1111
001_0011setup3R/W0000_1111
001_0100setup4R/W0000_0000
111_0011xfavR/W1000_00002(80H)External frame average
111_0101dcthR/W1000_0000
111_1001unused
111_1010unused
System
111_1011unused
111_11xxunused
Preli
m
(12H)
2
(08H)System status information
2
half of the current line.
half of the current line.
(70H)Configure the digital logic
2
(1FH)Pixel counter reset value
2
(0FH)Exposure control modes
2
(00H)FST/QCK options
2
inar
(00H)Fine exposure initially zero
2
(70H)Coarse exposure
2
(00H)Gain value
2
(00H)Clock division
2
(07H)Maximum allowable gain
2
(55H)Lower exposure control threshold.
2
(64H)Centre exposure control threshold.
2
(73H)Upper exposure control threshold.
2
(80H)Digital comparator threshold
2
Reserved
y
The programmers model
A detailed description of each register follows. The address indexes are shown as binary in brackets.
cd34011-b.fm17/10/9725
Page 26
VV5300 Sensor
Status 0 [000_00102]
The loading of certain system parameters is timed to avoid disturbing the video signal part way through a
frame. Bits 0-2 can be polled to check that a value written to either the exposure, gain or clock division
registers has been consumed or not. Bit 3 is essentially an internal flag differentiating between consecutive
frames.
BitFunctionDefaultComment
0Exposure value update pending0New exposure setting sent but not yet con-
sumed by the exposure controller
1Clock division value update
pending
2Gain value update pending0New gain value sent but no t yet con sumed by
3Odd/even frame0The flag will toggle state on alternate frames
4Black Calibration fail flag0If the black calibration algorithm returns very
7:5Unused0
0New clock division setting sent but not yet
consumed by the exposure controller
the exposure controller
poor black level s - out with bo th t he calib ratio n
and monitor windows then this f lag will be s et
and it will stay set until the next successful calibration is complete
y
Status 0 [000_00102]
Line_count [000_01002]
inar
BitsFunctionDefaultComment
7:0Line count0000_00002Displays current line count
Line_count [000_01002]
The video timing logic is controlled by the pixel counter and the line counter. To reduce the level of digital
switching noise these counters implement a gray count sequence, where only a single counter register can
change state in a clock period. However the gray count sequence is user unfriendly,e.q. 248,232,233,
235,234. A binary version of the line count is generated internally, realising a 0,1,2,3,4..... sequence, and it
is this count sequence that is read by the serial interface and hence made available to the sensor user.
Line_avg 0 [000_01012] & Line_avg 1 [000_01102]
The exposure controller accumulates the pixel output values. On a line by line basis the accumulation is
performed in two stages. The qualified pixels in the left half of the video line are accumulated and then stored
in a latch. The process is then repeated during the right half of the video line. During the interline line period
(up until the latch that stores the value for the left half of the line is updated during the next line) the latches
will present valid average 8-bit pixel values for both halves of the line.
Preli
m
BitsFunctionDefaultComment
7:0Line average 0Average pixel value for first half of current line.
Line_avg 0 [000_01012]
BitsFunctionDefaultComment
7:0Line average0Average pixel value for second half of current line.
Line_avg 1 [000_01102]
cd34011-b.fm17/10/9726
Page 27
VV5300 Sensor
Frame_avg [000_01112]
The average pixel values stored in latch es halfway through and at the end of each act ive video line
are ultimately stored in bins that will maintain a frame sum of the pixel values. At the end of the
frame the values stored in these bins are used t o determine the overall pixel average for t he whole
frame.
BitsFunctionDefaultComment
7:0Frame average0Pixel average for previous frame
Frame_avg [000_01112]
Bin1_avg [000_10002]
BitsFunctionDefaultComment
7:0Bin1 average0Pixel average for current line
Bin1_avg [000_10002]
Bin2_avg [000_10012]
BitsFunctionDefaultComment
7:0Bin2 average0Pixel average for current line
Bin2_avg [000_10012]
inar
m
Bin3_avg [000_10102]
BitsFunctionDefaultComment
7:0Bin3 average0Pixel average for current line
Bin3_avg [000_10102]
Preli
Bin4_avg [000_10112]
y
BitsFunctionDefaultComment
7:0Bin4 average0Pixel average for current line
Bin4_avg [000_10112]
cd34011-b.fm17/10/9727
Page 28
VV5300 Sensor
Setup 0 [001_00002]
Setup registers 0,1,2,3 and 4 are used to alter the operating parameters of the sensor. All of these registers
can be written to and read from.
Setup 0 register controls some fundamental exposure and output format parameters. Defaults are shown in
Bold.
BitFunctionDefaultComment
0Automatic exposure control.
Off/On
1Clamp fine exposure
Off/On
2Automatic gain control.
Off/On
3Enable immediate gain
update.
Off/On
4Enable immediate clock divi-
sion update.
Off/On
6:5Data format select.0100 - 8 wire parallel output
73/4 crystal clock
Off/On
1E nables or disables auto matic exposure control.
Current exposure value is frozen when disabled.
1If this bit is set
exposure has e xceeded the cl amp thresho ld, 16,
then the fine exposure will be clamped to 0.
1E nables or disables automa tic gain control. Cur-
rent gain value is frozen when disabled.
0Allow manual change to gain to be applied imme-
diately.
0Allow manual change to clock division to be
applied immediately.
01 - 4 wire parallel output
10 - 2 wire serial output
11 - 1 wire serial output
0Achieves clock division by 3 rather than 4.
Setup0 [001_00002]
m
inar
and
aec is enabled
y
and
the coarse
Setup 1 [001_00012]
Setup 1 register controls registers that are less likely to be modified on a regular basis. The user should note
that the border pixels/lines can be disabled/enabled independently from the enabling/disabling of the custom
analogue horizontal shift register.
BitFunctionDefaultComment
0Enable additional black lines (3-8)
Off/On
1Enable border pixels
Off/On
2Enable horizontal shuffle mode.
Off/On
cd34011-b.fm17/10/9728
Preli
0If enabled extra black lines are visible at
device output
0Extends qualified image size to 164 x 124.
Default image size is 160 x 120
0The contents of the horizontal shift register
are shuffled so tha t all the even colu mns then
all the odd columns are read out.
Setup1 [001_00012]
Page 29
VV5300 Sensor
BitFunctionDefaultComment
3Enable samp le mod e
Off/On
4Status line data output enable.
Off/On
58-bit or 4-bit ADC select1The analogue output ADC can be configured
650fps timing/60fps timing1The sensor will implement 60Hz like line
7External frame average
Off/On
Setup1 [001_00012]
0If enable d the data bus will continuously out-
put a “96
mode a user can deter mine the best point at
which to sample the data.
1Enables the output of serial interface status
information on the data bus. By default the
bottom 64 locations from the serial interface
will be output.
to convert to 4-bit or 8-bit resolution.
timing by default giving reduced flicker
operation with 60Hz s ou rce frequencies. If the
supply frequency is 50Hz then 50Hz like
timing should be selected.
0Normally the accumulator arithmetic logic
calculates the frame average of the pixel
samples. However if this bit is enabled then
the user may specify a frame average.
” pattern. WIth the sensor in this
H
y
inar
Setup 2 [001_00102]
In many systems VV5300 will be continuously synchronised. During this synchronisation the video timing is
reset to a fixed point within the frame timing. The counter reset value is definable.
BitFunctionDefaultComment
5:0Pixel counter reset value.011111
6Status information output option.
Off/On
7Status information output option.
Off/On
Bit 7Bit 6
0000
Preli
Setup 2 [001_00102]
Register Address Range
m
During synchronisation the pixel counter is
2
reset to the defined value.
0Selects which system parameters are output
on status line. See table below.
0Selects which system parameters are output
on status line. See table below.
Register Address Range
8-bit modes
- 3F
H
H
4-bit modes
00H - 1F
H
0140
10-40
Status line information options
cd34011-b.fm17/10/9729
- 7F
H
H
20H - 3F
- 5F
H
H
H
Page 30
VV5300 Sensor
Bit 7Bit 6
11-60
Setup 3 [001_00112]
BitFunctionDefaultComment
3:0Exposure control mode
select.
4Autoload control0This bit controls the autoload feature
6:5Exposure step size01Selects exposure step size. 1/8 for fast but
7Unused0
Note1: The state of this pin can affect the autoload function in a number of ways.
1. If the autoload bit is high continuously and the autoload pin is also high then an autoload will not take place.
2. If the autoload bit is initially high and is then forced low then an autoload will take place regardless of the state of the
autoload pin.
3. If the au toload pin is initially hi gh and is then forced low an autoload will take place re gardless of t he state of th e
autoload bit.
4. A low to high transiti on on e ither the a utoload bit or t he auto load p in while VV5300 is runn ing w ill have no ef fec t on the
autoload function.
Register Address Range
8-bit modes
Status line information options
1111
Setup 3 [001_00112]
The average value for the frame that the
2
exposure controller use s can be calculated in
a number of different ways. See table below.
jerky convergence to 1/64 for slow but smooth
convergence. Default 1/16.
The data output on the serial wire or the 4 wire/8 wire busses can be qualified, if required, by an internally
fast
and a
slow
generated clock signal, QCK. This clock can be configured variously. Both a
generated. If the former is selected then the falling edge of the clock will qualify the current data nibble/byte,
i.e. if the sensor is operating in 4 bit-4 wire mode then any true 8 bit data (e.g. line type code) will be qualified
slow
on a nibble basis. If the
current data nibble/byte.
QCK option is preferred then both edges of this clock are used to qualify the
inar
QCK can be
The QCK function has a dedicated pin assigned, however by selecting the appropriate bits the FST pin can
also output QCK data. By default QCK is disabled. However by writing the appropriate message, QCK can
be forced to free run, qualify the embedded coding sequences and the visible data or the visible data only.
FST can also be enabled or disabled or alternatively the FST pin can output a timing signal to synchronise
several VV5300 sensors or finally the FST pin can output the state of the custom analogue block successive
approximation ADC output comparator.
BitFunctionDefaultMode
1:0FST/QCK pin mode.00
3:2QCK mode select00
5:4unused00
7:6FST mode select00
Preli
2
2
2
2
Setup 4 [001_01002]
m
FST pinQCK pin
00
01
10
11
00
01
10
11
00
01
10
11
Normal FST
2
Normal FST
2
QCK
2
Inverted QCK
2
disable
2
free running
2
validate control and image data
2
validate image data only
2
disable FST
2
enable FST
2
synchronisation pulse output (SNO)
2
output ADC comparator output, CPO
2
QCK
S
QCK
F
F
F
QCK
QCK
S
F
cd34011-b.fm17/10/9731
Page 32
VV5300 Sensor
Exposure Control Registers [010_00012] - [010_10012]
There is a set of parameters that control the time that the sensor pixels are exposed. The parameters are as
follows: fine and coarse exposure time, clock division control and finally gain control. The latter parameter
does not affect the integration period rather it amplifies the video signal at the output stage of the sensor core.
An internal automatic algorithm will, if enabled, continually monitor the pixel output and then, if required, use
this data to correct the current exposure.
Manually changing the divisor applied to the incoming crystal clock can alter the effective integration of the
sensor. By slowing the internal clock down the integration period can be increased, i.e. halving the pixel clock
frequency will double the integration period.
If the user wishes to use the automatic exposure algorithm, the automatic exposure control (controlling
coarse
and
gain manually via the serial interface even if the exposure is adjusted automatically.
If a user wishes to write an external value to one of the automatic exposure algorithm registers then it is
advised that the automatic control for that register be disabled prior to using the serial interface to write the
external value.
exposure) must be enabled. Additional gain control is optional. It is also possible to change the
fine
Note:
The external exposure (coarse, fine or gain) values do not take effect immediately. Data from the serial
interface is read by the exposure algorithm at the start of a video frame. If the user reads an exposure value
via the serial interface then the value reported will be the data as yet unconsumed by the exposure algorithm,
because the serial interface logic locally stores all the data written to the sensor.
Between writing the exposure data and the point at which the data is consumed by the exposure algorithm,
bit 0 of the status register is set. The gain value is updated a frame later than the coarse and fine exposure
parameters. The gain is applied directly at the video output stage and does not require the long set up time
of the coarse and fine exposure settings.
The automatic exposure algorithm uses a set of exposure threshold settings. These thresholds may also be
modified by the user to alter the algorithm’s performance. The exposure algorithm uses these thresholds in
a histogram. The three thresholds divide the histogram into 4 regions, very overexposed, overexposed,
underexposed and very underexposed. The pixel data received from the sensor core is compared against
the thresholds to determine the accuracy of the current exposure setting. A series of flags are set to describe
the outcome of the histogram comparison and the new exposure setting can then be derived.
Each exposure parameter is subject to a maximum setting. The fine exposure setting can be clamped to a
fixed value regardless of the decision made by the automatic algorithm. The clamping will occur if the coarse
exposure setting exceeds a predetermined value and the clamping has been enabled via the serial interface.
BitFunctionDefaultComm ent
7:0Fine exposure value0000_00002 (00H)maximum fine (50Hz mode) = FF
Preli
Fine Exposure Value [010_00012]
m
inar
maximum fine (60Hz mode) = A8
y
H
H
BitFunctionDefaultComment
7:0Coarse exposure value0111_00002 (70H)maximum coarse (50Hz and 60Hz modes)
91
H
Coarse Exposure Value [010_00112]
cd34011-b.fm17/10/9732
Page 33
VV5300 Sensor
BitFunctionDefaultComment
2:0Gain value08 possible gain states can be written via the
serial interface
Gain Value [010_01002]
All 8 binary codes can be written to the core via the serial interface. Only the 4 thermometer codes
000,001,011 and 1 11 are selected by the automatic exposure algorithm. The 4 other codes are however still
valid and will be evaluated as detailed in the table below. It is clear, from the non-linear relationship between
the binary code and the actual gain applied at the analogue output stage, that care should be taken when
using non thermometer code gain settings. If the user writes a gain code of 110 (real gain = 1.600) and then
enables automatic gain control and the controller then decided to reduce the gain, the new gain value would
be 011 (real gain = 4.000) i.e. the effective applied gain at the analogue output stage has actually been
increased.
a small number of other registers in the design. The remaining digital logic and the analogue circuitry, use
internally generated clocks, namely the pixel clock and the faster ADC clocks. These clocks are all slower
versions of the crystal clock. The ADC clocks may be up to half the crystal frequency, but can be further
divided by factors of 2, 4 or 8. The pixel clock is in turn slower than the ADC clock. If the ADC is operating in
4 bit mode then the pixel clock is 1/4 the frequency of the ADC clock, otherwise the pixel clock will be 1/8 the
frequency of the ADC clock.
input crystal clock is used by the clock generator circuitry, elements of the serial interface and
BitFunctionDefaultComment
2:0Gain limit7
Gain Limit[010_01102]
cd34011-b.fm17/10/9733
Page 34
VV5300 Sensor
BitFunctionDefaultComment
7:0Exposure lower threshold85
Exposure Lower Threshold [010_01112]
BitFunctionDefaultComment
7:0Exposure centre threshold100
Exposure Centre Threshold [010_10002]
BitFunctionDefaultComment
7:0Exposure higher threshold115
Exposure Higher Threshold [010_10012]
Frame Average [111_00112]
The exposure controller normally compiles a frame average from the data received from the core. A complete
frame period is required to produce a frame average. This is clearly unacceptable for simulation and test
purposes. It is possible to manually force a frame average via the serial interface. This feature together with
the ability to curtail the frame duration will allow the behaviour of the exposure controller to be examined in
a realistic simulation period.
inar
y
m
This register is read/write compatible
BitFunctionDefaultComment
7:0Frame average0Allow a synthetic frame average to be
written to and used by the exposure
controller
Preli
Frame Average [111_00112]
Digital Comparator Threshold [111_01012]
The ADC output from the CAB can be digitally compared against a digital threshold. This threshold is fully
programmable via the serial interface register. If the current ADC output is greater than or equal to the
programmed threshold then the modified ADC output will be forced to the full scale output. The full scale
value is mode dependent:- 224 for 8 bit ADC conversion or 14 for 4 bit conversion. If the current ADC output
is less than the threshold then the modified ADC output will be forced to minimum video. The minimum video
setting (the black level) is again mode dependent:- 16 for 8 bit ADC conversion or 1 for 4 bit conversion.
If this feature is not enabled, (tms[7] = 0), then the ADC output will pass unaltered.
As indicated above the ADC can convert to either 4 bit or 8 bit accuracy. When operating in a 4-bit mode the
threshold value should be packed to the 4 most significant bits of the register i.e. if the required threshold
cd34011-b.fm17/10/9734
Page 35
VV5300 Sensor
value is 10 then 160 should be written to the threshold register.
BitFunctionDefaultComment
[7:0]Threshold for digital comparator128The default has been set at the mid-
Digital Comparator Threshold [111_01012]
range video setting for 8 bit ADC
conversion. The user must reprogram the register if the test is run
when the ADC is converting to 4 bit
accuracy.
y
m
Preli
inar
cd34011-b.fm17/10/9735
Page 36
VV5300 Sensor
Types of messages
This section gives guidelines on the basic operations to read data from and write data to the serial interface.
The serial interface supports variable length messages. A message may contain no data bytes, one data byte
or many data bytes. This data can be written to or read from common or different locations within the sensor.
The range of instructions available are detailed below.
• No data byte, only sets the index for a subsequent read message.
• Single location multiple data write or read for monitoring for real time control
• Multiple location, multiple data read or write for fast information transfers.
Examples of these operations are given below. A full description of the internal registers is given in the
previous section
For all examples the slave address used is 0010000
corresponds to applying logical zero to both the
Single location, single data write.
When a random value is written to the sensor, the message will look like this:
=3210 for writing and 00100012=3310 for reading. This
sab0
2
and
sab1
inputs.
y
inar
001000000
AAA
010_0000
0101_0101
m
SP
In this example, the
w bit is set to zero for writing and the
writing the value. The location is preserved and may be used by a subsequent read.
Single location, single data read.
A read message always contains the index used to get the first byte.
coarse
(index = 01000002=3210) exposure value has been written as 010101012. The r/
inc
bit is set to zero to disable automatic increment of the index after
Preli
00100001
SP
This example shows a
terminated with a negative acknowledge (A
to issue a stop condition at any other time during a read message. This is because if the data sent by the
slave is all zeros, the
cd34011-b.fm17/10/9736
coarse
sda
(index = 3210) value of 0101_01012 been read. Note that the read message is
line cannot rise, which is part of the stop condition.
AA
010_00000101_0101
0
) from the master: it is not guaranteed that the master will be able
A
Page 37
VV5300 Sensor
No data write followed by same location read.
When a location is to be read, but the value of the stored index is not known, a write message with no data
byte must be written first, specifying the index. The read message then completes the message sequence.
To avoid relinquishing the serial to bus to another master a repeated start condition is asserted between the
gain
write and read messages. In this example, the
No data writeRead index and data
value (index = 3610) is read as 1510:
10
16
A
A
0
Write
0
36
setup1
32
S
As mentioned in the previous example, the read message is terminated with a negative acknowledge (A
the master.
Same location multiple data write.
It may be desirable to write a succession of data to a common location. This is useful when the status of a
bit,(e.g. requesting a new black calibration), must be toggled.
The message sequence indexes
ABC
on and then finally off again, leaving it in the default state.
S
A
10
register and initially turns
setup1
10
A
2
33
SrA
Turn off ABC
10
0
10
m
inar
A
36
0
10
15
A
10
y
ABC
off. The next two data bytes then turn
Toggle “Force Black Cal.”.
128
10
A20
0
10
P
A
) from
A
P
Same location multiple data read
When an exposure related value (
beginning of the next video frame, (remember that the application of the
other exposure parameters). To signal the consumption of the written value, a flag is set when any of the
exposure or gain registers are written and is reset at the start of the next frame. This flag appears in
register and may be monitored by the bus master. To speed up reading from this location, the sensor will
repeatedly transmit the current value of the register, as long as the master acknowledges each byte read.
fine
In the next example, a
then constantly read until the master terminates the read message.
cd34011-b.fm17/10/9737
exposure value of 0 is written, the status register is addressed (no data byte) and
coarse, fine, acc
or
gain
) is written, it takes effect on the output at the
Preli
gain
value is a frame later than the
status0
Page 38
VV5300 Sensor
Write
fine
with zero
Address the status0 reg.
A
S
Sr
Multiple location write
If the automatic increment bit is set, msb of the first data byte following the byte that contains the slave device
address, then it is possible to write data bytes to many adjacent internal registers. A write to the black
calibration parameters with their default values is shown in the following example.
.
21
S
16
16
20
A
16
22
10
0
10
A
1
A
0
Read continuously...
A
0
Incremental write
96
10
0A
1
1
A
A
...until flag res e t
A
8
16
Sr
20
1
0
16
A20
A
0
A
P
10
1
A
A
y
A
32
16
A
P
inar
Multiple location read
In the same manner, multiple locations can be read with a single read message. In this example the index is
written first, to ensure the exposure related registers are addressed and then all seven are read
No data write
10
A
32
1Sr
Preli
gain
32
S
fine
Note that a stop condition is not required after the negative acknowledge from the master.
10
A
gn_lim
m
Incremental read
33
Incremental read
AAA
10
T1
A
1
A
32
Tc
10
coarse
A
T2
A
A
A
P
cd34011-b.fm17/10/9738
Page 39
VV5300 Sensor
Serial Interface Autoload
VVL_300 can be configured automatically at power-up with any user defined set of system parameters using
the serial interface auto-load feature. An external E
2
PROM is used to store the configuration data.
Both shortly after power up and in response to an off-sensor ‘soft’ reset on SIN, the auto-loader will
interrogate the E
2
If no E
changed from their existing values.
If, however, an E
starting from location zero in the E
The first byte is a register header code which determines the destination of the following data byte. This
simple index & data format allows any sub-set of the VVL_300 registers map to be configured at power-up
and it allows them to be stored in the E
If the auto-loader detects the ‘end-of-PROM-contents’ code 00h, it will then issue a STOP condition on the
serial interface, raise a flag to indicate that the parameters have been loaded and close down.
device is detected the auto-loader will shut-down and the serial interface register values will not be
2
PROM to determine whether or not valid data is present.
2
device is detected, the auto-loader will begin to load data into the parameter registers from
2
.
2
in any order.
y
HeaderROM contents
00hROM empty or end of data
xxh
Parameter header into which the following byte is to be written.
inar
E2PROM header bytes
m
Preli
cd34011-b.fm17/10/9739
Page 40
VV5300 Sensor
Serial Interface Timing
stopstartstopstart
SDA
tr
SCL
thd;sta
all values r eferred to the minimum input level (high) = 3.5V, and maximum input level (low) = 1.5V
Serial Interface Timing Characteristics
ParameterSymbolMin.Max.Unit
SCL clock frequencyfscl0***kHz
thightftsu;datthd;dattsu;statsu;sto
...
...
y
inar
Bus free time between a
stop and a start
tbuf***-us
thd;statlowtbuf
Hold time for a repeated
start
LOW period of SCLtlow***-us
HIGH period of SCLthigh***-us
Set-up time for a repeated
start
Data hold timethd;dat***-us
Data Set-up timetsu; dat***-ns
Rise time of SCL, SDAtr-***ns
Fall time of SCL, SDAtf-***ns
Set-up time for a stoptsu;sto***-us
Capacitive load of each
VLSI Vision Ltd. reserves the right to make changes t o its products and specifications at any time. Infor mation fur nished by VI SION is beli eve d to be ac curate, but no responsibility is assumed by VISION for the use of said in formation, nor any infringements of patents or of any other third party rights which
may result from said use. No license is granted by implication or otherwise
under any patent or patent rights of any VISION group company.
USA Western Office
1190 Saratoga Ave.,
Suite 180,
SAN JOSE
CA 95129 USA
Tel: +1 408 556 1550
Fax: +1 408 556 1564