Finger Print Based ATM System

Embed Size (px)

Citation preview

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 List89S52 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 89C5130 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 04 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

OAR

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 31 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. 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

A

MD_OLP ACC

ACC A,#036H

A

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

REFERENCEText 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