Datasheet
Table Of Contents
- 1/3.2-Inch System-On-A-Chip (SOC) CMOS Digital Image Sensor
- Features
- Applications
- Ordering Information
- General Description
- Feature Overview
- Typical Connection
- Ballout and Interface
- Architecture Overview
- Registers and Variables
- Registers
- Registers
- IFP Registers, Page 1
- IFP Registers, Page 2
- JPEG Indirect Registers
- Table 8: JPEG Indirect Registers (See Registers 30 and 31, Page 2)
- Firmware Driver Variables
- Table 9: Drivers IDs
- Table 10: Driver Variables-Monitor Driver (ID = 0)
- Table 11: Driver Variables-Sequencer Driver (ID = 1)
- Table 12: Driver Variables-Auto Exposure Driver (ID = 2)
- Table 13: Driver Variables-Auto White Balance (ID = 3)
- Table 14: Driver Variables-Flicker Detection Driver (ID = 4)
- Table 15: Driver Variables-Auto Focus Driver (ID = 5)
- Table 16: Driver Variables-Auto Focus Mechanics Driver (ID = 6)
- Table 17: Driver Variables-Mode/Context Driver (ID = 7)
- Table 18: Driver Variables-JPEG Driver (ID = 9)
- Table 19: Driver Variables-Histogram Driver (ID = 11)
- MCU Register List and Memory Map
- JPEG Indirect Registers
- Output Format and Timing
- Sensor Core
- Feature Description
- PLL Generated Master Clock
- PLL Setup
- Window Control
- Pixel Border
- Readout Modes
- Figure 20: 6 Pixels in Normal and Column Mirror Readout Modes
- Figure 21: 6 Rows in Normal and Row Mirror Readout Modes
- Table 30: Skip Values
- Figure 22: 8 Pixels in Normal and Column Skip 2x Readout Modes
- Figure 23: 16 Pixels in Normal and Column Skip 4x Readout Modes
- Figure 24: 32 Pixels in Normal and Column Skip 8x Readout Modes
- Figure 25: 64 Pixels in Normal and Column Skip 16x Readout Modes
- Table 31: Row Addressing
- Table 32: Column Addressing
- Frame Rate Control
- Context Switching
- Integration Time
- Flash STROBE
- Global Reset
- Analog Signal Path
- Analog Inputs AIN1-AIN3
- Firmware
- Firmware
- Start-Up and Usage
- General Purpose I/O
- Introduction
- GPIO Output Control Overview
- Waveform Programming
- Notification Signals
- Digital and Analog Inputs
- GPIO Software Drivers
- Auto Focus
- Figure 42: Search for Best Focus
- Figure 43: Scene with Two Potential Focus Targets at Different Distances from Camera
- Figure 44: Dependence of Luminance-Normalized Local Sharpness Scores on Lens Position
- Figure 45: Example of Position Weight Histogram Created by AF Driver
- Figure 46: Auto Focus Windows
- Figure 47: Computation of Sharpness Scores and Luminance Average for an AF Window
- Table 41: Examples of AF Filters that can be Programmed into the MT9D111
- Spectral Characteristics
- Electrical Specifications
- Packaging
- Appendix A: Two-Wire Serial Register Interface
- Protocol
- Sequence
- Bus Idle State
- Start Bit
- Stop Bit
- Slave Address
- Data Bit Transfer
- Acknowledge Bit
- No-Acknowledge Bit
- Page Register
- Sample Write and Read Sequences
- Figure 52: WRITE Timing to R0x09:0-Value 0x0284
- Figure 53: READ Timing from R0x09:0; Returned Value 0x0284
- Figure 54: WRITE Timing to R0x09:0-Value 0x0284
- Figure 55: READ Timing from R0x09:0; Returned Value 0x0284
- Figure 56: Two-Wire Serial Bus Timing Parameters
- Table 46: Two-wire Serial Bus Characteristics
- Revision History
PDF: 09005aef8202ec2e/Source: 09005aef8202ebf7 Micron Technology, Inc., reserves the right to change products or specifications without notice.
MT9D111__7_REV5.fm - Rev. B 2/06 EN
172 ©2004 Micron Technology, Inc. All rights reserved.
MT9D111 - 1/3.2-Inch 2-Megapixel SOC Digital Image Sensor
General Purpose I/O
Micron Confidential and Proprietary
Figure 45 shows an example of position weight histogram created by AF driver to select
best lens position. This histogram corresponds to the situation depicted in Figure 43 and
Figure 44. After scanning 10 lens positions numbered 0 through 9, the AF driver deter-
mined that Y-normalized sharpness scores from the upper 8 of 16 AF windows (W11
through W24) peak at lens position 0, while the scores from the lower 8 windows (W31
through W44) at lens position 5. For each of the 2 positions, the AF driver summed pre-
programmed weights of the AF windows being clearly in focus at that position, thus
obtaining 2 position weights. These weights would have been equal if not for very weak
dependence of sharpness scores from windows W31, W32, and W33 on lens position.
Finding peak-to-trough variability of these scores lower than pre-programmed thresh-
old, the AF driver concluded that for W31, W32, and W33 no lens position was clearly
optimal, and therefore the weights of these windows should not be added to the weight
of position 5. This gave position 0 a higher weight and decided its selection as the best
position. Note: Unequal weighting of the AF windows, increasing the importance to the
4 central ones.
Evaluation of Image Sharpness
Information on image sharpness that the AF algorithm uses to find best focus position is
provided by focus measurement engine (FME), a programmable edge-filtering module
in Image Flow Processor (IFP). The FME convolves 2 pre-programmed 1-dimensional
digital filters with luminance (Y) data that it receives row by row from the color interpo-
lation module. For each interpolated frame, the convolution of the AF filters with Y pro-
duces up to 32 local sharpness scores reflecting the density and sharpness of vertical
edges in up to 16 user-selected areas of the frame. The FME outputs these sharpness
scores once every frame to IFP registers R[77:84]:2.and R[87:94]:2 (where "[:]" denotes a
range of register numbers and ":2" means page 2). In addition, the FME calculates and
writes to IFP registers R[67:74]:2 up to 16 local averages of Y that can be used to normal-
ize the sharpness scores and thus make them nearly independent of scene brightness.
Since each sharpness score and Y average has only 8 register bits allocated for it, care
should be taken in programming the AF filters to ensure that the sharpness scores they
produce never exceed 255. Otherwise, the content of registers R[77:84]:2.and R[87:94]:2
may not match actual sharpness scores computed by the FME.
The exact method of computing the sharpness scores is as follows. Sixteen equal size
rectangular windows forming a 4 x 4 grid are superimposed on each color-interpolated
frame. The size of these AF windows and the position of the upper left corner of the grid
are programmable (via IFP registers [R64:66]:2). The grid does not have to be entirely
inside the frame. For example, it is perfectly legal to cover most of the frame with a 3x3
portion of the grid and place the remaining 7 AF windows almost entirely outside of it, as
shown in Figure 46. Whenever a portion of an AF window is inside the frame, the FME
calculates 2 sharpness scores and average Y for this portion. However, it can write these
results to registers only if the bottom boundary of the window is partly or fully inside the
frame. Placing this boundary entirely outside the frame makes the window inactive, in
the sense that the FME stops outputting new sharpness scores and Y averages for it.
Although no AF window having some part of the bottom boundary inside the frame can
be deactivated in the same sense, any AF window can be made irrelevant in the AF algo-
rithm by giving it a weight of zero.
Each frame is read out from the sensor core and processed by the IFP row by row. Every
rectangular block of pixels in the frame can be considered as a separate, smaller frame,
also read out and processed row by row. Thinking this way about the AF windows, refer
to a portion of a frame row belonging to any AF window as a window row. As the color
interpolation module processes each window row and makes Y values of its successive
pixels available to the FME, the FME convolves those values with the 2 AF filters. The AF










