Tuesday, December 7, 2010

Embedded system CMOS image sensor interface technology (1)

Abstract: the presented the CMOS (complementary metal oxide semiconductor) image sensor in embedded system interface technology, driven by designing software so that the embedded processor can control CMOS image sensor image data acquisition.

And on CMOS image sensor acquisition data interpolation and auto white balance. This interface module has been successfully applied to a 2D barcode reader for image acquisition module, and achieved good results.

Keywords: CMOS image sensor; embedded Linux; bus; embedded systems

Background

Current digital camera technology, mainly in two ways: one is using CCD (capacitor-coupled device) image sensor, another is the use of CMOS (complementary metal oxide semiconductor) image sensor.

CCD image sensor has read low noise, wide dynamic range, high response sensitivity.

But the CCD technology difficult and mainstream CMOS technology integration on the same chip. Thus CCD image sensor with high volume, low power consumption.

CMOS image sensor is a recent development faster type image sensor, as the use of the CMOS technology, you can set the pixel array and peripheral support circuits (such as image sensor core, single-clock and all the temporal logic, programmable function and ADC) integrated on the same chip.

Therefore compared with CCD, CMOS image sensors to the entire image system integration in a chip, is of small size, light weight, low power consumption, programming convenience, easy-to-control, etc. For handheld devices, volume and power consumption is for software and hardware design-time focus, CMOS image sensor used in handheld devices which will have broad prospects.

The text will have embedded system design CMOS image sensor image acquisition device hardware interface technology and software-driven research.

System hardware design

Embedded system hardware platform choices

Motorola MC9328MX1 ARM920T based processor embedded processor cores can work at up to 200MHz gigahertz.

It integrates a number of modules that support interface module, GPIO (General Purpose I/O) interface module, clock module (CGM, Clock Generation Module) for various peripherals provides flexible interface control function. Motorola MC9328MX1 processors built-in CSI (CMOSSensor Interface) module provides timing control module, you can adapt to different requirements of CMOS image sensors.

COMS image sensor selection

ICM105C IC Media company is a single-chip digital color images, use 1/4 inch optical system.

It built a 640480 (650490 physical pixels) sensor array, DAC and correlated double sampler circuit. Its control part using I2C bus, you only need an I2C bus slave address of the internal control and status registers to be set and read. ICM105C output is the Boyer-format image data, the RGB color component can be adjusted by digital gain, you can feedback to embedded processors for color processing or compression.

Interface circuit design

Interface circuit design mainly consider the image sensor of power-driven control circuit of the interface and data output circuit interface.

Use a 3V power supply ICM105C drive, 24MHz clock frequency, output 8-bit data, control part mainly use bus, to guarantee the normal work ICM105C must provide these conditions.

(1) power-driven circuit design.

As CMOS image sensor is power sensitive element, if the power supply is instability will give a great image. ICM105C for supply voltage requirements for 3V, minimum, maximum 3.1V 2.8V and separated digital power and analog power supply. But the main processing Board only provides a single 3V power supply, and the power to provide for the use of primary processing board chip, so you must take the appropriate mechanism to guarantee the stability of the power supply and digital power and analog supply of isolation, while the system of another design goal is small and simplistic. In order to take account of the requirements of the two, power supply design sheds uses complex voltage chips programme, only use the capacitance and inductance to stable power supply voltage and the Elimination of digital and analog power interference between the circuit diagram shown in Figure 1.

  

  

Figure 1 schematic diagram of power-driven

VDD 3V power supply provided by the Board, VCCD, VCCA were provided to ICM105C digital power and analog power, L1, C1, C3 L4, serve to isolate digital power and analog power and filter effects.

Digital and analog also used inductors eliminate interference.

(2) data export interface circuit design.

Motorola MC9328MX1 processors built-in CSI module provides timing control module, this simplifies circuit design, you only need to be 8-bit data and output clock there are row frequency field frequencies, and the pixel clock and CSI to keep the processor module for the correct collection of the data. Specific logical connection relationship as shown in Figure 2.

  

  

Figure 2 ICM105C and primary processing Board of logical connection diagram

Which clock line is from MC9328MX1 enter 24MHz clock signal, CMOS output PCLK is the pixel clock, VS

YNC is field frequency, HSYNC is row frequency, DOUT [0-7] is the output of data. Its timing relationships as shown in Figure 3. DOUT [7: 0] rising edge at the PCLK clock, HSYNC and VSYNC are low level valid. In order to achieve the effect required for time series chip for some PIN correctly initialize the settings. ICM105C pins 37 control data synchronization mode, use a pull-up resistor received a high level, so you can make the sensor output signals HSYNC and VSYNC synchronization.

  

  

Figure 3 the data output timing ICM105C map

The polarity of the HSYNC and VSYNC can also be configured to pin to ground, 46 and 47 such HSYNC and VSYNC are effective at low level.

PIN 14 to clock select signal, the grounding indicated using an external clock, so the internal oscillator input pin 12, 13 can be vacant.

(3) control circuit design.

To make the sensor to work correctly, you must register on-chip internal initialized. The work must be initiated through the sensor I2C interface. ICM105C provides a hardware initialization, if pin 33 in chip startup to high level, then the sensor I2C interface will first work in master mode, and attempts from external serial EEPROM read initialization data. Then, the sensor back to normal working mode from the device. In order to simplify the interface circuit, the direct use of primary processing Board of I2C interface to control sensors, will this PIN to ground to make it work in slave mode, so the circuit EEPROM part can be discarded.

Software driver

CMOS image sensors need embedded system software driver to work properly, and to output the correct image data.

As the end of the embedded system with an embedded Linux operating system, I2C interface driver is already integrated in the operating system itself, an interrupt resource can be used as a resource to an application, the operating system also provides call other resources of interface functions, which greatly facilitates the preparation of the driver. In this design used the Linux system module forms the characters written device driver. The software drivers required to complete two function modules: interface initialization module and receives the output data.

Initialization

(1) CSI module initialization.

According to the data sheet ICM105C chip, CSI's reset signal the need to maintain effective until the constant input voltage greater than two clock cycles, and Figure 4 is a time series chart.

  

  

Figure 4 soft reset signal timing diagrams

Because the primary processing Board is a power began to work, and the driver must ICM105C in processing on the operating system to start work after startup.

Especially the clock signal only if the driver is loaded before starting to cause ICM105C, to reset signal timing effects, you must use a software reset signal, the clock output to the sensor at least two clock cycles remain valid, and then drawing high level so that it is not valid. In the design, the use of the Motorola MC9328MX1 processor GPIO ports to achieve a soft reset signal.

(2) set the clock, initializing I2C interface.

ICM105C need 24MHz clock, Motorola MC9328MX1 processing Board of FSB is 96MHz, hence the need for a quarter of the clock speed. You only need to set the clock module register value guaranteed output 24MHz. I2C bus two signal lines SDA, SCL need to set two pin GPIO, make its use for I2C transmission. You also need to mount the I2C driver for the Linux operating system, write the I2C read and write functions. It is important to note that the value of the I2C address ICM105C as 21H.

(3) initializes the CMOS sensor.

ICM105C internal control and status register via the I2C bus to initialize the CMOS, the initialization sequence (register address, value series) by IC Media companies that initialization is complete, you can receive the data and time series signal.

Receive data

Receive data is the driver in a section that requires coordination of interrupt and DMA transfers, guarantee the right to receive data, and the on error resume correctly.

This part of the software process as shown in Figure 5 [1] [2]

No comments:

Post a Comment