STV0681 (R) DUAL-MODE DIGITAL CAMERA CO-PROCESSOR DESCRIPTION Quick Power Down (by holding Mode Button). STMicroelectronics Imaging Division has produced the camera co-processor STV0681 which, used with CIF/VGA sensors as part of a low cost dualmode camera chipset, allows a new line of low cost cameras or toy products to be brought to the market. STV0681 is a mask ROM version of STV0680B, programmed with v3.00 Firmware. "Delete Last" Function FEATURES ST have maintained the standard features already available in the successful STV068B chipset, including: Audio Record and Playback The enhanced features included in STV0681 allow audio memos to be recorded at a sampling rate of 11kHz, by adding a microphone and comparator chip, and by utilizing the pre-amplifier included in CIF/VGA sensors such as VV6411 and VV6501 respectively. These sounds can be uploaded to the PC over USB or RS232, and played back using a Software application developed by the OEM using the SDK. Demonstration PC software with source code is available with the Evaluation Kit (EVK). With suitable OEM software, the camera could even be used to record comments about pictures or video clips in a "dictaphone" fashion, with the audio commentary played back when viewing the pictures/video. Support for VV6411 (CIF) and VV6501 (VGA) CMOS imaging sensors. Support for SDRAM sizes 16MBit (up to 20 CIF images) or 64Mbit (up to 80 CIF or 26 VGA images). Low resolution "economy" mode allows for more images to be stored. High frame rate web cam (tethered video) over USB. Audio record/playback and "Delete Last" function Custom sounds playback (e.g. "Talking" or "Musical" camera) Support for an OEM Flashgun module Automatic anti-flicker exposure control. Image up load over RS232 or USB. Evaluation Kit and Reference Design Driver support for Win98/Win2k/WinME and MacOS 8.6/9.0/9.1. Continuous capture while untethered (except when Flashgun enabled) and downloading to AVI file format Evaluation kits are available for STV0681 features. Precise design guidelines are available from ST as a reference design manual (see Chapter 10). Power-saving "stand-by" mode which maintains memory contents. Simple user interface including 2 buttons, status LCD display, and buzzer. Evaluation Kit (EVK) available. Software Development Kit (SDK) allows OEM PC Software applications to be written. March 2003 Recorded audio sounds can also be played back on the camera, with the addition of an amplifier chip and speaker or headphone socket. By auto-detecting hardware, STV0681 will only enable these additional functions if audio hardware is fitted. Actual hardware implementation is the subject of a separate STV0681 Reference design (see Chapter 10). Note: ADCS 7283313C Simultaneous audio record and continuous video capture is not possible. 1/44 STV0681 Table of Contents Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 1.1 Digital camera chipset .......................................................................................................... 5 1.2 Key system features ............................................................................................................. 6 Chapter 2 Detailed Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 2.1 Sensor type and image formats ........................................................................................... 9 2.2 User interface ..................................................................................................................... 10 2.3 Battery level detect and USB auto-switch .......................................................................... 12 2.4 Audio record and playback ................................................................................................. 12 2.5 PC interface options and software support ........................................................................ 13 2.6 Anti-flicker exposure and gain control ................................................................................ 14 Chapter 3 Camera Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 3.1 Modes available ................................................................................................................. 15 3.2 Description of modes ......................................................................................................... 16 Chapter 4 STV0681 Hardware Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 4.1 Sensor interface ................................................................................................................. 18 4.2 Memory interface ............................................................................................................... 18 4.3 USB interface ..................................................................................................................... 21 4.4 UART module for RS232 interface ..................................................................................... 22 4.5 Power management and battery type ................................................................................ 23 4.6 Quartz crystal ..................................................................................................................... 24 4.7 Numeric LCD interface ....................................................................................................... 24 4.8 Switches and LED's ........................................................................................................... 25 4.9 Flashgun hardware interface .............................................................................................. 26 4.10 IR filter ................................................................................................................................ 26 Chapter 5 Customising the STV0681 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 2/44 5.1 External EEPROM ............................................................................................................. 27 5.2 EEPROM data format ........................................................................................................ 28 5.3 Programming the EEPROM ............................................................................................... 28 ADCS 7283313C STV0681 Chapter 6 Software support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29 6.1 General features ................................................................................................................ 29 6.2 Software installation ........................................................................................................... 30 Chapter 7 Detailed Chipset Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 7.1 Typical camera specifications ............................................................................................ 31 7.2 Absolute maximum ratings ................................................................................................. 31 7.3 STV0681 specifications ...................................................................................................... 32 7.4 USB specifications ............................................................................................................. 32 7.5 DC characteristics .............................................................................................................. 33 7.6 PLL characteristics ............................................................................................................. 33 7.7 Crystal tolerance ................................................................................................................ 33 7.8 Typical current consumption of complete camera .............................................................. 34 Chapter 8 STV0681 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 8.1 STV0681 pinout ................................................................................................................. 35 8.2 STV0681 pin description .................................................................................................... 36 Chapter 9 STV0681 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 Chapter 10 Evaluation Kit (EVK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 10.1 Ordering details .................................................................................................................. 42 10.2 Technical support ............................................................................................................... 43 ADCS 7283313C 3/44 STV0681 Document Revision History Revision Draft Date Comments A 1.0 May 2001 Initial release (product preview) B 4.0 April 2002 Document status updated to datasheet. Major changes: removed references of VV6410 and VV6444 sensors C 4.1 November 2002 Removed all salestypes for imaging sensors: removed section 6.1 addition of chapter 5 - Customizing the STV0681 Replacement of section 6.1 - General features (in Chapter 6 Software support) 4/44 ADCS 7283313C STV0681 1 Introduction 1.1 Digital camera chipset 1.1.1 General Introduction This document describes the features and functionality of a CMOS chipset, comprising an STMicroelectronics (ST) CIF or VGA resolution sensor and an STV0681 companion processor, as well as outlining what peripheral components are required/supported in order to complete a camera using the chipset. Such a camera is particularly suited to dual-mode digital stills or toy applications. 1.1.2 Stills capture and image upload In stills mode, the camera stores raw image data in memory. The camera features no colour processing, ensuring its simplicity and low cost. Subsequent upload of raw data to a PC or Macintosh for processing is done through an RS232 or USB interface, through demo software, a TWAIN driver, or OEM custom application. The license to use the colour algorithm (embedded in the PC or Mac driver software) is included in the price of the chipset. 1.1.3 Webcam Video over USB A video option is provided, when tethered through USB. It allows for Video for Microsoft Windows applications, and `video clips' to be recorded while untethered by continuously capturing images in `continuous' mode. Images are then downloaded to the PC for playback, using software to create an AVI file. 1.1.4 Audio features The STV0681 allows audio memos to be recorded at a sampling rate of 11kHz. These sounds can be uploaded to the PC over USB or RS232 and played on the PC, or they can be replayed on the camera. With audio playback hardware fitted to the camera, it is possible to download a set of up to 20.WAV file "sound bites", to store in SDRAM, each of which can be linked to a particular camera function. This allows for camera "Theme Music", custom sounds such as an imitation shutter "Click-Whirr", or for certain functions to "talk" to the user, e.g. "Nice picture!". This has limitless possibilities for OEM language customizing or licensed character cameras. Downloading sounds is possible with the use of an OEM application developed using the SDK, and a demonstration PC application with source code is available with the EVK. Sounds are stored in SDRAM and will therefore reduce the number of images/amount of audio which can be stored, STV0681 calculates the remaining memory and displays the number of images left. Sounds can only be stored when untethered while battery power is maintained. 1.1.5 Flashgun support The addition of an OEM flashgun module increases the camera capabilities and improves low light image quality. STV0681 flashgun support includes modified exposure control, an enable input and a correctly timed trigger output. Although it remains the responsibility of the OEM to source a suitable Flashgun module, advice on hardware interfacing, flash charge sensing and required flashgun energy are given in a separate Flashgun Application Note (AN1312), please contact ST for details. ADCS 7283313C 5/44 Introduction 1.1.6 STV0681 "Delete Last" function An additional user interface function is available in STV0681 with either audio record or playback hardware fitted. With these, the user can delete the last image or continuous clip to be captured, or the last audio memo to be recorded. The standard "Clear all" ("CL") function remains, whether or not audio hardware is fitted. 1.1.7 Backward compatibility with STV0680B STV0681 is electrically and functionally compatible with cameras designed for STV0680B, and uses the same PC/Mac drivers, however the change of device pinout means that some PCB re-design will be required. Precise design guidelines are available from ST as a reference design (see Chapter 10). A software development kit (SDK) for PC is available from ST to interface to the camera and provide the basis to develop a custom software application for stills and/or video. It includes colour processing software. Figure 1: Typical camera system block diagram LED Audio Speaker Amplifier Push Buttons: "Shutter /Record" Flashgun Enable/Trigger 2 x 7 seg. LCD "Mode" CMOS Sensor OEM Flashgun Module VV6411 (CIF) VV6501 (VGA) Microphone Comparator GPIO Enable/Trigger Audio Pre-Amp Audio DAC Sensor data Sensor clock Sensor I/F Piezo Buzzer PWM LCD memory Driver I/F RS232 I/F STV0681 Image Array Subject Lens + IR Filter USB I/F Detect Low Battery 12MHz XTAL VReg 16MBit or 64MBit SDRAM Transceiver Circuit (Discretes) Power Management Circuit (Discretes) RS232 interface to PC USB interface to PC 4.5 - 6v Battery e.g. 3-4 x AA, AAA, etc. 3v3 supply 4-5v (Nominal) supply from Battery or USB 1.2 Key system features The key features of a typical camera based on the STV0681 chipset are listed here below. 1.2.1 Image features Support for CIF resolution sensor - 352 x 288 pixels Support for VGA resolution sensor - 640 x 480 pixels 80 picture storage capacity possible for CIF, with 64MB memory 26 picture storage capacity for VGA, with 64MBit memory A greater number of images can be stored when `Low' resolution mode is enabled (e.g. 80 QCIF images with 16Mbit memory, 107 QVGA images with 64Mbit memory). See Table 1. Automatic anti-flicker exposure and gain control Support for flashgun. 6/44 ADCS 7283313C STV0681 1.2.2 Introduction User features on camera Self-timer mode allows a picture to be captured after several seconds. Twin 7 segment LCD panel supported - showing number of pictures left, and modes. Picture counter helps the user to know how much memory is left. Un-tethered `Continuous' mode allows capture of image sequences for storage in memory and subsequent download to PC. Piezo buzzer indicates a number of useful events to the user, e.g. whether enough light is present for picture capture, etc. LED indicator . "Clear all" function clears camera. "Low Resolution" mode increases number of images which can be captured by reducing image resolution. Audio Record function (if audio record hardware detected) allows sounds to be recorded. Audio Playback function (if audio playback hardware fitted) allows sounds which have been recorded to be played back. "Delete last" function allows user to delete audio memos, pictures or continuous clips, deletion must be carried out "most reset first". Camera can be configured by the user to play custom sounds at certain functions, using a PC application. "Go to sleep" function, whereby the camera can be put into standby mode while untethered. 1.2.3 User features on PC software PC software allows a number of features such as fast download of thumbnail images for picture selection, and automatic detection and correction of sensor defects. The driver compatibility includes: TWAIN driver to suit all TWAIN compatible imaging applications Video for Microsoft Windows PC driver for tethered video mode (through USB), available at all resolutions, with fastest framerates at QCIF resolution AVI video file creation from image sequences captured in `continuous' mode Quicktime Video driver and Adobe Photoshop stills plug-in for Mac Custom OEM PC software can be developed by using the SDK (for SDK availability, contact ST), to upload thumbnails/still images or `continuous' images, e.g. for AVI file creation. The SDK (version 2.90 or later) allows: the OEM to write a custom application and upload sound memos based on the example LCDC demo software. the OEM to write a custom application and download custom sounds to the camera based on the example CustomSound software. 1.2.4 Power management features and USB compliance Retention of pictures, recorded sounds and downloaded custom sounds with extremely low power operation. The camera seems to be "switched off". Auto power-off after 30 seconds of non usage. Operates from 4.5-6V battery, although system voltage is 5V or 3.3V, dependant on sensor. Low battery detection. ADCS 7283313C 7/44 Introduction STV0681 Dependant on hardware configuration, switch-over to USB power supply is supported and the device can operate with low batteries or without batteries when connected to USB. Full USB compliance requirements are listed in the USB specification. However, in a camera designed using this chipset, the following must at least be included: (a) an SDRAM with sufficiently low selfrefresh current, (b) USB inrush protection circuitry to maintain sufficient supply voltage to the 5V sensor. See Section 7 for further details. 1.2.5 General features High speed picture/sounds upload to PC/Mac over USB ST colour processing algorithms included under license (as part of drivers/SDK) USB or RS232 serial interface options, and VfW / TWAIN driver support. 8/44 ADCS 7283313C STV0681 Detailed Features 2 Detailed Features 2.1 Sensor type and image formats The sensor type is auto-detected by STV0681, the correct sensor timing is enabled and the correct image resolutions are enabled, as shown in Table 1. For stills photography, `High' or `Low' resolution mode can be selected, to give CIF or QCIF pictures from a CIF sensor, and VGA or QVGA from a VGA sensor (see Table 1). Reduced resolution allows for storage of more images. Images captured in both `High' and `Low' resolution can be stored in camera memory at the same time. Therefore there is no need to clear images stored in memory prior to changing image resolution. Where USB is connected, the host PC software (through a Video for Microsoft Windows driver) can activate tethered video mode, regardless of the user inputs to the camera buttons. In this case, the image resolution is controlled by the PC driver. Note: When tethered VfW video (PC) or Quicktime driver (Mac) is activated, all images or recorded sounds or video clips are deleted from the camera SDRAM. A software solution is available ("Camera control", as part of the SDK for PC, and "Plug'n Save" for Mac) which can monitor whether a camera is connected and warns the user if activating the VfW driver causes SDRAM contents to be deleted. Table 1: Image modes supported Sensor Image Size CIF 352 x 288 Max. no. of images Resolution stored in Final Image Size mode 16MBit memory (Note 2) High CIF 352 x 288 20 Low QCIF 176 x 144 80 Approximate VfW framerate (Note 1) 80 15 frames/sec. 322 22.5 frames/sec. (see Note 3) (Subsampled) VGA 640 x 480 Max. no. of images stored in 64MBit memory (Note 2) High VGA 640 x 480 (6) Low QVGA 320 x 240 (26) (Subsampled) 26 2 frames/sec. 107 12 frames/sec. (see Note 3) Note: 1 VfW framerate is dependent on PC performance and USB bus loading 2 The number of images which can be stored is reduced if Audio sounds have been recorded on the camera or if custom sounds have been downloaded from the PC to the camera. The reduction of capacity depends on the length of audio clip, but a rough guide is that if 1 CIF image uses the same amount of SDRAM as 10sec of audio, and one VGA image uses the same amount of SDRAM as 30 sec. of audio. 3 A CIF camera with STV0681 and 64Mbit SDRAM can store up to 320 images by using QCIF mode. When more than 99 images are available, the LCD display remains at 99. When the number of available images is inferior to 99, the LCD display shows the number of available images like in all other modes. ADCS 7283313C 9/44 Detailed Features 2.1.1 STV0681 IR filter For IR filter design, the best choice filter follows the GS0034 dielectric stack filter specification available from STMicroelectronics. An alternative, although not optimal filter, would be Schott S8612 doped glass also sold as CM500. 2.2 User interface The user interface supported by STV0681 comprises of user controls, buzzer sounds or customized sounds and visual displays. 2.2.1 Push buttons The following are the functions which are supported by the chipset. These functions are achievable with no more than 2 push buttons. 1 Mode button (wake-up/switch between modes) This button allows the user (1.1) to wake the camera up from standby mode when the camera is to be used for taking pictures, or (1.2) to switch between modes of operation shown in Chapter 3. 2 Shutter button (shutter/confirm action) This button allows the user to take a picture or confirm an action, as shown in Chapter 3 The modes of operation are described in Chapter 3. It may also be desirable to include an on-off slider switch. The advantages and disadvantages as well as its exact function are discussed in the reference design available from STMicroelectronics. When a flashgun module is included in the camera, it is necessary to include a flash on/flash off push button or slider switch depending on the exact flashgun module design. Possible implementations are discussed in a separate application note AN1312 available from STMicroelectronics. 2.2.2 LED indicator The LED indicator displays the camera status when not in Standby/PC suspend mode. 2.2.3 Picture counter using 2 x 7 segment display STV0681 stores a picture counter value indicating how many images can still be captured. STV0681 supports a 2x7 segment LCD panel. In `Snapshot' mode and continuous capture mode, this LCD panel displays the number of pictures still available. This is useful to identify when the user is approaching the maximum number of images which can be stored (see Table 1). The user can clear the images stored in memory and continue taking pictures. In other modes, this LCD panel displays a 2-character code that helps the user to navigate around the modes. Note: A CIF camera with STV0681 and 64Mbit SDRAM can store up to 320 images by using QCIF mode. When more than 99 images are still available, the LCD display remains at 99. When the number of available images is inferior to 99, the LCD display shows how many images are available like in all other modes. For suitable numeric LCD panel types, see Section 4.7. 10/44 ADCS 7283313C STV0681 2.2.4 Detailed Features Piezo buzzer An on-chip pulse width modulator (PWM) generates buzzer sounds to signal certain events. The distinctive sounds are characteristic of the type of events indicated by the buzzer, as described here below. 2.2.5 1 Camera has been `Woken up' from standby mode (either by the user pressing a button, by reconnecting the power source, or by connecting a USB/RS232 connection). 2 Camera has `gone to sleep' that is moved into standby mode. Pictures are retained in memory. 3 Picture was taken successfully once the user had pressed the capture button. 4 Picture has NOT been taken when the user pressed the capture button because of insufficient light, or because the exposure control was not ready following a rapid change of lighting in the scene. 5 Picture has NOT been taken when the user pressed the capture button because the picture counter had reached the maximum number of images. The user has the chance to reset the counter if desired. 6 End of continuous capture in un-tethered `Continuous' mode due to full memory. 7 Self-timer activated, count down has started. Custom sounds A camera which includes STV0681 and audio playback hardware can have a set of custom sounds downloaded from a PC application. A different sound can be associated with each of the following functions: Table 2: List of custom sound functions Power On Power Off Good picture Bad picture (Normally due to insufficient light) Memory full Self timer #1 Self timer #2 Low resolution High resolution Picture delete Sound delete Continuous clip delete Clear memory Confirm action Low power Flashgun ON Flashgun OFF Flashgun Trigger ADCS 7283313C 11/44 Detailed Features STV0681 Table 2: List of custom sound functions Frequency 50kHz Frequency 60kHz Note: 1 When a sound is associated to a given function, and it is stored in SDRAM, the piezo buzzer does not give any beeps for that function. Not all functions need to have custom sounds associated with them, this is the choice of the user or OEM. 2 A demonstration PC application "CustomSounds" is available from ST, however this is not intended for end-users. Source code is available which allows the OEM to build their own PC application using the SDK. 2.3 Battery level detect and USB auto-switch An on-chip battery level detector on STV0681 detects when the battery voltage falls below a threshold. The chosen threshold level is determined by a resistor value, as shown in Chapter 7. Where no USB has been detected, the LCD display flashes, indicating that the battery is low. When a USB connection has been detected, the LCD display does not flash. Note: It may be a requirement of certain USB compliance tests that such additional hardware is included in the camera design, in order to enable the camera to switch to supply from USB and hence report back to the PC while connected to the USB bus without a battery. 2.4 Audio record and playback 2.4.1 Record A camera including the STV0681 with a microphone, a comparator and other periphery (also using the sensor pre-amplifier) can record sounds stored like images. STV0681 auto-detects the presence of audio record hardware and includes audio record and "delete last" functions into the user interface. The audio sample rate is 11.025 kHz, the signal is digitized using a successive approximation A-D converter with 8 bits resolution. The SDRAM stores 1 second of audio recording per 11 kByte of memory. 2.4.2 Playback A camera including the STV0681 with an amplifier, a speaker/headphone socket and other periphery can playback sounds either recorded on the camera or downloaded from the PC. The quality of audio playback is largely dependant on the type of speaker used, and on the correct mounting of the speaker in the camera plastics. 12/44 ADCS 7283313C STV0681 2.5 Detailed Features PC interface options and software support USB interface (full speed 12Mbit per second maximum) and RS232 interface (115.2kbaud) are supported by the chipset, with driver software available from STMicroelectronics for both. The interface type is auto-detected by the chipset. PC software can be one of the following: 2.5.1 1 Simple image upload demonstration software supplied by ST, allowing uploading of stills or `continuous' images. This software should not be supplied as an end-user product. 2 TWAIN driver to suit all TWAIN compatible imaging applications, 3 Video for Microsoft Windows driver for tethered video mode (USB only), 4 Custom end-user software developed by OEM using SDK (for SDK availability, contact ST). The SDK is supplied by ST as a 32-bit DLL format, running on Microsoft Windows 98, and accessed through a documented software interface. This provides the basis for developing a custom software application for uploading stills and/or video. USB Complete images (displayed as either thumbnails or in full resolution), or the entire SDRAM contents (e.g. for uploading continuously captured image sequences, recorded using `Continuous Capture' mode) can be downloaded through USB, and USB connection also allows for tethered video mode to be activated by the USB driver. Thumbnail image download is extremely fast for the entire memory contents in the camera. Once a picture is selected for download, full image download takes approximately 0.15 second per image for a CIF image (0.6 second for a VGA image), plus post processing time per image. For USB interface details, see Section 4.3. Note: Actual USB download and post processing time also depends on PC performance and USB bus loading 2.5.2 RS232 Thumbnails of images, complete stored images, or the entire SDRAM contents can be downloaded through RS232, but tethered video is not supported. Once a picture is selected for download, full image download takes approximately 10 seconds per image for a CIF image (around 30 seconds for a VGA image), plus post processing time per image (of the order of 1 second approximately). For RS232 interface details, see Section 4.4. Note: Actual post processing time after RS232 download also depends on PC performance ADCS 7283313C 13/44 Detailed Features STV0681 2.6 Anti-flicker exposure and gain control 2.6.1 General The chipset operates automatic exposure and gain control for either 50Hz or 60Hz mains-driven indoor lighting, using the same 12MHz crystal. This improves picture quality by selecting a set of exposure values which minimize `flicker' effects. Detection of the mains frequency is dependant on the status of the GPIO3 pin, which can be achieved by population of a PCB link at a late stage in production, once the country of destination is known, without the need to change the crystal frequency. The auto exposure and gain algorithm is always enabled during Snapshot'/self-timer/continuous mode. When the shutter button is pressed in `Snapshot' mode, the chipset captures an image if the exposure and gain values are suitable for the current scene. If the light has suddenly changed, the camera may emit an audible tone to indicate that more time is required to reach the correct exposure target. In `Snapshot' mode the chipset only captures the image data if sufficient light is present in the image. In continuous capture mode, the chipset captures images regardless of whether enough light is present. The exposure control algorithm in STV0681 chooses exposure values which minimize "flicker" effects from occurring under fluorescent lighting. STV0681 can only prevent flicker in lighting powered by 50Hz or 60Hz electricity supply, but automatic detection of the flicker frequency is not possible. Hence choosing the correct anti-flicker setting is important, in order to prevent dark stripes from appearing across the image, and this selection must be done in hardware. Figure 2: Illustration of flicker problem Flicker setting not correct 2.6.2 Flicker setting correct Flashgun exposure When the STV0681 and a flashgun module are included in the camera, and the flashgun enable signal is high, the exposure mode operates in a different manner. The CMOS sensor progressive scan readout requires that the sensor is set to maximum exposure so that all lines are exposed. The flashgun operates during a few 100 s in order to correctly expose all sensor lines, (contact ST for more precise details), therefore the flashgun module design should have reached maximum light output within this period after the falling edge of the flash trigger output from STV0681. Possible flashgun implementations, regarding hardware interface, charge sensing, and flash energy required are discussed in a separate application note AN1312 available from STMicroelectronics. 14/44 ADCS 7283313C STV0681 3 Camera Modes of Operation Camera Modes of Operation This section refers to the two switches as discussed in section Section 2.2.1 "Mode": connects GPIO0 pin of STV0681 to GND when pressed "Shutter": connects GPIO1 pin of STV0681 to GND when pressed Pressing the mode switch repeatedly cycles through a series of modes as displayed on the LCD. When a given mode is displayed it may be selected by pressing the shutter button. If an option is not selected within 5 seconds, the display reverts to showing the number of available pictures. 3.1 Modes available Figure 3: STV0681 modes (CIF camera with 16Mbit SDRAM assumed) Press Mode button Normal: 20 / 80 After 30sec of inactivity Standby mode (untethered) Audio Record: Ar Notes: Audio Playback: AP 1. Audio Record only available if audio hardware is fitted 2. Audio Playback only available once an audio clip has been recorded Delete Last: dA / dP / dC Continuous Capture: Ct Self-Timer: St 3. Delete Last displays (only available if audio hardware fitted) dA - if the last object is an audio clip dP - if the last object is a picture dC - if the last object is a continuous capture clip The mode is inhibited if the camera is empty. 4. Continuous Capture mode is inhibited when the flashgun is enabled (SW6 down) Clear All: CL Resolution: Hr / Lr ADCS 7283313C 15/44 Camera Modes of Operation STV0681 3.2 Description of modes 3.2.1 Standby mode (untethered) and Wake-up On power-up, or wake-up from untethered standby mode, (i.e. by pressing the Mode button), the camera beeps twice. The LCD briefly indicates the camera resolution either `Hr.' for high resolution (80 CIF or 26 VGA images - using 64Mbit memory) or `Lr' for low resolution (322 QCIF or 107 VGA images - using 64Mbit memory) and then displays the number of pictures which may be taken. Please note that in low resolution mode, although there can be up to 322 images available, the LCD counter only goes up to 99, it reports 99 until there are less than 99 images left. The camera goes back to standby mode after 30 seconds of inactivity, LED1 turns off and the LCD goes blank. This is also achieved by pressing the mode switch during more than 2 seconds. 3.2.2 Normal mode Press the shutter button to take a picture. The camera beeps. A high pitched beep indicates that the picture was taken successfully and the counter decrements (if there are less than 99 images left to take). A low beep indicates insufficient light to take a picture. A series of beeps indicates that the camera is full. Stored pictures can be uploaded to a PC at any time, whether or not the camera is full. Plugging the USB connector into the camera causes it to reset and issues a double beep but all stored pictures remain. When the USB connector is unplugged the camera goes to sleep. When connected to the PC, the camera can still be used in the normal way. Note: When flashgun is enabled, the camera always takes a picture, with or without sufficient light. 3.2.3 Audio record - Ar This mode is available with audio record hardware fitted. Pressing the shutter button within 5 seconds causes the camera to start recording for as long as the shutter button is pressed down. If the shutter button is not pressed within 5 seconds, the camera reverts to normal picture taking mode. Whilst recording, the LCD display flashes `Ar'. If the recording stops because the memory is full, the `memory full' audio tone is sounded and the display stops flashing and displays `00'. The audio data is digitized and stored in SDRAM. 3.2.4 Audio Playback - AP This mode is available with audio playback hardware fitted. Pressing the shutter button within 5 seconds causes the camera to play back the most recent audio recording. If the shutter button is not pressed within 5 seconds the camera reverts to normal picture taking mode. Whilst playing, the LCD display flashes `AP'. Once in Audio Playback mode, repeated presses of the shutter button steps the camera through each of the audio recordings in the camera (most recent first). Keeping the shutter button pressed down also allows to cycle through the audio recordings. Pressing the mode button during playback stops the audio clip. Note: 16/44 Minimum audio recording length is set to 0.5 seconds. ADCS 7283313C STV0681 3.2.5 Camera Modes of Operation Delete Last Object - dA/dP/dC This mode is available with audio record hardware fitted. If the last object captured was an audio recording, 'dA' (delete audio) is displayed, if the last object was an image, then 'dP' (delete picture) is displayed, or, if the last object was part of a continuous capture sequence, then 'dC' (delete continuous) is displayed. If the camera is empty, the mode is suppressed. The mode works like `CL' (Clear All), that is once the mode is selected, pressing the shutter button once causes the camera to beep and `dA', `dP' or `dC' to start flashing. Pressing the shutter button again within 5 seconds deletes the last audio clip, picture or continuous capture sequence. 3.2.6 Continuous mode - Ct Pressing the shutter button within 5 seconds causes the camera to start taking pictures for as long as the shutter button is pressed down (and the camera is not full). If the shutter button is not pressed within 5 seconds the camera reverts to normal picture taking mode. Note: 1 In continuous mode, the camera allows pictures to be taken regardless of the available light, which could result in insufficient exposure. 2 In continuous mode, only every alternate field is grabbed hence capture rate is halved. For example, 12.5fps CIF and 7.5fps VGA 3 Continuous mode is suppressed when the FlashGun enable signal (GPIO2) is high. 3.2.7 Self timer - St Pressing the shutter button starts a 10-second self-timer. The camera issues a short beep every second, followed by a longer beep. A further beep will then indicate that the picture has been taken (high beep - picture successful, low beep - insufficient light, picture not taken). The self-timer mode cannot be selected when the camera is full. The self-timer count down cannot be stopped once it has started. 3.2.8 Clearing the camera memory - CL Pressing the shutter button once causes the camera to beep and the `CL' to start flashing. Pressing the shutter button again within 5 seconds clears all the images/audio clips in the camera and resets the counter. 3.2.9 Changing picture resolution - Hr/Lr The resolution option is displayed, either Hr to change to high-resolution mode (if currently in lowresolution mode) or Lr to change to low-resolution (if currently in high-resolution mode). Press the shutter button within 5 seconds to select the resolution option, the camera beeps and the display is reset, indicating the number of pictures available in the new mode. The picture resolution can be changed at any time, that is the camera can store both high and low resolution images. ADCS 7283313C 17/44 STV0681 Hardware Interfaces STV0681 4 STV0681 Hardware Interfaces 4.1 Sensor interface STV0681 uses a standard ST digital interface from the sensor, and the sensor clock input is provided by an output from STV0681. The design of a camera using this chipset should be implemented as closely as possible to the reference design (Chapter 7), in which case the chipset can be regarded as a functional `black box', and no further details regarding the STV0681-sensor interface are required. 4.2 Memory interface STV0681 is designed to interface to an external 16Mbit or 64Mbit SDRAM (see Table 1). The SDRAM device must have a 16 bit wide data bus and operate from a 3.3V supply. Two sizes of SDRAM memory are supported by STV0681, 16MBits (1M x 16 bits wide) or 64MBits (4M x 16 bits wide), the memory size is auto-detected by STV0681. STV0681 clocks the SDRAM at 6MHz, typically this is well below the figures offered by most manufacturers' devices. 4.2.1 SDRAM current consumption For maximum system battery life while no pictures are being taken, and to meet requirements for USB compliance, an SDRAM should be chosen with the lowest possible self refresh current specification. In addition, the USB suspend mode current specification requires that the camera consumes less than 300A when un-tethered. Meeting this specification, which is included in the requirements for USB compliance, assumes an SDRAM with up to approximately 250A self-refresh current, based on a current consumption of approximately 50A for STV0681 + support circuit. 18/44 ADCS 7283313C STV0681 4.2.2 STV0681 Hardware Interfaces SDRAM interface timing requirements Figure 4: SDRAM Read Timing (16Mbit device, burst read) tCK tL tH DCLK CKE tCMS tCMH Command ACTIVE A0-9,BA ROW A10 READ NOP PRECHARGE NOP COLUMN ROW tAS tAH tCMS tCMH tOH tAC DQM DQ DOUT M tRCD DOUT M + 1 DOUT M + 2 DOUT M + 3 READ Latency tRC tRAS tRP DQ sample ADCS 7283313C DQ sample DQ sample DQ sample 19/44 STV0681 Hardware Interfaces STV0681 Figure 5: SDRAM Write Timing (16Mbit device, burst write) tCK tL tH DCLK CKE tCMS tCMH Command ACTIVE A0-9,BA ROW WRITE NOP PRECHARGE NOP COLUMN ROW A10 tAS tAH tCMS tCMH tDS DQM DQ DIN M DIN M + 1 tDH DIN M + 2 tRCD DIN M + 3 tRC tRAS tRP Table 3: Timing parameters for SDRAM read/write Symbol Min. Max Units Symbol Min. tCK 166.45 166.89 ns tDS 81.01 ns tCH 1/2 tCK tDH 83.41 ns tCL 1/2 tCK tRCD 1 tCK tCK tRAS 5 tAC 4.2.3 1/2 Max 5 Units tCK tOH 0 ns tRC 7 tCK tCMS 82.88 ns tRP 2 tCK tCMH 82.85 ns tRCD 1 tCK tAS 82.88 ns tAH 82.76 ns SDRAM refresh period The SDRAM refresh period from STV0681 is guaranteed to be inferior or equal to 15.6s during `Snapshot'/self-timer/continuous/tethered video modes of operation (that is not standby mode). In standby mode, the SDRAM is set to self-refresh, therefore no refresh from STV0681 takes place. 4.2.4 SDRAM initialisation period The SDRAM initialisation period is currently set to 981s in STV0681. 20/44 ADCS 7283313C STV0681 4.3 STV0681 Hardware Interfaces USB interface STV0681 includes a USB Version 1.1 compliant Universal Serial Bus Interface, including a transceiver. This allows direct connection from STV0681 to a USB connector with minimal additional hardware (that is a small number of passive discretes) - see Chapter 7 The USB interface interfaces the STV0681 to the USB at full speed 12MHz data rate. Some of the features are: Compliant with USB protocol revision 1.1. USB protocol handling. USB device state handling. Clock and data recovery from USB. Bit stripping and bit stuffing functions. CRC5 checking, CRC16 generation and checking. Serial to parallel conversion. Single bulk-end point. USB drivers are supplied by ST. For USB timing information, please refer to the USB specification V1.1. ADCS 7283313C 21/44 STV0681 Hardware Interfaces 4.4 STV0681 UART module for RS232 interface The UART module on STV0681 provides a 115200 baud full duplex serial interface to an external host. 4.4.1 RS232 physical interface STV0681 does not support direct connection to a RS232 serial link. Physical line driver circuitry is required, e.g. using a standard RS232 transceiver chip, or by using a small number of low cost discretes (refer to Reference Design for details). Unscreened cable can be used, a suitable low cost connector is a 3.5mm stereo audio jack plug. 4.4.2 UART module overview Receiving data The UART module in STV0681 receives serial data through the RXD pin. Data reception is initiated by a 1-to-0 transition on RXD, and the received data is sampled every 8.66s. If the RXD input is not 0 when the incoming data is first sampled, the UART module goes back to look for another 1-to-0 transition. This is to provide rejection of false start bits. If the start bit proves valid, reception of the rest of the frame proceeds. Transmitting data When a transmission is activated by STV0681, the contents of an internal transmit shift register are shifted onto the TXD pin, every 8.66s. The UART operates at 12MHz, which is not an integer multiple of 115200, so the actual baud rate is 115232 +/- 0.3%, which is well within the requirements of a typical 16x oversampling UART, which can tolerate a 3.75% error in baud rate. 22/44 ADCS 7283313C STV0681 4.5 STV0681 Hardware Interfaces Power management and battery type STV0681 and the SDRAM require a 3.3V supply. When a VV6411 or VV6501 (3.3V) sensor is used, a single voltage regulator can regulate the supply for all three components from the battery, or the sensor on-board VReg can be used. These are explained more fully in the reference design. 4.5.1 Power switching to USB Included in the USB compliance requirements, is the ability of the camera to report to the PC when connected to the USB bus, whether or not there is a fresh battery in the camera. This means that power sourcing from USB is required, which also saves on battery life while the camera is used in USB tethered video mode. In order to allow switching from battery to USB power, some additional hardware is required. The USBDETECT input to STV0681 is used to detect that a USB power supply is connected If the USB is detected, additional hardware is used to switch off the battery An inrush protection circuit can protect the USB bus from current draw in the case of a low battery/ battery not fitted. This may be necessary to comply with the USB specification. For precise USB compliance requirements, please consult the USB specification version 1.1. 4.5.2 Switched sensor supply Dependant on the hardware implementation, the SENSPWR output from STV0681 is used to put the sensor into suspend mode. This has a significant improvement on battery life. 4.5.3 Battery type It is possible to use various battery types and configurations. The evaluation kit uses four 1.5V AAA cells. ADCS 7283313C 23/44 STV0681 Hardware Interfaces 4.6 STV0681 Quartz crystal Regardless of the sensor type or anti-flicker requirements, the sensor + STV0681 chipset operates from a single 12MHz fundamental quartz crystal. For specification requirements, see Table 13. STV0681 includes an on-chip low jitter PLL. For PLL characteristics, see Table 12. 4.7 Numeric LCD interface STV0681 supports a 2-digit LCD panel only, for alpha-numeric display. 4.7.1 LCD types STV0681 connects to a non multiplexed, direct drive LCD with 2 x 7 segments. Many LCD types are compatible with this interface. The LCD refresh frequency is 34.7Hz. 4.7.2 LCD interface pinout The convention for segment numbering is as follows: '0' connects to segment 'a', '1' connects to segment 'b', and so on, where a to g are standard for all 7-segment displays, as well as an LCD common output, giving fifteen signals in total. 24/44 ADCS 7283313C STV0681 4.8 STV0681 Hardware Interfaces Switches and LED's The GPIO lines on STV0681 have the following pre-defined functions, see Section 2.2 for user interface functionality. MODE push button and SHUTTER push button: GPIO0 and GPIO1: both push button inputs have internal de-bounce circuits, reducing the amount of hardware required externally. It is recommended that labelling is used on the camera casing to help the user understand the functioning of the 2-button interface. 4.8.1 Input to select between 50 and 60Hz flicker frequency: GPIO3 This allows for factory setting of the anti-flicker frequency, dependant on the final country of destination. See also Section 2.6. The polarity of this selection is detailed in the reference design. 4.8.2 LED indicator output: GPIO5 The LED output has an 8mA current sinking capability. 4.8.3 Other pins: GPIO2, 4, 6, 7 With STV0681, these pins are used, as detailed in Table 4. Table 4: Other GPIO usage with STV0681 GPIO 2 4 6 7 Audio Record No Yes No No Audio Playback No No Yes No Flashgun Yes No No Yes Their specific functions are detailed in the reference design and in the following documents available from ST: Audio: application note AN1310 Flashgun: application note AN1312 4.8.4 Audio Record Hardware interface STV0681 implements the A/D conversion by outputting successive analogue levels (successive approximation) through the DAC output, which are compared with the actual signal level (output from the sensor microphone preamplifier), and the resulting high or low signal from the comparator is read at GPIO4. The sampling frequency is 11kHz, and the successive approximation is done at 8 bits resolution per sample. It is not possible to speed up the sampling frequency due to the limitation of STV0681 processing speed. An actual hardware implementation is given in the audio application note AN1310. 4.8.5 Audio Playback Hardware interface STV0681 outputs the desired signal level through the DAC output, which is amplified to the speaker or headphone socket. GPIO6 is used to switch off the amplifier during periods of audio recording, to prevent the successive approximation waveform from being heard during periods of recording, and to reduce the power consumption and unwanted crackle through the speaker. An actual hardware implementation is given in the audio application note AN1310. ADCS 7283313C 25/44 STV0681 Hardware Interfaces 4.9 STV0681 Flashgun hardware interface STV0681 will revert to flashgun exposure when it detects GPIO2 is high. Ideally the hardware should combine the two factors of (a) user intention (e.g. user switches on flashgun) and (b) charge sensing (i.e. flash is charged up and ready to fire). These two factors (a) and (b) are independent, since there may be a delay of several seconds between switching on the flashgun charger, and the flashgun being able to fire. To revert to flashgun exposure before the flashgun is completely charged up would cause very bad pictures to be taken in low light conditions because there is no "low light" threshold when flashgun exposure is enabled, since the camera expects a flash to fire. A suggested flashgun hardware interface is given in the flashgun application note AN1312. When flashgun exposure is enabled and the shutter button is pressed, a picture is taken and the flash trigger pin GPIO7 is pulsed low at the correct point in time so that all lines of the CMOS imager are exposed. 4.10 IR filter An Infra-Red Blocking Filter is required to achieve correct colour response. The exact specification for the IR filter characteristics are given in the reference design manual. 26/44 ADCS 7283313C STV0681 5 Customising the STV0681 Customising the STV0681 The firmware inside the STV0681 is stored in ROM and may not be changed. It is possible, however, to use an external serial EEPROM to store certain information to allow a degree of customization of the device. The STV0681 reports a USB Vendor ID (VID) of 0553(hex) and a Product ID (PID) of 0202 (hex). Alternative values for the VID and PID as well as Manufacturer and Product strings may be stored in an external EEPROM. In addition to USB descriptor information, the EEPROM may also be used to set various other parameters as follows: Auto power-down time: this is the length of time before the STV0681 shuts down after no activity. Mode button power-down time: the length of time you must hold the Mode button to powerdown the system. 50Hz/60Hz flicker-free selection: the EEPROM allows this selection to be via a GPIO pin on the STV0681 or fixed at either 50Hz or 60Hz Number of self-timer beeps 5.1 External EEPROM An external 128byte serial EEPROM may be used in conjunction with STV0681 to hold customer specific information. The EEPROM is connected onto the sensor IIC bus and must be set to IIC address A0 (hex). The EEPROM is auto-detected by the STV0681 and no additional changes need to be made. A suitable EEPROM device is manufactured by STMicroelectronics part number M24C01W (alternatives are available from other suppliers). ADCS 7283313C 27/44 Customising the STV0681 5.2 EEPROM data format Location(decimal) 5.3 STV0681 Contents 0 Leave blank 1 VidLo, The low byte of the Vendor ID 2 VidHi, The high byte of the Vendor ID 3 PidLo, The low byte of the Product ID 4 PidHi, The high byte of the Product ID 5 Max Power (in units of 0.5mA) 6 Max Power with audio playback enabled (in units of 0.5mA) 7 Auto powerdown time Hi byte (in units of 256ms) 8 Auto powerdown time Lo byte (in units of 10ms) 9 Mode button press time Hi byte (in units of 256ms) 10 Mode button presss time Lo byte (in units of 10ms) 11 50Hz/60Hz flicker free selection 0 = board link (GPIO3) , 1 = 50Hz, 2 = 60Hz 12 Number of self-timer beeps 13 CheckSum - low byte of sum of EEPROM locations 1 to 12 inclusive. 20 Length of Manufacturer String 21-54 (max) Manufacturer String (ASCII codes) 55 Length of Product String 56-89 (max) Product String (ASCII codes) 90 Length of Interface0 String 91-127 (max) Interface 0 String (ASCII codes) Programming the EEPROM There is no facility to program the EEPROM using the STV0681 itself and so the device must be programmed before fitting it to the PCB. 28/44 ADCS 7283313C STV0681 6 Software support 6.1 General features Software support The chipset is a dual-mode camera, i.e. stills and video, and is supported by a range of demonstration software, standard drivers, and software development options. PC Driver software is available to support both USB and RS232 interfaces. Drivers are available for TWAIN, WIA, Video for Windows (VfW) and DirectShow (DS) depending on the Operating System as listed below: Win98/Win98SE/WinME - VfW and TWAIN Win2k - DS, VfW and TWAIN WinXP - DS, VfW, WIA and TWAIN Mac Quicktime drivers and a Photoshop stills plug in for MacOS 8.6/9.0/9.1/9.2 are supported. The driver will also run under MacOS X in Classic Mode. Example software applications (PC only) are provided to create. AVI video files from untethered continuous capture of images (AVICreator), to upload still images and recorded sounds (LCDCdemo) and to download.WAV files from the PC to the camera (CustomSound). In each case, PC source code is provided to assist in OEM software development using the SDK. ST colour processing and defect detection/correction software runs on the host and is supplied under licence agreement as part of all host software/drivers/SDK 6.1.1 Still image upload This is available through demonstration software, OEM custom software, or using standard TWAIN applications. Features include: Fast upload through USB, or upload through RS232. Colour display of image thumbnails for picture selection. Download of full image once selected by user software. Automatic detection and correction of sensor defects Colour processing of full image, using the ST colour process The above features also apply to "AVI Creator" or any OEM custom software for AVI video creation at part of pictures taken while un-tethered, since this is essentially a "stills" function. 6.1.2 Streaming video (only while tethered to USB) This is available through demonstration software, or using standard VfW applications. Features include: Streaming video through standard VfW driver Automatic detection and correction of sensor defects Colour processing of full image, using the ST colour process ADCS 7283313C 29/44 Software support 6.2 STV0681 Software installation The following software support is only available to OEMs. Access to the latest installation files is possible through a password-protected web page, contact ST for details. The installation files are for the following: Drivers (always check the Web site for latest driver version). EVK software, i.e. LCDCdemo.exe and AVIcreator.exe, G2Video.exe, and CTItest2.exe SDK installation: source code for sample applications, and documentation 6.2.1 Driver support available Table 5: Driver choices RS232 USB Microsoft Windows: Microsoft Windows: PC Operating system Win9x, WinNT4, Win2k, Windows Millennium Windows XP Win98 and Win2k only, Windows millenium Windows XP Mac OS N/A 8.6, 9.0, 9.1, 9.2 Interface type: 6.2.2 EVK software Note: The following is also supplied with evaluation kits/demonstration units, but all the following software is only for demonstration purposes and should NOT be supplied as an end-user product. However, application-level source code (i.e. not driver/colour processing source) for LCDCdemo.exe, AVI creator, and CTItest.exe is available as part of the SDK, which allows similar applications to be built by the software developer: 6.2.3 1 Simple demonstration software LCDCdemo.exe for uploading thumbnails and images. 2 AVIcreator.exe software for uploading continuous images for creating `movie' clips. 3 G2Video.exe is a VfW application which shows streaming video while tethered to USB and allows creation of.AVI video clips. 4 CTItest.exe is only for debugging purposes, for software developers using the SDK Software Development Kit (SDK) and source code A software development kit allows the OEM to develop a custom application which calls the same range of drivers as listed in Section 6.2.1, hence allowing the OEM application to perform picture download, thumbnail display, and colour processing using the ST colour process. Inclusion of source code for the applications listed in Section 6.2.2 allows the software developer to use these as the basis for their own application. The SDK is supplied by ST as a 32-bit DLL format, running on Microsoft Windows 98/Win2KTM, and accessed through a documented software interface. Development requires Microsoft Visual Studio Version 6 or later. This provides the basis for developing a custom software application for stills. Note: 30/44 Source code for PC Drivers, Defect Correction and Colour Processing algorithms are not available. ADCS 7283313C STV0681 Detailed Chipset Specifications 7 Detailed Chipset Specifications 7.1 Typical camera specifications The following data assumes that the camera has been built according to the ST Reference Design. Dual USB or battery power supply is only possible when the required power switching hardware is included. Figures are approximate and depend on actual components sources. Table 6: Typical camera specifications Supply voltage 4.1-6V (when powered from battery or USB) Operating temperature range 0oC - 40oC Max. RS232 cable length supported 2m CIF output 352 x 288 pixels QCIF output 176 x 144 pixels VGA output 640 x 480 pixels QVGA output 320 x 240 pixels SDRAM storage and image upload format Raw Bayer PC driver output format Colour RGB bitmap Table 7: Approximate shutter speeds 7.2 Sensor resolution Min. Max CIF 8 s 44 ms VGA 8 s 66 ms Absolute maximum ratings Table 8: STV0681 absolute maximum ratings Parameter Range Units Ambient temperature 0 to 40 C Storage temperature -50 to 150 C 0-VDD V Voltage on USB D+/D- ADCS 7283313C 31/44 Detailed Chipset Specifications 7.3 STV0681 STV0681 specifications Table 9: STV0681 specifications Parameter Supply voltage Min. Typ. Max. Units 3.0 3.3 3.6 V 18 - mA 10 - A Current consumption (normal operation) Stand-by current consumption - Package 100TQFP (14x14x1.4) Exposure control 7.4 1 000 000: 1 USB specifications Table 10: STV0681 USB specifications Parameter Description Min. Typ. Max. Units 3.0 3.3 3.6 V 0.8 V VDD Power Supply VILU USB differential pad D+/D- input low VIHU USB differential pad D+/D- input high (driven) 2.0 VIHUZ USB differential pad D+/D- input high (floating) 2.7 VDI USB differential pad D+/D- input sensitivity 0.2 VCM USB differential pad D+/D- common mode voltage 0.8 VOLU USB differential pad D+/D- output low voltage VOHU Notes V 3.6 V V 1 2.5 V 2 0.0 0.3 V USB differential pad D+/D- output high voltage 2.8 3.6 V VCRS USB differential pad D+/D- output signal cross over voltage 1.51 1.79 V RPU USB differential pad D+/D- pull up resistor 1.425 1.575 k RPD USB differential pad D+/D- pull-down resistor 14.25 15.75 k TFR Rise Time 4 20 ns TFF Fall Time 4 20 ns TFRFM Differential Rise Time and Fall Time Matching 96 98 % Note 3 ZDRV Driver Output Resistance 30.0 Note 4 24.7 26.6 Note: 1 VDI = |(D+) - (D-)| 2 VCM includes VDI range. 3 TFRFM =(TFR / TFF). 4 ZDRV includes an external resistor of 20 Ohms serial to this transceiver. 32/44 ADCS 7283313C STV0681 7.5 Detailed Chipset Specifications DC characteristics Table 11: STV0681 DC characteristics Parameter Description Min. Typ. Max. Units 0.35 VDD V VII CMOS input low voltage VIH CMOS input high voltage VT+ CMOS schmitt input low to high threshold voltage 2.15 V VT- CMOS schmitt input high to low threshold voltage 1.05 V VT Threshold point 1.65 V VOH Output high voltage VOL Output low voltage 7.6 0.65 VDD V 2.4 V 0.4 V PLL characteristics Table 12: STV0681 PLL characteristics Parameter Conditions Peak to peak jitters @VCOfreq = 240MHz - 312MHz Duty cycle Operating voltage range Symbol Min. Typ. Max. Unit -- -- -- 500 ps -- 45 50 55 % VDD 3 3.3 3.6 V Input low voltage VDD=3.3V VIL - 0.8 V Input high voltage VDD=3.3V VIH 0.7VDD VDD V Ready -- -- 0.1 ms Tsr(Fout) -- 0.100+0.1082*CL -- ns Pull in Time + Locking Time Output Slew Rate 7.7 CL: Output Load (pF) Crystal tolerance Table 13: STV0681 crystal tolerance Parameter Min. Crystal specification Typ. Max. Units 50/50/10/30 (12mhz Fundamental) Crystal frequency 12.000 MHz Frequency tolerance 50 ppm Temperature stability 50 ppm Operating temperature -10 ADCS 7283313C C 33/44 Detailed Chipset Specifications 7.8 STV0681 Typical current consumption of complete camera The following data assumes that the camera has been built according to reference design referred to in Chapter 10. Figures are approximate and depend on actual components sources - see notes. The sensor operates at @ 3.3V DC Table 14: Current consumption, complete STV0681+VV6411/6501 camera Mode Typical Comments 'Snapshot'/Continuous/ Self timer mode (while un-tethered) 60mA Assuming appropriate hardware included, power is sourced from PC while USB connected. 'Snapshot'/Continuous/ Self timer mode (while tethered to PC) 60mA While playing back audio sounds through speaker 90mA Standby mode (when NOT connected to USB) Assuming 8 speaker as explained in application note AN1310 Approx. 270A + SDRAM self-refresh current (see Note 2) + sensor suspend mode current Total current in this mode equals: STV0681 standby current consumption (see Note 1) + SDRAM self-refresh current (see Note 2) + peripheral circuitry (approx. 50A). + Sensor suspend mode current PC Suspend mode Approx. 300A + SDRAM (when connected to USB): self-refresh current (see Note 2) + sensor Sensor SUSPEND pin suspend mode current asserted Standby mode Total current in this mode equals: STV0681 Standby current consumption (see Note 1) +SDRAM self-refresh current (see Note 2) + peripheral circuitry (approx. 50A) + 200A, based on 1.5k pull-up in camera and 15k pulldown in PC. + Sensor suspend mode current Approx. 270A + SDRAM self-refresh current (see Note 2) Total current in this mode equals: Approx. 100A + SDRAM (when connected to USB): self-refresh current sensor powered off using (see Note 2) FET (see Note 3) Total current in this mode equals: (when not connected to USB): sensor powered off using FET (see Note 3) PC Suspend mode STV0681 Standby current consumption (see Note 1) +SDRAM self-refresh current (see Note 2) + peripheral circuitry (approx. 50A). STV0681 Standby current consumption (see Note 1) +SDRAM self-refresh current (see Note 2) + peripheral circuitry (approx. 50A). Note: 1 See Table 9 from Section 7.3 2 From limited evaluation, typical self-refresh current figures of certain SDRAM chips are well below manufacturers' maximum specification, e.g. 100-250A. 3 Option included in reference design to save current consumption, which can increase battery life and increase chances of meeting USB suspend mode compliance requirements. 34/44 ADCS 7283313C STV0681 STV0681 pin description 8 STV0681 pin description 8.1 STV0681 pinout AMP_EN FL_TRIG SENSPWR SENSRST SENS_CLK QCLK SD[0] SD[1] SD[2] SD[3] SDA SCL RXD 67 66 65 64 63 62 61 60 59 58 57 56 55 PLL_AVDD LED 68 PLL_AVSS VDD 69 51 VSS 70 PLL_GVSS COMP_OUT 71 52 50/60 72 TXD FLASH_EN 73 53 SHUTTER 74 54 MODE 75 Figure 6: STV0681 pinout diagram AUD_VSS 76 50 RESET LO_BAT_REF 77 49 XOUT LO_BAT 78 48 XIN DACRES 79 47 TEST2 DACOUT 80 46 TEST1 AUD_VDD 81 45 TEST0 PIEZO 82 44 USB- LCD_COM 83 43 USB+ VSS 84 42 USB_DET VDD 85 41 AD_4 LCD2_6 86 40 AD_3 LCD2_5 87 39 VDD LCD2_4 88 38 VSS LCD2_3 89 37 AD_5 LCD2_2 90 36 AD_2 LCD2_1 91 35 AD_6 LCD2_0 92 34 AD_1 LCD1_6 93 33 AD_7 LCD1_5 94 32 AD_0 LCD1_4 95 31 AD_8 LCD1_3 96 30 AD_10 LCD1_2 97 29 AD_9 LCD1_1 98 28 AD_13 LCD1_0 99 27 AD_11 100 26 AD_12 25 CS 24 CKE 23 22 DCLK RAS 21 CAS 20 16 DQ_7 DQ_8 DQML DQMU 15 DQ_9 19 14 WE 12 VSS DQ_10 DQ_6 18 11 VDD ADCS 7283313C 17 10 DQ_5 13 9 8 DQ_4 DQ_11 7 6 DQ_3 DQ_12 5 4 3 2 1 TQFP100 DQ_15 DQ_1 DQ_14 DQ_2 DQ_13 DQ_0 STV0681 35/44 STV0681 pin description 8.2 STV0681 STV0681 pin description Table 15: STV0681 pin listing Pin no. Signal Type Description drive Sensor Interface 65 SENSPWR Output, active high Power-up Sensor 2mA (SL) 64 SENSRST Output, active low Reset Sensor 2mA (SL) 56 SCL Input/Output (OD,T) Sensor serial interface 4mA (SL) 57 SDA Input/Output (OD,T) Sensor serial interface 4mA (SL) 58 SD[3] Input (S,T) Sensor data 59 SD[2] Input (S,T) Sensor data 60 SD[1] Input (S,T) Sensor data 61 SD[0] Input (S,T) Sensor data 62 QCLK Input (S,T) Qualification clock from sensor 63 SENS_CLK Output Clock output to sensor 4mA I/O and Camera Control pins 75 MODE Debounced input Push button (Wake-up/Mode) 74 SHUTTER Debounced input Push button (Shutter/Confirm) 73 FLASH_EN Input Enable Flash Exposure (Active High) 72 50/60_SEL Input S elect between 50Hz and 60Hz lighting 71 COMP_OUT Input Output from Audio Comparator 68 LED Output (OD) LED indicator 8mA (SL) 67 AMP_ENABLE Output, active low (OD) Audio Amplifier Enable 8mA (SL) 66 FL_TRIG Output, active low (OD) Flashgun trigger 8mA (SL) Input (S) Detect Power source from USB. USB Interface 42 USBDET (For camera with RS232 only, this pin should be tied to GND) 43 DATA+ Input/Output USB bus (For camera with RS232 only, this pin should be connected to test points to allow for USB production test (lens focussing)) 44 DATA- Input/Output USB bus. (For camera with RS232 only, this pin should be connected to test points to allow for USB production test (lens focussing)) 36/44 ADCS 7283313C USB specific ation V1.1 complia nt I/O STV0681 STV0681 pin description Table 15: STV0681 pin listing Pin no. Signal Type Description drive RS232 Interface 54 TXD Output Serial data transmit (For camera with USB only, this pin should be tied to RXD) 55 RXD Input (S) 4mA (SL) Serial data receive (For camera with USB only, this pin should be tied to TXD) STV0680B Master Clocks and Reset 48 XIN Input Quartz Crystal IN 49 XOUT Output Quartz Crystal OUT 50 RESET Input (S) Active (LOW) STV0680B reset System Memory (SDRAM) Interface 20 DQMU Output Data input/output mask for dram_DQ[15:8] 2mA (SL) 22 DCLK Output Clock: all SDRAM input signals are sampled on the positive edge 4mA (SL) 24 CKE Output Clock enable: activates (HIGH) and deactivates (LOW) the SDRAM CLK signal 2mA (SL) 32 AD0 Output SDRAM address A0 2mA (SL) 34 AD1 Output SDRAM address A1 2mA (SL) 36 AD2 Output SDRAM address A2 2mA (SL) 40 AD3 Output SDRAM address A3 2mA (SL) 41 AD4 Output SDRAM address A4 2mA (SL) 37 AD5 Output SDRAM address A5 2mA (SL) 35 AD6 Output SDRAM address A6 2mA (SL) 33 AD7 Output SDRAM address A7 2mA (SL) 31 AD8 Output SDRAM address A8 2mA (SL) 29 AD9 Output SDRAM address A9 2mA (SL) 30 AD10 Output SDRAM address A10 2mA (SL) 27 AD11 Output SDRAM address A11 for 64M SDRAM or BA for 16M SDRAM 2mA (SL) 26 AD12 Output SDRAM address A12, BA0 for 64M SDRAM, unused on 16M 2mA (SL) ADCS 7283313C 37/44 STV0681 pin description STV0681 Table 15: STV0681 pin listing Pin no. 38/44 Signal Type Description drive 28 AD13 Output SDRAM address A13, BA1 for 64M SDRAM, unused on 16M 2mA (SL) 25 CS Output, active low Chip select: enables (registered LOW) and disables (registered HIGH) the SDRAM command decoder. 2mA (SL) 23 RAS Output, active low SDRAM row address strobe command 2mA (SL) 21 CAS Output, active low SDRAM column address strobe command 2mA (SL) 19 WE Output, active low SDRAM write enable command 2mA (SL) 18 DQML Output Data input/output mask for dram_DQ[7:0] 2mA (SL) 100 DQ0 Input/Output SDRAM Data Bus 2mA (SL) 2 DQ1 Input/Output SDRAM Data Bus 2mA (SL) 4 DQ2 Input/Output SDRAM Data Bus 2mA (SL) 6 DQ3 Input/Output SDRAM Data Bus 2mA (SL) 8 DQ4 Input/Output SDRAM Data Bus 2mA (SL) 10 DQ5 Input/Output SDRAM Data Bus 2mA (SL) 14 DQ6 Input/Output SDRAM Data Bus 2mA (SL) 16 DQ7 Input/Output SDRAM Data Bus 2mA (SL) 17 DQ8 Input/Output SDRAM Data bus 2mA (SL) 15 DQ9 Input/Output SDRAM Data bus 2mA (SL) 13 DQ10 Input/Output SDRAM Data bus 2mA (SL) 9 DQ11 Input/Output SDRAM Data Bus 2mA (SL) 7 DQ12 Input/Output SDRAM Data Bus 2mA (SL) 5 DQ13 Input/Output SDRAM Data Bus 2mA (SL) 3 DQ14 Input/Output SDRAM Data Bus 2mA (SL) 1 DQ15 Input/Output SDRAM Data Bus 2mA (SL) ADCS 7283313C STV0681 STV0681 pin description Table 15: STV0681 pin listing Pin no. Signal Type Description drive LCD Interface 83 LCDCOM Output LCD Common 4mA (SL) 93 LCD1_6 Output LCD digit 1 segment G 2mA (SL) 94 LCD1_5 Output LCD digit 1 segment F 2mA (SL) 95 LCD1_4 Output LCD digit 1 segment E 2mA (SL) 96 LCD1_3 Output LCD digit 1 segment D 2mA (SL) 97 LCD1_2 Output LCD digit 1 segment C 2mA (SL) 98 LCD1_1 Output LCD digit 1 segment B 2mA (SL) 99 LCD1_0 Output LCD digit 1 segment A 2mA (SL) 86 LCD2_6 Output LCD digit 2 segment G 2mA (SL) 87 LCD2_5 Output LCD digit 2 segment F 2mA (SL) 88 LCD2_4 Output LCD digit 2segment E 2mA (SL) 89 LCD2_3 Output LCD digit 2segment D 2mA (SL) 90 LCD2_2 Output LCD digit 2segment C 2mA (SL) 91 LCD2_1 Output LCD digit 2 segment B 2mA (SL) 92 LCD2_0 Output LCD digit 2 segment A 2mA (SL) Output Direct connection to piezo buzzer 8mA (SL) Piezo Interface 82 PIEZO Battery Level Comparator Interface 78 LO_BAT Input (A) Battery level comparator input. The voltage on low_bat is compared to the reference to determine the battery status 77 LO_BAT_REF Input (A) 1.22V battery level comparator reference input ADCS 7283313C 39/44 STV0681 pin description STV0681 Table 15: STV0681 pin listing Pin no. Signal Type Description drive Power and Ground 12, 38, 70, 84 DVSS Power pin Digital Ground 11, 39, 69, 85 DVDD Power pin Digital Power 76 AUD_VSS Power pin Audio DAC Ground. Requires clean supply. 81 AUD_VDD Power pin Audio DAC Power. Requires clean supply. 53 PLLGVSS Power pin PLL Guard Ground 51 PLLAVDD Power pin PLL Analog Power 52 PLLAVSS Power pin PLL Analog Ground Non-user pins 45 TEST0 Input Non-user pin - connect to 3V3 46 TEST1 Input Non-user pin - connect to 3V3 47 TEST2 Input Non-user pin - connect to 3V3 79 DACRES I(A) DAC bias amplifier reference input. 80 DACOUT O (A) 8-bit DAC current source output. Key SL slew rate limited output OD open drain output S Schmidt input A analogue input/output T 5V tolerant pad (these pads do not have diode protection) Note: 1 Where the I/O pad type is not explicitly defined, assume CMOS. 40/44 ADCS 7283313C 0-10mA STV0681 9 STV0681 package mechanical data STV0681 package mechanical data mm inch Dim. Min. Typ. Max. A Min. Typ. 1.60 A1 0.05 A2 1.35 B 0.17 C 0.09 0.063 0.15 0.002 0.006 1.40 1.45 0.053 0.055 0.057 0.22 0.27 0.007 0.009 0.011 0.20 0.003 0.008 D 16.00 0.630 D1 14.00 0.551 D3 12.00 0.472 e 0.50 0.019 E 16.00 0.630 E1 14.00 0.551 E3 12.00 0.472 L 0.45 L1 Max. 0.60 0.75 0.018 1.00 K 0.024 0.030 TQFP100 0.039 3 3.5 (min.), 7 (max.) D A D1 A2 D3 A1 75 51 76 50 0.076mm .003 inch Seating Plane e E3 E1 E B Pin 1 identification 100 26 1 25 K TQFP100M C L L1 ADCS 7283313C 41/44 Evaluation Kit (EVK) 10 STV0681 Evaluation Kit (EVK) STMicroelectronics can supply an Evaluation Kit for initial evaluation and design-in. The EVK includes an STV0681 Motherboard PCB and two lensed sensor daughter boards (CIF and VGA). Additional motherboards and daughter boards may be ordered separately. The EVK PCB includes SDRAM memory, connectors, numeric LCD display, battery holder, push buttons/switches, audio record and playback circuitry, flashgun interface circuitry, and a flashgun hotshoe connector (for use of a standard camera flashgun). Optional PCB links enable alternate functionality, and demonstration software is included, allowing for tethered video, upload to the PC of pictures, sounds, and AVI movie clips, and download to the camera of custom sounds. A reference design manual, giving the camera designer everything required for standard features and audio record/playback is available, including schematics, explanatory notes, parts list, and layout advice. 10.1 Ordering details Table 16: Ordering details for STV0681 + VV6411/6501 Evaluation Kits Description Part number STV0681 companion processor STV0681 VV6411 CIF color CMOS sensor (36LCC package) VV6411C036 VV6501 VGA color CMOS sensor (36LCC package) VV6501C001 Complete Evaluation Kit STV0681 complete Evaluation Kit (includes STV-681-M01, STV-6411C-D01 and STV6501C-D01) STV-681-E01 Additional EVK Components Evaluation Kit Motherboard Note: 42/44 STV-681-M01 Sensor Daughter Board with VV6411 STV-6411C-D01 Sensor Daughter Board with VV6501 STV-6501C-D01 All Evaluation Kits include hardware and software support for Audio, Custom sounds, and Flashgun features. ADCS 7283313C STV0681 10.2 Evaluation Kit (EVK) Technical support Technical support information, such as datasheets, software downloads,etc, for products of the STMicroelectronics Imaging Division can be found at www.st.com (click on Imaging products) General sales/technical enquiries can be directed to regional email contacts: asiapacific.imaging@st.com centraleurope.imaging@st.com france.imaging@st.com japan.imaging@st.com nordic.imaging@st.com southerneurope.imaging@st.com ukeire.imaging@st.com usa.imaging@st.com ADCS 7283313C 43/44 STV0681 Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result 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 registered trademark of STMicroelectronics (c) 2003 STMicroelectronics - All Rights Reserved STMicroelectronics GROUP OF COMPANIES Australia - Brazil - Canada - China - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - U.S.A. www.st.com ADCS 7283313C 44/44