Vous êtes sur la page 1sur 46

FINGER PRINT BASED ATM SYSTEM

ABSTRACT:
According ancient Greek scripts BIOMETRICS means study of life. Biometrics studies commonly include fingerprint, face, iris, voice, signature, and hand geometry recognition and verification. Many other modalities are in various stages of development and assessment. Among these available biometric traits Finger Print proves to be one of the best traits providing good mismatch ratio and also reliable. Registering the attendances of students have became a hectic work as sometimes their attendance may be registered or missed. To overcome this problem i.e. to get the attendances registered perfectly we are taking the help of two different technologies viz. EMBEDDED SYSTEMS and BIOMETRICS.

INTRODUCTION:
Firstly discussing about Biometrics we are concentrating on Fingerprint scanning. For this we are using FIM 3030N high voltage module as a scanner. This module has in-built ROM, DSP and RAM. In this we can store up to 100 users fingerprints. This module can operate in 2 modes they are Master mode and User mode. We will be using Master mode to register the fingerprints which will be stored in the ROM present on the scanner with a unique id. When this module is interfaced to the microcontroller, we will be using it in user mode. In this mode we will be verifying the scanned images with the stored images. When coming to our application the images of the students will be stored in the module with a unique id. To register their attendance the students have to scan their image which is then verified with the image present in fingerprint module and their attendance is registered for that day.

This scanner is interfaced to 8051 microcontroller through max232 enabling serial communication. By using this controller we will be controlling the scanning process. After the scanning has been completed the result is stored in the microcontroller. By simply pressing a switch we can get the list of absentees for that day. This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac out put of secondary of 230/12V step down transformer.

. 1

Components List
89S52 MCU 16 X 2 LCD Driver Circuit Buzzer Finger Print Module Reset Crystal Oscillator Power supply to all sections Step down T/F Bridge Rectifier Filter Circuit Regulator MAX 232

. 2

. 3

89C51 Micro controller

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4kbytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed insystem or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications

3.2 Software requirements

1.

Embedded C Description of Embedded C

The C programming language is a general purpose programming language that provides code efficiency, elements of structured programming, and a rich set of operators. Its generality combined with its absence of restrictions, makes C a convenient and effective programming solution for a wide variety of software tasks. Many applications can be solved more easily and efficiently with C than with other more specialized languages. Cx51 is not a universal C compiler adapted of the 89C51 target .It is a ground-up implementation dedicated to generating extremely fast and compact for the 89C51 microcontroller.

Cx51 provides you with the flexibility of programming in C and the code efficiency and speed of assembly language. The C language on its own is not capable of performing operations (such as input and output) that would normally require intervention from the operating system. Instead, these capabilities are provided as a part of the standard library .Because these functions are separate from the language itself, C is especially suited for producing code that is portable across a wide number of platforms. Since Cx51 is a cross compiler, some aspects of the C programming language and standard libraries are altered or enhanced to address the peculiarities of an embedded target processor.

. 4

4.1.4 Mother Board The field parameters are monitored by this Microcontroller chip with the help of user written program and generates alert message for LCD display and fault code for remote monitoring end transmission. The Microcontroller Chip has input port for getting fault condition of field parameters and Stop signal through RF Receiver and output port for sending fault code to DTMF Encoder and switching Relay [MCB] for isolating power line from load. INTRODUCTION OF Micro-controller The general definition of a microcontroller is a single chip computer, which refers to the fact that they contain all of the functional sections (cpu, ram, rom, i/o, ports and timers) of a traditionally defined computer on a single integrated circuit. Some experts even describe them as special purpose computers with several qualifying distinctions that separate them from other computers. Microcontrollers are "embedded" inside some other device (often a consumer product) so that they can control the features or actions of the product. Another name for a microcontroller, therefore, is "embedded controller." Microcontrollers are dedicated to one task and run one specific program. The program is stored in rom (read-only memory) and generally does not change. Microcontrollers are often low-power devices. A desktop computer is almost always plugged into a wall socket and might consume 50 watts of electricity. A batteryoperated microcontroller might consume 50 mill watts.

A microcontroller has a dedicated input device and often (but not always) has a small led or lcd display for output. A microcontroller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. A microcontroller is often small and low cost. The components are chosen to minimize size and to be as inexpensive as possible. A microcontroller is often, but not always, ruggedized in some way. The microcontroller controlling a car's engine, for example, has to work in temperature extremes that a normal computer generally cannot handle. A car's microcontroller in Kashmir regions has to work fine in -30 degree F (-34 C) weather, while the same microcontroller in Gujarat region might be operating at 120 degrees F (49 C). When you add the heat naturally generated by the engine, the temperature can go as high as 150 or 180 degrees F (65-80 C) in the engine compartment. On the other hand, a microcontroller embedded inside a vcr hasn't been ruggedized at all. Clearly, the distinction between a computer and a microcontroller is sometimes blurred. Applying these guidelines will, in most cases, clarify the role of a particular device.
. 5

COMPLETE CIRCUIT DIAGRAM [MOTHER BOARD] OF 89C51


30 pF 4 0 V C C

19 XTA

P 0 . 7

A D 7 A D

+ V c c

X 1 2 3 0 A C

D 1 & D 2 R 1 D 3

12 M Hz

L1

3 30 pF +VCC 18 2 XTA 9 L2 P S E N 3 1 0 7 A L P 3 E . 3 7 1 1 E 6 A 9 P 3 R . S 6 T N T 0 T X P 3 1 5 V S S 2 0 2

6 A D

10 MFD/63V

P P 0 1 . . 6 7

P 5 O A R T D 0
4 A D 3 A

8 x 2. 2 K

20K RESET SWITCH R D W R T 1 T 0

8 9 C 5 1

3 8 3 P P 1 0P . .2 6 5. 7 7 3 42 P 8 1 P . 0P 5 .2 4. 6 6 3 P 52 1 7 . P 4 0P .2 5 6 . 3. 5 P

D P 2

O
AR

A T 1 D 1 5 1 A A 1 D 4 0 A 1 POR T 3 2 A 1 2 A 1 1 A 1 0 A 9

PI O RN T T 3
1 I

The mother board of 89C51 has following sections: Power Supply, 89C51 IC, Oscillator, Reset Switch & I/O ports. Let us see these sections in detail. Power supply: This section provides the clean and harmonic free power to ic to function properly. The output of the full wave rectifier section, which is built using two rectifier diodes, is given to filter capacitor. The electrolytic capacitor C1 filters the pulsating dc into pure dc and given to Vin pin-1 of regulator IC 7805.This three terminal IC regulates the rectified pulsating dc to constant +5 volts. C2 & C3 provides ground path to harmonic signals present in the inputted voltage. The Vout pin-3 gives constant, regulated and spikes free +5 volts to the mother board. The allocation of the pins of the 89C51 follows a U-shape distribution. The top left hand corner is Pin 1 and down to bottom left hand corner is Pin 20. And the bottom right hand corner is Pin 21 and up to the top right hand corner is Pin 40. The Supply Voltage pin Vcc is 40 and ground pin Vss is 20. Oscillator: If the cpu is the brain of the system then the oscillator, or clock, is the heartbeat. It provides the critical timing functions for the rest of the chip. The greatest timing accuracy is achieved with a crystal or ceramic resonator. For crystals of 2.0 to 12.0 mhz, the recommended capacitor values should be in the range of 15 to 33pf2. Across the oscillator input pins 18 & 19 a crystal x1 of 4.7 mhz to 20 mhz value can be connected. The two ceramic disc type capacitors of value 30pF are connected across crystal and ground stabilizes the oscillation frequency generated by crystal.

. 7

I/O ports: There are a total of 32 i/o pins available on this chip. The amazing part about these ports is that they can be programmed to be either input or output ports, even "on the fly" during operation! Each pin can source 20 mA (max) so it can directly drive an led. They can also sink a maximum of 25 Ma current. Some pins for these I/O ports are multiplexed with an alternate function for the peripheral features on the device. In general, when a peripheral is enabled, that pin may not be used as a general purpose I/O pin. The alternate function of each pin is not discussed here, as port accessing circuit takes care of that.

This 89C51 ic has four i/o ports and is discussed in detail: P0.0 to p0.7 PORT0 is an 8-bit [pins 32 to 39] open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs and configured to be multiplexed low order address/data bus then has internal pull ups. External pull ups are required during program verification.

P1.0 to P1.7 PORT1 is an 8-bit wide [pins 1 to 8], bi-directional port with internal pull ups. P1.0 and P1.1 can be configured to be the timer/counter 2 external count input and the timer/counter 2 trigger input respectively. P2.0 to P2.7 PORT2 is an 8-bit wide [pins 21 to 28], bi-directional port with internal pull ups. The PORT2 output buffers can sink/source four TTL inputs. It receives the high-order address bits and some control signals during Flash programming and verification. P3.0 to P3.7 PORT3 is an 8-bit wide [pins 10 to 17], bi-directional port with internal pull ups. The Port3 output buffers can sink/source four TTL inputs. It also receives some control signals for Flash programming and verification.

. 8

PSEN Program Store Enable [Pin 29] is the read strobe to external program memory. ALE Address Latch Enable [Pin 30] is an output pulse for latching the low byte of the address during accesses to external memory. EA External Access Enable [Pin 31] must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H upto FFFFH. RST Reset input [Pin 9] must be made high for two machine cycles to resets the devices oscillator. The potential difference is created using 10MFD/63V electrolytic capacitor and 20KOhm resistor with a reset switch.

. 9

LCD Module LCDs can add a lot to any application in terms of providing an useful interface for the user, debugging an application or just giving it a "professional" look. The most common type of LCD controller is the Hitachi 44780 which provides a relatively simple interface between a processor and an LCD. Using this interface is often not attempted by inexperienced designers and programmers because it is difficult to find good documentation on the interface, initializing the interface can be a problem and the displays themselves are expensive. The most common connector used for the 44780 based LCDs is 14 pins in a row, with pin centers 0.100" apart. The pins are wired as:
LCD DATA WRITE WAVEFORM D A T A R/ _S R/ _ W E 4 5 0 n Se c

Pins 1 2 3 4 5 6 7 - 14

Description Ground Vcc Contrast Voltage "R/S" _Instruction/Register Select "R/W" _Read/Write LCD Registers "E" Clock Data I/O Pins

. 10

The interface is a parallel bus, allowing simple and fast reading/writing of data to and from the LCD. The LCD Data Write Waveform will write an ASCII Byte out to the LCD's screen. The ASCII code to be displayed is eight bits long and is sent to the LCD either four or eight bits at a time. If four bit mode is used, two "nibbles" of data (Sent high four bits and then low four bits with an "E" Clock pulse with each nibble) are sent to make up a full eight bit transfer. The "E" Clock is used to initiate the data transfer within the LCD. Sending parallel data as either four or eight bits are the two primary modes of operation. While there are secondary considerations and modes, deciding how to send the data to the LCD is most critical decision to be made for an LCD interface application.

The different instructions available for use with the 44780 are shown in the table below: R/S R/W D7 D6 D5 D4 D3 D2 D1 D0 Instruction/Description 4 5 14 13 12 11 10 9 8 7 Pins 0 0 0 0 0 0 0 0 0 1 Clear Display 0 0 0 0 0 0 0 0 1 * Return Cursor and LCD to Home Position 0 0 0 0 0 0 0 1 ID S Set Cursor Move Direction 0 0 0 0 0 0 1 D C B Enable Display/Cursor 0 0 0 0 0 1 SC RL * * Move Cursor/Shift Display 0 0 0 0 1 DL N F * * Set Interface Length 0 0 0 1 A A A A A A Move Cursor into CGRAM 0 0 1 A A A A A A A Move Cursor to Display 0 1 BF * * * * * * * Poll the "Busy Flag" 1 0 D D D D D D D D Write a Character to the Display at the Current Cursor Position 1 1 D D D D D D D D Read the Character on the Display at the Current Cursor Position The bit descriptions for the different commands are: "*" - Not Used/Ignored. This bit can be either "1" or "0"

Most LCD displays have a 44780 and support chip to control the operation of the LCD. The 44780 is responsible for the external interface and provides sufficient control lines for sixteen characters on the LCD. The support chip enhances the I/O of the 44780 to support up to 128 characters on an LCD. From the table above, it should be noted that the first two entries ("8x1", "16x1") only have the 44780 and not the support chip. This is why the ninth character in the 16x1 does not "appear" at address 8 and shows up at the address that is common for a two line LCD.

. 11

The Character Set available in the 44780 is basically ASCII. It is "basically" because some characters do not follow the ASCII convention fully (probably the most significant difference is 0x05B or "\" is not available). The ASCII Control Characters (0x008 to 0x01F) do not respond as control characters and may display funny (Japanese) characters. <<,, The last aspect of the LCD to discuss is how to specify a contrast voltage to the Display.

Shift Register LCD Data Write


D at a D at a Cl E oc Cl k oc k R6 D0 D1 Dn E

+ V c c Pin -3 Co ntr ast

Pro ces sor

S / R

0 0

1 0 K p o t

LCD
Ex

L C D LCD
Contrast Circuit

perts typically use a potentiometer wired as a voltage divider. This will provide an easily variable voltage between Ground and Vcc, which will be used to specify the contrast (or "darkness") of the characters on the LCD screen. You may find that different LCDs work differently with lower voltages providing darker characters in some and higher voltages do the same thing in others.

. 12

Timer NE/SA/SE555/SE555C DESCRIPTION The 555 monolithic timing circuits is a highly stable controller capable of producing accurate time delays, or oscillation. In the time delay mode of operation, the time is precisely controlled by one external resistor and capacitor. For a stable operation as an oscillator, the free running frequency and the duty cycle are both accurately controlled with two external resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and the output structure can source or sink up to 200mA.

FEATURES Turneater than 500 kHz

APPLICATIONS

uential timing

. 13

. 14

. 15

PHOTO MODULES FOR PCM REMOTE CONTROL SYSTEMS

Description The TSOP17... Series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly be decoded by a microprocessor. TSOP17... is the standard IR remote control receiver series, supporting all major transmission codes.

Features Photo detector and preamplifier in one package Internal filter for PCM frequency Improved shielding against electrical field disturbance TTL and CMOS compatibility Output active low Low power consumption High immunity against ambient light Continuous data transmission possible (1200 bit/s) Suitable burst length .10 cycles/burst

. 16

. 17

1. Regulated Power Supply The circuit needs two different voltages, +5V & +12V, to work. These dual voltages are supplied by this specially designed power supply. The power supply, unsung hero of every electronic circuit, plays very important role in smooth running of the connected circuit. The main object of this power supply is, as the name itself implies, to deliver the required amount of stabilized and pure power to the circuit. Every typical power supply contains the following sections: 1. Step-down Transformer: The conventional supply, which is generally available to the user, is 230V AC. It is necessary to step down the mains supply to the desired level. This is achieved by using suitably rated step-down transformer. While designing the power supply, it is necessary to go for little higher rating transformer than the required one. The reason for this is, for proper working of the regulator IC (say KIA 7805) it needs at least 2.5V more than the expected output voltage 2. Rectifier stage: Then the step-downed Alternating Current is converted into Direct Current. This rectification is achieved by using passive components such as diodes. If the power supply is designed for low voltage/current drawing loads/circuits (say +5V), it is sufficient to employ full-wave rectifier with centre-tap transformer as a power source. While choosing the diodes the PIV rating is taken into consideration. 3. Filter stage: But this rectified output contains some percentage of superimposed a.c. ripples. So to filter these a.c. components filter stage is built around the rectifier stage. The cheap, reliable, simple and effective filtering for low current drawing loads (say upto 50 mA) is done by using shunt capacitors. This electrolytic capacitor has polarities, take care while connecting the circuit.

KIA 78 xx Ser ies

1 2 . 3 18

4. Voltage Regulation: The filtered d.c. output is not stable. It varies in accordance with the fluctuations in mains supply or varying load current. This variation of load current is observed due to voltage drop in transformer windings, rectifier and filter circuit. These variations in d.c. output voltage may cause inaccurate or erratic operation or even malfunctioning of many electronic circuits. For example, the circuit boards which are implanted by CMOS or TTL ICs. The stabilization of d.c. output is achieved by using the three terminal voltage regulator IC. This regulator IC comes in two flavors: 78xx for positive voltage output and 79xx for negative voltage output. For example 7805 gives +5V output and 7905 gives -5V stabilized output. These regulator ICs have in-built short-circuit protection and autothermal cutout provisions. If the load current is very high the IC needs heat sink to dissipate the internally generated power.

Circuit Description:
A D.C. power supply which maintains the output voltage constant irrespective of a.c. mains fluctuations or load variations is known as regulated d.c. power supply. It is also referred as full-wave regulated power supply as it uses four diodes in bridge fashion with the transformer. This laboratory power supply offers excellent line and load regulation and output voltages of +5V & +12 V at output currents up to one amp. 1. Step-down Transformer: The transformer rating is 230V AC at Primary and 12-012V, 1Ampers across secondary winding. This transformer has a capability to deliver a current of 1Ampere, which is more than enough to drive any electronic circuit or varying load. The 12VAC appearing across the secondary is the RMS value of the waveform and the peak value would be 12 x 1.414 = 16.8 volts. This value limits our choice of rectifier diode as 1N4007, which is having PIV rating more than 16Volts. 2. Rectifier Stage: The two diodes D1 & D2 are connected across the secondary winding of the transformer as a full-wave rectifier. During the positive half-cycle of secondary voltage, the end A of the secondary winding becomes positive and end B negative. This makes the diode D1 forward biased and diode D2 reverse biased. Therefore diode D1 conducts while diode D2 does not. During the negative half-cycle, end A of the secondary winding becomes negative and end B positive. Therefore diode D2 conducts while diode D1 does not. Note that current across the centre tap terminal is in the same direction for both half-cycles of input A.C. voltage. Therefore, pulsating d.c. is obtained at point C with respect to Ground.

. 19

CIRCUIT DIAGRAM OF +5V & +12V FULL WAVE REGULATED POWER

D 1 1

I C 1 7 8 1 2

I C 1 7 8 0 5

9 V

+ 1 2 V

+ 5 V

2 3 0 A C D 2 1

C 1

C 2

C 3

C 4

X SUPPLY1
Parts List: SEMICONDUCTORS IC1 7812 Regulator IC IC2 7805 Regulator IC D1& D2 1N4007 Rectifier Diodes CAPACITORS C1 C2 to C4 MISCELLANEOUS X1 1 1 2

1000 f/25V Electrolytic 0.1F Ceramic Disc type

1 3

230V AC Pri,14-0-14 1Amp Sec Transformer

. 20

3. Filter Stage: Here Capacitor C1 is used for filtering purpose and connected across the rectifier output. It filters the a.c. components present in the rectified d.c. and gives steady d.c. voltage. As the rectifier voltage increases, it charges the capacitor and also supplies current to the load. When capacitor is charged to the peak value of the rectifier voltage, rectifier voltage starts to decrease. As the next voltage peak immediately recharges the capacitor, the discharge period is of very small duration. Due to this continuous charge-discharge-recharge cycle very little ripple is observed in the filtered output. Moreover, output voltage is higher as it remains substantially near the peak value of rectifier output voltage. This phenomenon is also explained in other form as: the shunt capacitor offers a low reactance path to the a.c. components of current and open circuit to d.c. component. During positive half cycle the capacitor stores energy in the form of electrostatic field. During negative half cycle, the filter capacitor releases stored energy to the load. 4. Voltage Regulation Stage: Across the point D and Ground there is rectified and filtered d.c. In the present circuit KIA 7812 three terminal voltage regulator IC is used to get +12V and KIA 7805 voltage regulator IC is used to get +5V regulated d.c. output. In the three terminals, pin 1 is input i.e., rectified & filtered d.c. is connected to this pin. Pin 2 is common pin and is grounded. The pin 3 gives the stabilized d.c. output to the load. The circuit shows two more decoupling capacitors C2 & C3, which provides ground path to the high frequency noise signals. Across the point E and F with respect to ground +5V & +12V stabilized or regulated d.c output is measured, which can be connected to the required circuit.

. 21

MAX 232

RS 232 CONVERTER (MAX 232N) Serial Port: This is the device, which is used to convert TTL/RS232 vice versa.

RS-232Protocol In telecommunications, RS-232 is a standard for serial binary data interconnection between a DTE (Data terminal equipment) and a DCE (Data Circuitterminating Equipment). It is commonly used in computer serial ports. The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels. Valid signals are plus or minus 3 to 15 volts. The range near zero volts is not a valid RS-232 level; logic one is defined as a negative voltage, the signal condition is called marking, and has the functional significance of OFF. RS-232 was created for one purpose, to interface between Data Terminal Equipment (DTE) and Data Communications Equipment (DCE) employing serial binary data interchange. So as stated the DTE is the terminal or computer and the DCE is the modem or other communications device. RS-232 pin-outs for IBM compatible computers are shown below. There are two configurations that are typically used: one for a 9-pin connector and the other for a 25pin connector.

. 22

Fig. 4.1 Pin Description of MAX 232

Logic Diagram (Positive Logic)

. 23

Fig. 4.2 Logic Diagram of MAX232

Fig. 4.3 Operating Characteristics

. 24

Low Power Quad Operational Amplifiers


General Description

The LM124 series consists of four independent, high gain, internally frequency compensated operational amplifiers which were designed specifically to operate from a single power supply over a wide range of voltages. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include transducer amplifiers, DC gain blocks and all the conventional op amp circuits which now can be more easily implemented in single power supply systems. For example, the LM124 series can be directly operated off of the standard +5V power supply voltage which is used in digital systems and will easily provide the required interface electronics without requiring the additional 15V

. 25

Voltage comparators:

The lm139/lm239/lm339/lm324 family of devices is a monolithic quad of independently functioning comparators designed to meet the needs for a medium speed, ttl compatible comparator. For industrial applications. Since no anti-saturation clamps are used on the output such as a baker clamp or other active circuitry, the output leakage current in the off state is typically 0.5na. This makes the device ideal for system applications where it is desired to switch a node to ground while leaving it totally unaffected in the off state. Other features include single supply, low voltage operation with an input common mode range from ground up to approximately one volt below vcc. The output is an uncommitted collector so it may be used with a pull-up resistor and a separate output supply to give switching levels from any voltage up to 36v down to a vcc sat above ground (approx. 100 mv), sinking currents up to 15 ma. In addition it may be used as a single pole switch to ground, leaving the switched node unaffected while in the off state. Power dissipation with all four comparators in the off state is typically 4 mw from a single 5v supply (1 mw/comparator).

Fig1 Comparator circuits

. 26

Figure 1 shows a basic comparator circuit for converting low level analog signals to a high level digital output. The output pull-up resistor should be chosen high enough so as to avoid excessive power dissipation yet low enough to supply enough drive to switch whatever load circuitry is used on the comparator output. Resistors r1 and r2 are used to set the input threshold trip voltage (vref) at any value desired within the input common mode range of the comparator.

Comparators with hysterics The circuit shown in figure 1 suffers from one basic drawback in that if the input signal is a slowly varying low level signal, the comparator may be forced to stay within its linear region between the outputs high and low states for an undesirable length of time. If this happens, it runs the risk of oscillating since it is basically an uncompensated, high gain op amp. To prevent this, a small amount of positive feedback or hysterics is added around the comparator. Figure 6 shows a comparator with a small amount of positive feedback. In order to insure proper comparator action, the components should be chosen as follows: Rpull-up < rload and r1 > rpull-up this will insure that the comparator will always switch fully up to +vcc and not be pulled down by the load or feedback. The amount of feedback is chosen arbitrarily to insure proper switching with the particular type of input signal used. If the output swing is 5v, for example, and it is desired to feedback 1% or 50 mv, then r1 100 r2. To describe circuit operation, assume that the inverting input goes above the reference input (vin > vref). This will drive the output, vo, towards ground which in turn pulls vref down through r1. Since vref is actually the non-inverting input to the comparator, it too will drive the output towards ground insuring the fastest possible switching time regardless of how slow the input moves. If the input then travels down to vref, the same procedure will occur only in the opposite direction insuring that the output will be driven hard towards +vcc.

. 27

. 28

. 29

Software Code:

RB0 EQU BANK 0 RB1 EQU BANK 1 ...POKE TO PSW TO USE RB2 EQU BANK 1 ...POKE TO PSW TO USE

00H 08H 10H

; SELECT REGISTER ; SELECT REGISTER ; SELECT REGISTER

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ; PORT DECLERATION ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

LCD_RS LCD_E LCD_DB4 LCD_DB5 LCD_DB6 LCD_DB7 SEARCH ADDS DELETE LOAD ALARM

EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU P2.7 P2.2 P2.3

P0.0 P0.1 P0.2 P0.3 P0.4 P0.5

;LCD REGISTER SELECT LINE ;LCD ENABLE LINE ;PORT 1 IS USED FOR DATA ;USED FOR DATA ;FOR DATA ;FOR DATA

P2.0

P2.6

; ***CURSOR CONTROL INSTRUCTIONS*** OFFCUR BLINKCUR EQU EQU 0CH 0DH

; ***DISPLAY CONTROL INSTRUCTIONS*** CLRDSP ONDSP EQU EQU 01H 0CH

. 30

; ***SYSTEM INSTRUCTIONS*** CONFIG EQU LINES,5X7 MATRIX LCD ENTRYMODE EQU SHIFT DISPLAY 28H 6 ; 4-BIT DATA,2 ; INCREMENT CURSOR DON'T

DSEG AT 20H INTERNAL DATA MEMORY FLAGS1: RECEIVED COUNTER: DS BIT DS 1 FLAGS1.0 1

; THIS IS

; ---------==========----------==========---------=========--------; MAIN ROUTINE. PROGRAM EXECUTION STARTS HERE. ; ---------==========----------==========---------=========--------CSEG AT 00H AJMP MAIN ORG 23H JMP SERIAL ; ---------==========----------==========---------=========--------MAIN: MOV MOV MOV SETB MOV MOV MOV MOV SETB SETB SETB PSW,#RB0 SP,#60H A,PCON ACC.7 PCON,A TMOD,#20H TH1,#0FFH SCON,#50H ES EA TR1 ; SELECT REGISTER BANK 0

SETB ADDS SETB SEARCH CLR LOAD

. 31

CLR ALARM MOV ERROR_COUNT,#00H ;CHECK TO INITIALIZE THE USER COUNT IN FLASH MEMORY CLR RECEIVED MOV DPTR,#READ_FLASH CALL SEND_SERIAL CALL DELAY MOV A,BYTE+4 CJNE A,#0FFH,NOT_INT MOV DPTR,#STORE_FLASH CALL SEND_SERIAL

NOT_INT: CALL RESETLCD4 TOPS: TOP: JNB JNB JNB AJMP SEARCH_USERS: AJMP SEARCH_USER ADD_USERS: AJMP ADD_USER DELETE_USER: JNB DELETE,$ CALL DISPLAY_DEL CLR RECEIVED MOV DPTR,#SEARCH_USER_DATA CALL SEND_SERIAL ADDS,ADD_USERS SEARCH,SEARCH_USERS DELETE,DELETE_USER TOP CALL DISPLAY

MOV CJNE CALL CALL

A,BYTE+4 A,#31H,NOT_MATCHES FIN_DELETED DELAYS

. 32

CALL DELAYS AJMP TOPS NOT_MATCHES: CALL CALL CALL AJMP NOT_MATCHS: CALL CALL CALL AJMP

NOT_DELETED DELAYS DELAYS TOPS

NOT_MATCHED DELAYS DELAYS TOPS

ADD_USER: CALL DISPLAY1 CALL DELAYS JNB ADDS,$ CLR RECEIVED MOV DPTR,#SEARCH_USER_DATA CALL SEND_SERIAL CALL DELAYS MOV CJNE CALL CALL CALL AJMP A,BYTE+4 A,#39H,NOT_MATCHSS ALREADY_EXIT DELAYS DELAYS TOPS

NOT_MATCHSS: CLR RECEIVED MOV DPTR,#READ_FLASH FROM FLASH MEMORY CALL SEND_SERIAL CALL DELAY MOV A,BYTE+4 MOV USER_COUNT,A CJNE A,#100,USER_NOT_FULL CALL USER_FULL_DISPLAY CALL DELAYS

;LOAD USER COUNT

. 33

CALL DELAYS AJMP TOPS NEXT: CALL CALL JNB MOV CJNE CALL CALL CALL CLR MOV MOV CALL INC MOV CALL MOV ADD MOV CALL CLR AJMP NOT_SAVED: CALL CALL CALL CLR AJMP DELAYS DELAYS RECEIVED,$ A,BYTE+4 A,#31H,NOT_SAVED DISPLAY_SUCESS DELAYS DELAYS RECEIVED DPTR,#STORE_FLASH TEMPS,#00H SEND_SERIAL USER_COUNT SBUF,USER_COUNT TRANSDELAY A,TEMPS A,USER_COUNT SBUF,A TRANSDELAY RECEIVED TOPS

DISPLAY_NOTSUCESS DELAYS DELAYS RECEIVED TOPS

;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SEND_SERIAL: CLR A MOVC A,@A+DPTR CJNE A,#0FFH,SEND_D RET SEND_D: MOV ADD MOV CALL INC SBUF,A A, TEMPS TEMPS,A TRANSDELAY DPTR

. 34

AJMP SEND_SERIAL ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SEARCH_USER: JNB SEARCH,$ CALL DISPLAY2 CLR RECEIVED MOV DPTR,#SEARCH_USER_DATA CALL SEND_SERIAL CALL DELAYS MOV CJNE CPL CLR MOV CALL MOV CALL CALL CALL AJMP NOT_MATCH: INC MOV CJNE SETB ALARM_ON: CALL CALL CALL AJMP NOT_MATCHED DELAYS DELAYS TOPS A,BYTE+4 A,#39H,NOT_MATCH LOAD ALARM ERROR_COUNT,#00H MATCHED TEMP,BYTE+6 SPLITDISP DELAYS DELAYS TOPS

ERROR_COUNT A,ERROR_COUNT A,#04H,ALARM_ON ALARM

SPLITDISP: MOV A,TEMP MOV DIV AB SWAP ORL A,B B,#10 ; DIVIDE BY 10 ; DO DIVIDE A ; MOVE RESULT TO HIGH OF A ; OR IN REMAINDER

. 35

MOV TEMP,A ANL A,#0F0H SWAP A ADD A,#30H MOV R4,A CALL WRLCDDATA CALL MDELAY MOV ANL ADD MOV CALL CALL MOV CALL CALL RET ;---------==========----------==========---------=========--------ADD_USER_DATA: DB DB 4DH, 58H, 10H, 03H, 40H, 00H, 0FFH 4DH, 58H, 10H, 03H, 40H, 00H, 01H, 0F9H, 0FFH A,TEMP A,#0FH A,#30H R4,A WRLCDDATA MDELAY R4,#' ' WRLCDDATA MDELAY

;ADDRESS--------------------------^ SEARCH_USER_DATA: DB 0FFH 04DH, 58H, 10H, 05H, 44H, 00H, 00H, 00H, 0FEH, 0FCH,

STORE_FLASH: DB 4DH, 58H, 10H, 05H, 64H, 00H, 00H, 01H, 0FFH

. 36

DEL_USER_DATA: DB 4DH, 58H, 10H, 03H, 42H, 00H, 0FFH ;---------==========----------==========---------=========--------SERIAL: PUSH PSW ; SAVE CURRENT REGISTERSET MOV PSW,#RB1 PUSH ACC JB TI,TRANSD MOV A,SBUF CJNE A,#4DH,DOWN2 MOV COUNTER,#01H JMP DDWN TRANSD: AJMP TRANS DOWN2: MOV CJNE MOV JMP R1,COUNTER R1,#01H,YH1 BYTE,A DOWN1

YH1: CJNE R1,#02H,YH2 MOV BYTE+1,A JMP DOWN1 YH2: CJNE R1,#03H,YH3 MOV BYTE+2,A MOV TEMP,A JMP DOWN1 YH3: CJNE R1,#04H,YH4 MOV BYTE+3,A DEC TEMP MOV A,TEMP CJNE A,#00H,DOWN1 SETB RECEIVED JMP DOWN1 YH4: CJNE R1,#05H,YH5 MOV BYTE+4,A DEC TEMP MOV A,TEMP

. 37

CJNE A,#00H,DOWN1 SETB RECEIVED JMP DOWN1 YH5: CJNE R1,#06H,YH6 MOV BYTE+5,A DEC TEMP MOV A,TEMP CJNE A,#00H,DOWN1 SETB RECEIVED JMP DOWN1 YH6: CJNE R1,#07H,YH7 MOV BYTE+6,A DEC TEMP MOV A,TEMP CJNE A,#00H,DOWN1 SETB RECEIVED JMP DOWN1 YH7: CJNE R1,#08H,DOWN1 MOV BYTE+7,A DEC TEMP MOV A,TEMP CJNE A,#00H,DOWN1 SETB RECEIVED JMP DOWN1 DOWN1:INC DDWN: COUNTER CLR RI POP POP

ACC PSW

RETI TRANS: CLR TI POP POP

ACC PSW

RETI ;********************************************************** ;********************************************************** TRANSDELAY: MOV R7,#5FH DJNZ R7,$ RET

. 38

;########################################################## ; DISPLAY ROUTINES ;########################################################## DISPLAY: MOV DPTR,#MSAG1 CALL LCD_MSG RET MSAG1: DB 1H,80H,'FINGERPRINT BASED',0C0H,'SECURITY SYSTEM',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DISPLAY1: MOV DPTR,#MSAG2 CALL LCD_MSG RET MSAG2: DB 1H,83H,'SHOW YOUR',0C0H,'FINGER TO ADD..',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DISPLAY2: MOV DPTR,#MSAG3 CALL LCD_MSG RET MSAG3: DB 1H,83H,'SHOW YOUR',0C3H,'FINGER....',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USER_FULL_DISPLAY: MOV DPTR,#MSAG4 CALL LCD_MSG RET MSAG4: DB 1H,83H,'USER MEMORY',0C3H,'## FULL ##',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DISPLAY_SUCESS: MOV DPTR,#MSAG5 CALL LCD_MSG RET MSAG5: DB 1H,83H,'USER ADDED',0C3H,'SUCESSFULLY',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DISPLAY_NOTSUCESS: MOV DPTR,#MSAG6 CALL LCD_MSG

. 39

RET MSAG6: DB 1H,83H,'USER ADDED',0C2H,'## FAILED ##',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MATCHED: MOV DPTR,#MSAG7 CALL LCD_MSG RET MSAG7: DB 1H,83H,'FINGERPRINT',0C1H,'MATCHED ID:',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOT_MATCHED: MOV DPTR,#MSAG8 CALL LCD_MSG RET MSAG8: DB 1H,83H,'FINGERPRINT',0C2H,'NOT MATCHED',00H ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DISPLAY_DEL: MOV DPTR,#MSAG9 CALL LCD_MSG RET MSAG9: DB 1H,83H,'SHOW YOUR',0C0H,'FINGER TO DELETE',00H ;********************************************************** DELAYSS: ;ONE SECOND DELAY ROUTINE MOV R0,#03H RE3: MOV R1,#0FFH RZ1: MOV R2,#0FFH RE2: NOP DJNZ R2,RE2 DJNZ R1,RZ1 DJNZ R0,RE3 RET ;********************************************************** ; INITIALIZE THE LCD 4-BIT MODE ;********************************************************** INITLCD4: CLR LCD_RS ; LCD REGISTER SELECT LINE CLR LCD_E ; ENABLE LINE SHIFT

. 40

MOV CALL

R4, #CLRDSP WRLCDCOM4

; CLEAR DISPLAY, HOME CURSOR

RET ; ********************************************************** ; SOFTWARE VERSION OF THE POWER ON RESET ; ********************************************************** RESETLCD4: CLR LCD_RS ; LCD REGISTER SELECT LINE CLR LCD_E ; ENABLE LINE CLR LCD_DB7 ; SET BIT PATTERN FOR... CLR LCD_DB6 ; ... POWER-ON-RESET SETB LCD_DB5 SETB LCD_DB4 SETB LCD_E ; START ENABLE PULSE CLR LCD_E ; END ENABLE PULSE MOV A, #4 ; DELAY 4 MILLISECONDS CALL MDELAY SETB LCD_E ; START ENABLE PULSE MOV R4, #CONFIG ; FUNCTION SET CALL WRLCDCOM4 MOV R4, #08H ; DISPLAY OFF CALL WRLCDCOM4 MOV R4, #1 ; CLEAR DISPLAY, HOME CURSOR CALL WRLCDCOM4 MOV R4,#ENTRYMODE ; SET ENTRY MODE ACALL WRLCDCOM4 JMP INITLCD4 ; ********************************************************** ; SUB RECEIVES A COMMAND WORD TO THE LCD ; COMMAND MUST BE PLACED IN R4 BY CALLING PROGRAM ; ********************************************************** WRLCDCOM4: CLR LCD_E CLR LCD_RS ; SELECT READ COMMAND PUSH ACC ; SAVE ACCUMULATOR MOV A, R4 ; PUT DATA BYTE IN ACC MOV LCD_DB7, C SETB LCD_E ; PULSE THE ENABLE LINE CLR LCD_E MOV C, ACC.0 ; SIMILARLY, LOAD LOW NIBBLE MOV LCD_DB4, C MOV C, ACC.1 MOV LCD_DB5, C MOV C, ACC.2 MOV LCD_DB6, C

. 41

MOV C, ACC.3 MOV LCD_DB7, C CLR LCD_E SETB LCD_E CLR LCD_E CALL MADELAY POP ACC

; PULSE THE ENABLE LINE

RET ; ********************************************************** ; SUB TO RECEIVE A DATA WORD TO THE LCD ; DATA MUST BE PLACED IN R4 BY CALLING PROGRAM ; ********************************************************** WRLCDDATA: CLR LCD_E SETB LCD_RS ; SELECT READ DATA PUSH ACC ; SAVE ACCUMULATOR MOV A, R4 ; PUT DATA BYTE IN ACC MOV C, ACC.4 ; LOAD HIGH NIBBLE ON DATA BUS MOV LCD_DB4, C ; ONE BIT AT A TIME USING... MOV C, ACC.5 ; BIT MOVE OPERATOINS MOV LCD_DB5, C MOV C, ACC.6 MOV LCD_DB6, C MOV C, ACC.7 MOV LCD_DB7, C SETB LCD_E ; PULSE THE ENABLE LINE CLR LCD_E MOV C, ACC.0 ; SIMILARLY, LOAD LOW NIBBLE MOV LCD_DB4, C MOV C, ACC.1 MOV LCD_DB5, C MOV C, ACC.2 MOV LCD_DB6, C MOV C, ACC.3 MOV LCD_DB7, C CLR LCD_E SETB LCD_E ; PULSE THE ENABLE LINE CLR LCD_E NOP NOP POP ACC RET ; ********************************************************** ; SUB TAKES THE STRING IMMEDIATELY FOLLOWING THE CALL AND ; DISPLAYS ON THE LCD. STRING MUST BE TERMINATED WITH A

. 42

; NULL (0). ; ********************************************************** LCD_MSG: CLR A ; CLEAR INDEX MOVC A,@A+DPTR ; GET BYTE POINTED BY DPTR INC DPTR ; POINT TO THE NEXT BYTE JZ LCD_MSG9 ; RETURN IF FOUND THE ZERO (END OF STRINGZ) CJNE A,#01H,LCD_MSG1 ; CHECK IF IS A CLEAR COMMAND MOV R4,A CALL WRLCDCOM4 ;IF YES, RECEIVE IT AS COMMAND TO LCD JMP LCD_MSG ;GO GET NEXT BYTE FROM STRINGZ LCD_MSG1: CJNE A,#0FFH,FLL FULL CHARACTER MOV R4,A CALL WRLCDDATA JMP LCD_MSG ;CHECK FOR DISPLAYING

FLL: CJNE A,#080H,$+3 ; DATA OR ADDRESS? IF => 80H THEN IS ADDRESS. JC LCD_MSG_DATA ; CARRY WILL BE SET IF A < 80H (DATA) MOV R4,A CALL WRLCDCOM4 ; CARRY NOT SET IF A=>80, IT IS ADDRESS JMP LCD_MSG ; GO GET NEXT BYTE FROM STRINGZ LCD_MSG_DATA: MOV R4,A CALL WRLCDDATA JMP LCD_MSG STRINGZ LCD_MSG9: RET ; ********************************************************** ; 1 MILLISECOND DELAY ROUTINE ; ********************************************************** MDELAY: PUSH MOV ; RETURN TO CALLER

; IT WAS DATA, RECEIVE IT TO LCD ; GO GET NEXT BYTE FROM

ACC A,#0A6H

. 43

MD_OLP: INC NOP NOP NOP NOP NOP NOP NOP NOP JNZ NOP POP RET MADELAY: PUSH MOV MAD_OLP: INC NOP NOP NOP NOP NOP NOP NOP NOP JNZ NOP POP RET END

MD_OLP ACC

ACC A,#036H

MAD_OLP ACC

. 44

Advantages: No manual errors No false attendance Need not remember any password Need not to carry any card Scopes for Advancements: GSM modem can be connected to this unit to communicate to the parents HR Department, in case of absence of the candidate. RTC can be interfaced to record login and logout time. Applications Industries are using finger print modems for access control, Stores, attendance recording, and machine operation authentication. Banks and ATM Voter Identification and electoral enrollment Personal Computers Automotives and high end cars

. 45

REFERENCE
Text Books: Basics of Biometrics By David Louis Fingerprint Modem Applications By Morris Hamington Website: www.howstuffworks.com www.answers.com www.fingerprintindia.com www.WineYardProjects.com Magazines: Electronics for you Electrikindia

. 46