Saturday, November 27, 2010

S3C2410 MBF200 fingerprint sensor and SPI communication

Introduction

As the network technology and communication technology for development, traditional authentication technology for information security ' becoming some of the performance.

Due to the physical characteristics of unique and stability, people began to turn a biometric technology, such as fingerprint, Iris, Palm-shaped DNA identification, etc. Of the many features of recognition, fingerprint capture device because of its small size, low power consumption, good stability, low probability of false positives, but people of all ages. Fingerprint sensor is the fingerprint capture device in core devices, in this Fujitsu MBF200 company. It is an advanced solid-state fingerprint sensor chip, with high-performance, low power consumption, low cost, easy interface. This allows for embedded system for data transfer easier. Samsung S3C2410 is launched the ARM920T core microprocessor, primarily intended for handheld devices, and high performance, low power application, and on-chip integrates rich components, to extend it.

1 the structure and characteristics of MBF200 introduced

MBF200 for embedded system design of high performance, low power consumption of the fingerprint sensor.

The sensing range is a 1.28 cm× 1.50 Cm, with 256 × 300 sensor array and 500 dpi resolution, integrated 8-bit A/D converters, voltage 3.3 ~ 5 V, and fingerprint auto detect feature. Provides 3 types of bus interface: 8-bit microprocessor bus interface (MCU), serial peripheral interface (SPI) and integrated USB full speed interface. Given that the interface is simple, easy and takes up less I/O, this article uses the SPI interface.

MBF200 internal structure as shown in Figure 1.

Which 256 × 300 sensor array is used to produce induction voltage; function registers for on-chip for operation control; control circuit for sensor and external interface circuit of control, are responsible for the data read and write; address index registers and data registers are used on feature register address selection and read/write; sample-and-hold and A/D conversion circuit used for sensor array voltage produced by the sample. In addition, multiple-frequency oscillation circuits used to provide the clock chip.

MBF200 total 19 registers, on chip read/write operations are actually on the register of operations, so understand registers function learn to use the chip.

Since this paper uses a serial peripheral interface (SPI) from operating mode, where only some of the key used to register.

(1) CTRLA (control register A)

Control registers A functional specification are listed in table 1.

Writes the start image conversion, register, read the register to obtain A/D conversion result.

GETSUB, GETIMG and GETROW three selected the corresponding image access mode, and initialize the A/D converter conversion sequence. ANISEL bit identifies A/D conversion sources. Reset GETSUB bit is 1, the start capture by RAH, RAL, CAL, REH, REL, CEL determine the graph area of the rectangle. Reset GETIMG bit is 1, began to capture the entire image regardless of service registers. Reset the GETROW bit is 1, the start capture by RAH, RAL determine row cell data. To GETSUB, GETIMG and GETROW in any one write one "1", will abandon the current corresponding to the mode of the image acquisition and start of the new model of image acquisition, and 3 bits each time only 1 bit is reset to 1. If this 3 digit in more than one bit is reset to 1, then the image conversion will not start. When was placed into l GETIMG, MBF200 will complete a series of actions:

① row address is reset to O;

② column address is reset to O;

③ automatic start of the line gets the image;

④ the first pixel of A/D conversion automatically.

When you write to CTRLA "O", apart from clear ANSEL, does not make MBF200 discards the current image.

Read the status can be CTRLA A/D conversion results.

(2) CTRLB (control register B)

Control register B functional specification are listed in table 2.

In the SPI model, used in conjunction with the ENABLE AFDEN, by producing interrupt to wake the microprocessor and start A/D conversion enabled, this can save power.

Control register CTRLB in AUTOINCEN bit is used to set whether to start the auto-increment column address register value. When this bit is set to 1, if a pixel of A/d conversion values are read, the column addresses automatically increase, while the next pixel of A/D conversion automatically. Once a row to the last pixel of a grayscale values are read, the row address automatically increase, while the rows of the first pixel of A/D conversion automatically.

(3) ICR interrupt control register

This register main control fingerprint sensor 2 interrupt sources, interrupt request O and finger detection interrupt corresponds to the interrupt request 1 and external interrupt pin EXTINT corresponds.

Your details please refer to the references.

2 hardware interface design

2.1 MBF200 SPI interface characteristics

In the SPI from mode, the sensor support

Data transport format as SPImode (O, 0) and SPI mode (1, 1). As shown in Figure 2, MBF200 timing requirements are as follows:

① in data transmission, SCS remain low level;

② M O S I line data in SCK of the rising edge is sampling;

③ S C K in idle for high level, but also for low level;

④ M I S O line data in SCK of the falling edge of change;

⑤ the MSB first be removed;

⑥ instruction format is 8-bit instruction majia 8-bit code and an 8-bit data.

2.2 S3C2410 SPI interface features

S3C2410 has 2 serial peripheral interface (SPI), SPI interfaces each with 2 for sending and receiving of 8-bit registers of displacement.

In the SPI communication, data are sent (serial removed) and receive (serial moved into), 8-bit serial data transmission rate by the relevant control register.

SPI interface characteristics: with SPI interface protocol v2.11 compatible; 8 bits for the sending of the shift register; 8-bit shift register for receiving; 8-bit pre-divider logic; query, interrupt and DMA transfer mode.

The S3C2410 SPI configuration-based devices, complete the design of interface for MBF200, hardware connections as shown in Figure 3.

As a master output SPIMOSI0, SPIMISOO as a master of input, used as SPI communication SPICLK0 serial clock. And the S3C2410 supports four different transfer formats, you can guarantee consistency of master-slave device timing.

S3C2410 SPI interface: through the SPI interface, S3C2410 can and MBF, 200 at the same time send and receive 8-bit data.

Serial clock line and two cables sync for shift and data sampling. Data transfer rate from SPPREn register control, modify the value to adjust pre-divider baud rate. When GPGO output is a low level, to write the byte data SPDATn registers, SPI to send and receive operations will start at the same time.

3 software design

Software design for main realization S3C2410 control MBF200 fingerprint sensor type, using the language of the transplantations strong ARM C in the integrated development environment, the main program under ADS1.2 process shown in Figure 4.

Target plate power after the entire collection system initialization operations, including ARM system initialization and MBF200 initialization parameters to configure them. The initialization is complete after detection fingerprint sensor for finger, if there is a disruption in the interrupt service program for fingerprint image acquisition, and save it.

3.1 S3C2410 system initialization

Any one of the first tasks of the system startup are hardware initialization for the subsequent execution of your application ready to some basic hardware environment, including the watchdog and interrupt setting, the CPU speed and clock frequency configuration, the settings related to memory, and SPI communication related register setting.

Part of the code is as follows:

3.2 MBF200 initialization

MBF200 total 19 register, in addition to the SRA, CIDH, CIDL, fingerprint collection must be initialized before.

3.3 fingerprint program design

Fingerprint work interruption by detects finger, write to CTRLA registers 0x02 started the entire area of the fingerprint image data acquisition; row capture time and A/D conversion time is over, read CTRLA registers, namely the current pixel size of the number of 8-bit value.

Every time I read the current pixel values automatically to the next pixel of A/d conversion, the value of the cyclic read CTRLA to specified space you can get a fingerprint image data. Fingerprint procedures process as shown in Figure 5.

Because MBF200 fingerprint sensor with FPS200 structure and acquisition principle similar to the row under FPS200 capture time and A/D conversion time of algorithms that compute row capture time MBF200 TROW and A/D conversion time TA/D.

Calculated as follows:

Where: TS-sensor clock cycle, DT [6: O] to discharge time constant.

Since 2 wait time is too short, so the estimated Ding RROW as

Conclusion

As information security is becoming more and more attention, automated fingerprint identification system will have broader application space.

This article studies the fingerprint recognition system of the front-end-fingerprint module, combined with MBF200 itself was presented with the SPI-S3C2410Letter manner. This way the structure is simple, easy to use, easy to embed.

No comments:

Post a Comment