The STV0676 co-processor combined with ST
CMOS image sensors offers highly integrated
imaging products which deliver USB 1.1, RGBpreview, YCrCb or M-JPEG digital video data at up
to 30 frames per second.
The STV0676 interfaces to CIF (352 x 288) or VGA
(640 x 480) image sensor and performs:
- pixel defect correction,
- auto exposure, auto gain,
- auto white balance, anti-aliasing, anti-flicker,
- colour interpolation, colour balance,
- gamma correction,
- M-JPEG compression.
STV0676 chipsets are supported by a fully- featured
USB driver. This provides a wide range of user
definable settings for optimum camera setup and
operation. Isochronous data transfer over USB
guarantees video quality at all times, irrespective of
the number of other peripherals.
Low power consumption, highly integrated designs
and simple support circuitry enable OEMs to design
low cost, low power, camera products for high
volume consumer market places.
KEY FEATURES
■ Real-time video - up to 30fps VGA
■ USB 1.1 compliant
■ Motion-JPEG compression
■ Isochronous USB data transfer
■ Direct Show driver support
■ Programmable vendor ID
■ RGB-preview, YCrCb or M-JPEG video output
■ Automatic exposure, gain and wh ite balance
APPLICATIONS
USB camera:
- Biometric identification, toys and games
Embedded applications support:
- PDA, notebook PC, mobile phone
- Set top box, and security applications
STMicroelectronics offers camera manufacturers
rapid-to-market camera products supported by
comprehensive reference designs, software drivers
and technical backup.
1.201/02/01Micropor t description up dated
A07/03/01Details of existing STV0672 register map removed
Added reference to VV6411 sensor
B10/10/01Document reformatted with ST template
C implementation
2
C Register map
STV0676
C13/08/02Change from a chipset datasheet to co-processor only.
Update of driver reference and orderi ng details.
4/21Revision C
Page 5
STV0676Overview
1Overview
1.1STV0676 co-processor general description
The STV0676 is a digital video processor requiring no external RAM and a minimum of passive
support components to provide a complete USB camera. STV0676 accepts raw digital video data
from a ST VGA or CIF format CMOS sensor and is capab le of tr ansfer ring the resulting JPEG data
to a host PC over USB at rates up to 30 frames per second VGA.
The internal STV0676 architecture consists of a number of separate functional blocks:
● Video processor (VP)
● Video compressor (VC)
● USB control block
● General purpose controller
The VP controls the sensor and processes the raw RGB pixel data into YCbCr images.
This YCbCr data is compressed by the VC.
The USB control block transfers the compressed data to the host PC.
1.2Video processor (VP)
1.2.1Sensor interface
The VP interfaces directly to the image sensor. The sensor interface comprises:
● 5-wire data bus SDATA[4:0] for receiving both video data and embedded timing references,
● 2-wire serial control interface (SSDA, SSCL),
● sensor clock SCLK
● reset circuitry
● sensor suspend control
5/21
Page 6
OverviewSTV0676
Figure 1: Block diagram of STV0676 video processor module
Video Compression (VC) EngineVideo Processor
SDATA[4:0]
SSCL
Compressed Data
Control +
RAM
USB core /glue
logic and
command FIFO’s
10
Clocks
+ PLL
USB port
D+
D-
Digiport
CIF/VGA
Sensor
SSDA
RESET_N
SCLK
SUSPEND
General purpose
housekeeper functions
including AEC, AGC and
AWB
SDA
SCL
RESET
Stream
FIFOs
ROM
8052 Core
STV0676
GPIO/mode
select
10
Ext.
Interrupts
I2C Interface
12MHz
XTAL
1.2.2Video processor functions
STV0676 provides a master clock SCLK to the camera module. Each 10-bit pixel value generated
by the sensor is transmitted across the 5 wire databus SDATA[4:0] as a pair of sequential 5-bit
nibbles, most significant nibble first . Codes representi ng the start and end fra mes and the start and
end of lines are embedded withi n the video d ata stream to all ow the video processor to synchronise
with the video data stream.
The video processing engine performs the following functions on incoming data:
● full colour restoration at each pixel site from Bayer-patterned input data,
● matrixing/gain on each colour channel for colour purity,
● peaking for image clarity,
● gamma correction,
● colour space conversion from raw RGB to YCbCr[4:2:2].
The 2-wire sensor serial interface (SSDA and SSCL) provides control of sensor configuration.
Note:the MSBit SDATA5 of the databus is unused in the current application but it will support future
sensors where a 12bit ADC architecture may be used.
6/21Revision C
Page 7
STV0676Overview
1.3Auto exposure and gain control
The STV0676 automatically controls the sensor exposure, which is evaluated (and, where
necessary modified) once per frame, where a frame consists of 2 video fields. The video fields are
identical in length, that is, they do not contain any of the half line detail of the analogue video
standards like CCIR or NTSC. T wo fields per frame are requir ed by the internal sensor video timi ng
model. Integration time, sensor analogue gain and STV0676 digital gain are all used to control the
overall exposure. The STV0676 exposure al gorithm uses an asymptotic ap proach in calculating th e
change required in the present exposure value to approach the requested exposure target.
1.4Defect correction
STV0676 automatically detects and corrects pixel defects without the need for any additional
components or sensor calibration procedures. This greatly simplifies camera assembly and test
when compared with previous EEPROM-based defect correction schemes. The pixel defect
correction scheme ensures that the STV0676 + ST CMOS sensor appears as a ‘defect free’
chipset.
1.5Video compression (VC) engine
The video compression engine performs 3 main functions:
● up scaling of input YCbCr 4:2:2 video stream from the VP (typic ally to scale from QVGA to CIF
image formats),
● compression and encoding of YCbCr stream into Motion-JPEG (M-JPEG) format,
● USB bandwidth monitoring.
The data stream from the VP can be up to VGA size. The scaler in VC can downsize this image.
Once scaled the video stream is then converted into M-JPEG format. M-JPEG simply treats video
as a series of JPEG still images. The conversion is realised via a sequential DCT (discrete cosine
transform) with Huffman encoding. After transfer over USB, the M-JPEG stream is decoded in the
device driver running on the host.
The VC module is capable of compression ratios of up to 100:1 although this is scene-dependent.
Image framerate produced by the STV0676 chipset is fixed and furthermore the available USB
bandwidth is also fixed (within the software dri ver) . The VC m odul e varies the compr ession ratio to
match the fluctuating input video data rates to the available USB bandwidth and re quired framerate.
The final stage of the VC block manages the data transfer from the local VC FIFO store to the USB
core. STV0676 performs this ma nagem ent a utoma tical l y by e mpl oyin g long- ter m (fr ame-l evel ) and
short-term (block-level) compression management.
1.6Control processor
The embedded 8052 microprocessor core controls the data flow through the major sub blocks
within STV0676 as well as the I
from the device driver.
1.7Power manageme nt
The chipset conforms to all power requirements specified by USB Version 1.1.
2
C communications to reconfigure the VP corresponding to requests
7/21
Page 8
External interfacesSTV0676
2External interfaces
2.1USB interface
The USB interface is designed to be compliant with version 1.1 of the USB specification. The
STV0676 is a low power device and is therefore suitable for connection to any USB port on a PC,
self-powered hub or when connected to a bus-powered hub.
The device complies with the device framework specified in Chapter 9 of the USB specification as
follows:
● The device supports a single high power configuration (
● Endpoint 0 is the default control endpoint and is always supported.
● Endpoint 0 supports all of the USB commands required by the device framework.
● Vendor specific commands on Endpoint 0 are used for all device control.
● Configuration 1 supports a single interface (interface 0).
The best and most consistent performance in terms of image quality is always obtained in the
highest bandwidth setting (alternate 7). Under some circumstances it may not be possible for the
host to allocate this amount of USB bandwidth to the device.
The isochronous settings reserve varying quantities of bandwidth - from 10% to 85% of USB
bandwidth. The lower settings result in poor image quality due to heavy compression applied to
maintain a high framerate streaming of image data, but at the same time leaving more bandwidth
free for other USB devices. This is desirable if more than one camera is to be used, or if there are
other isochronous peripherals conne cted. The device dr iver allows the user to specify the maximum
bandwidth they wish to allocate to transfer data from the device. If the maximum specified by the
user is not available, perhaps because another isochronous device has already reserved that
bandwidth, then lower alternates are tried until one succeeds.
8/21Revision C
Page 9
STV0676External interfaces
Benchmark testing of the STV0676 indicates that 30fps CIF video (compressed) can be
accommodated in 50% of USB bandwidth.
2.2Mode selection
All USB devices report a VID, PID and power consumption as part of a standard device descri pto r.
The VID and PID for STV0676 can be configured by the state of the digiport bits or by using an
external EEPROM. The mode selection is made using the two MODESEL pins as described in
Table 3
MODESEL[1]MODESEL[0]Mode of operation
below.
Table 3: Mode selection
00USB Mode. External EEPROM fitted, therefore PID, VID and power
10
01USB mode. Default. No external EEPROM fitted, the PID
11Reserved
consumption read from this source. See
2
C mode.
Slave I
VID and power consumption data determined by digiport[7:0].
See
Section 2.3
2.3Selecting VID and PID via the digiport
Tables 4~7 demonstrate how the VID/PID information is defined via the digiport.
The current reference design for t he STV0676-chipset has digipor t[7:0] conn ected to VSS, thus the
VID and PID are 16’h0553 and 16’h0140 respectively.
The digiport also controls the device current consumption that is reported to the host at device
enumeration.
Table 4: Basic digiport configuration
digiport bit slicefunction
[3:0]configures the LS nibble of the PID
[5:4]master VID/PID select
a. The ‘x’ ls nibble of the PID is defined by the value from
digiport[7:6]current consumption reported
2.4Serial EEPROM
STV0676 is designed to be used with a 12 8 or 256 byte serial I2C EEPROM. The EEPROM can be
programmed with data to allow a user to fully customise the USB identity of STV0676. The
configuration of this data is as follows.
2’b00
2’b01
2’b10
2’b11
16’h0553/16’h014x
16’h0553/16’h015x
16’h0553/16’h026x
16’h0553/16’h017x
Table 5
Table 7: Device power consumption indicator
2’b0098mA
2’b01250mA
2’b10350mA
2’b11500mA
a
a
a
a
above
10/21Revision C
Page 11
STV0676External interfaces
2.4.1EEPROM format and contents
Table 8: EEPROM format and contents
locationcontents
0fixed number, must be 0x’ED
1fixed number, must be 0x’15
2reserved, must be 0x’00
3max device power (=mA/2, e.g. 400mA enter 0x’C8)
4VidLo, low byte of the vendor ID
5VidHi, highbyte of the vendor ID
6PidLo, low byte of the product ID
7PidHi, highby te of the produc t ID
8manufacturer st ri ng offset, exam pl e below
9product string offset, see below
10interface 0 String offs et
11reserved, must be 0x’ 00
The remaining space is available for the string blocks indexed at locations 8, 9 and 10.
2.4.2Strings
The strings referred to above (locations 8-10), are the USB string descriptors referenced from the
device, configuration and interface descriptors. The value should be set to ’0’ if the string is not
implemented or to the offset in bytes of the start of the string block in the EEPROM.
The first byte of each string block is the number of the characters in the string. Subsequent bytes
are the actual string, which need not include a terminating null (
12reserved, must be 0x’00
13checksum
Table 9: EEPROM device string example
LocationContents
8Manufacturer string offset = 16
16String length = 5
17String text = ‘H’ (in ascii)
18String text = ‘e’ (in ascii)
19String text = ‘l’ (in ascii)
Table 9
:).
20String text = ‘l’ (in ascii)
21String text = ‘o’ (in ascii)
11/21
Page 12
External interfacesSTV0676
2.4.3CheckSum
The checksum is calculated by adding the byte value of EEPROM locations 0 to 12 inclusive, the
low order byte of the result is stored in location 13.
2.5I2C slave mode
STV0676 can be configured to behave as an I2C slave. This allows the device to be configured by
host devices other than PCs. Details of the I
register bank are available from STMicroelectronics.
2
2.6Digiport
The Digiport is a 10-bit bi-directional data port which can be used to transfer video data in or out of
the device. This port can also be used to configure USB descriptor information at power up see
(
Section 2.3
STMicroelectronics.
). Full details on the digiport operation and control are available from
2.7General purpose input and output
STV0676 provides up to 8 pins which can be used as general purpose I/O. These pins can be used
to interface to led’s, buzzers, switches etc.
C messages supported and description of the I2C
12/21Revision C
Page 13
STV0676STV0676 application example
3STV0676 application example
3.1USB webcam
Figure 2
shows a block diagram of a basic webcam using the minimum of external components.
The camera is controlled entirely through PC drivers over USB.
Note:If required a custom USB PID/VID can be configured by the use of an EEPROM, as detailed in
Section 2.3
Figure 2: Webcam block diagram
lens + IR filter
CMOS Sensor
CIF or VGA
image
array
Video
Processor
STV0676
Video
Compression
MIcro
Processor
USB
Interface
USB Cable
to host PC
EEPROM
3.2Embedded camera
Figure 3
YCrCb or RGB preview over an 8bit bus, the third party electronics would control the STV0676
using I
shows a block diagram of a camera intended for embedded applicati ons, outputting JPEG,
2
C.
lens + IR filter
Figure 3: Embedded camera block diagram
CMOS Sensor
CIF or VGA
image
array
Video
Processor
MIcro
Processor
I2C
STV0676
Video
Compression
FIFO
Digiport
Third party
electronics
13/21
Page 14
Detailed specificationsSTV0676
4Detailed specifications
4.1STV0676 absolute maximum ratings
DescriptionRangeUnit
Operating Temperature0 to 70
Storage Temperature-50 to 150
4.2STV0676 AC/DC characteristic
ParameterDescriptionMinTypMaxUnits
VDD_COREPrimary STV0676 power sup p l y1.551 .81.95V
VDD_IO3.3V power supply for on-chip USB transceiver and IO3.03.33.6V
VDD_PLLAnalo g supply to the P LL1.601.82 .0V
I_core
I_core
I_core
I_IO
I_PLL
I_PLL
V
Il
V
IH
V
HYS
V
Il
V
IH
V
T+
V
T-
V
T
V
OH
V
OL
I_IO
I_IO
I_PLL
suspend
standby
active
suspend
standby
active
suspend
standby
active
Current consumption in suspend mode3µA
Current consumption in standby mode9.6mA
Current consumption while active, VGA 30fps52mA
Current consumption in suspend mode40µA
Current consumption in standby mode540µA
Current consumption while active, VGA 30fps6.6mA
Current consumption in suspend mode0.4µA
Current consumption in standby mode476µA
Current consumption while active, VGA 30fps476µA
CMOS input low voltage (XTAL_IN)0.687V
CMOS input high voltage (XTAL_IN)1.19V
Hysteresis (XTAL_IN)0.51V
CMOS input low voltage0.35VDDV
CMOS input high voltage0.65VDDV
CMOS schmitt input low to high threshold voltage2.15V
CMOS schmitt input high to low threshold voltage1.05V
Threshold poi nt1.65V
Output high voltag e2.4V
Output low voltage0.4V
4PLL_VDDINPUTVDD for internal phas e locked loop
5PLL_VSSINPUTGND for internal phase locked loop
8CORE_VDDINPUTVDD for core logic
9CORE_VSSINPUTGround for core logic
10IO _V DDINPUTVDD for pad ring
11IO_VSSINPUTGround for pad ring
22IO _V DDINPUTVDD for pad ring
23IO _V SSINPUTGround for pad ring
24CO RE _VDDINPUTVDD for core logic
25CORE_VSSINPUTGround for core logic
39IO _V DDINPUTVDD for pad ring
40IO _V SSINPUTGround for pad ring
49IO _V SSINPUTGround for pad ring
57IO _V DDINPUTVDD for pad ring
58IO _V SSINPUTGround for pad ring
59CO RE _VDDINPUTVDD for core logic
60CORE_VSSINPUTGround for core logic
DEVICE MASTER CLOCK AND RESET
6XTAL_INANASystem clock pad
7XTAL_OUTOSCSystem clock pad
33RESET_NSCHMITTSystem, power-on-reset supplied by companion sensor
DIGIPORT/USB CONFIGURATION INTERFACE
12DIGI PORT[9]BIDIRDigiport operation
13DIGI PORT[8]BIDIRDigiport operation
14DIGI PORT[7]BIDIRDigiport operation /programmable USB current consumption reported
15DIGI PORT[6]BIDIRDigiport operation /programmable USB current consumption reported
16DIGI PORT[5]BIDIRDigiport operation /programmable USB VID/PID
17DIGI PORT[4]BIDIRDigiport operation /programmable USB VID/PID
18DIGI PORT[3]BIDIRDigiport operation /programmable USB PID
19DIGI PORT[2]BIDIRDigiport operation /programmable USB PID
20DIGI PORT[1]BIDIRDigiport operation /programmable USB PID
21DIGI PORT[0]BIDIRDigiport operation /programmable USB PID
SENSOR INT ERFACE
26SENSOR_CLKBIDIRSensor clock
16/21
Page 17
STV0676Pinout and pin descriptions
Table 10: STV0676 pin description
PinSignalTypeDescription
27SENSOR_DB[5]INPUTSensor data bus [bit5]
28SENSOR_DB[4]INPUTSensor data bus [bit4]
29SENSOR_DB[3]INPUTSensor data bus [bit3]
30SENSOR_DB[2]INPUTSensor data bus [bit2]
31SENSOR_DB[1]INPUTSensor data bus [bit1]
32SENSOR_DB[0]INPUTSensor data bus [bit0]
34SS DA3 stateSensor serial inte rface data
35SS CL3 stateSensor serial interf ace clock
36SPDNBIDIRControl line to sensor to select ultra low power SUSPEND mode
51RESERVED[0]BIDIRNot connect in reference design
52RESERVED[1]BIDIRConnect to VDD in reference design
53MODESEL[1]BIDIR
54RESERVED[2]BIDIRConnect to VDD in reference design
55RESERVED[3]BIDIRNot connect in reference design
56RESERVED[4]BIDIRNot connect in reference design
Along with ModeSel[1] used to configure I
selection. Please see
Along with ModeSel[0] used to configure I
selection. Please see
T able 3
for further details
T able 3
for further details
2
C interface and PID/VID
2
C interface and PID/VID
17/21
Page 18
Pinout and pin descriptionsSTV0676
Table 10: STV0676 pin description
PinSignalTypeDescription
USB INTERFACE
61USB_DNBIDIRUSB data line
62USB_DPBIDIRUSB data line
TEST MODE SELECTION
1TEST_CONF[0]INPUTTest conf i guration bit - connect to VDD for nor m al operation
2TEST_CONF[1]INPUTTest conf i guration bit - connect to VDD for nor m al operation
3TEST_CONF[2]INPUTTest conf i guration bit - connect to VDD for nor m al operation
EEPROM INTERFACE
63EEPROM_SDABIDIR
64EEPROM_SCLBIDIR
a. The I2C pins EEPROM_SCL and EEPROM_SDA can be reconfigured to act as a low speed I2C
slave device that allows the user to directly control the internal register space of the VP and VC
modules.
a
2
2
C clock
C clock
Serial data to/from the EEPROM or slave I
Serial clock to t h e EEPROM or slave I
Reference design and evaluation kits (RDK’s and EVK’s)STV0676
7Reference design and evaluation kits (RDK’s and EVK’ s)
STMicroelectronics supply a full range of sup porting re ference design kits for their range o f sensors
and coprocessors.
Please refer to the STMicroelectronics website (Imaging Products under the quick links) for the upto-date list of available reference designs and evaluation kits.
8Ordering details
For more information on the appropriate sensor choice please contact STMicroelectronics or refer
to the STMicroelectronics website (Imaging Products under the quick links).
9Design issues
There are no restrictions on the positioning of the STV0676 coprocessor with respect to the sensor .
An EEPROM is required for full USB 1.1 compliance, see reference design manual for details.
20/21Revision C ADCS 7280926
Page 21
STV0676
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences
of use of such informa tion nor for any infringement of patents or other rights of thir d parties which may re s u lt from its use. No license is
granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are
subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products
are not authorized for use as critical components in life support devices or systems without express written approval of STMicroelectronics.
The ST logo is a regi stered trademark of STMicroel ectronics
Purchase of I
2
C Components by STMicroelectronics conveys a license under the Phillips I2C Patent. Rights to use these
components in an I
2
C system is granted provided that the system conforms to the I2C Standard Specification