Sei sulla pagina 1di 70

CHAPTER -1 INTRODUCTION

1. INTRODUCTION
An embedded system is a special-purpose system in which the computer is completely encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs one or a few pre-defined tasks, usually with very specific requirements. Since the system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, benefiting from economies of scale.

1.1Biometrics What is Biometrics?


The study of automated identification, by use of physical or behavioral traits. Physical vs. Behavioral Physical Fingerprint Iris Ear Face Retina Hands

Behavioral Signature Walking gait Typing patterns


1

1.2 Why go for Biometrics?


Authentication the process of verifying that a user requesting a network resource is who he, she, or it claims to be, and vice versa. Conventional authentication methods something that you have key, magnetic card or smartcard something that you know PIN or password

Biometric authentication uses personal features something that you are

1.3 Advantages
Biometrics has no risk of Forgetting it Losing it Getting it stolen Getting it copied Being used by anyone else.

Essential Properties of a Biometric Universal Everyone should have the characteristic

Uniqueness No two persons have the same characteristic

Permanence Characteristic should be unchangeab

1.4 Biometric System Process Flow

1.1 Biometric System Process Flow

1.5 Pattern Recognition


Description and classification of measurements taken from physical or mental processes Examination of pattern characteristics Formulation of the recognition system Important part of any biometric system

1.6 Why Fingerprint biometry?


High Universality A majority of the population (>96%) have legible fingerprints More than the number of people who possess passports, license and IDs

High Distinctiveness Even identical twins have different fingerprints (most biometrics fail)

Individuality of fingerprints established through empirical evidence High Permanence

Fingerprints are formed in the fetal stage and remain structurally unchanged throughout life.

High Acceptability Fingerprint acquisition is non intrusive. Requires no training.

Advantages
Uniqueness Surety over the Cards and Keypads No need to further invest on the Cards Cost No need to further manage the Cards Writing Devices

1.7 Fingerprint Patterns


Loops Whorls Arches Ridge lines enter from one side of print and exit out the other 5% of population Rounded or circular ridge pattern 30-35% of population Ridge lines enter from one side and curve around to exit from the same side 60-65% of population

BLOCK DESIGN PROPOSAL FOR THE SYSTEM

BUZZER

LCD

EEPROM

EMBEDDED CONTROLLER

KEY-PAD

STEPPER MOTOR IMAGE STORE

FINGER

SCANNER

CHAPTER- 2 LITERATURE SURVEY


A fingerprint module is a device which has fingerprint control assembly attached to it. They are provided with an access control system. This system allows the user to unlock the device with a fingerprint password. The password is entered by making use of keys. The user can also set his password to ensure better protection. The major components include a keypad, LCD and the controller ARM LPC21458 which belongs to the series of ARM LPC21458. This article describes the making of a finger print based ATM and locker system for modern secured banks. Security is a prime concern in our day-today life. Here in this project we are going provide the at most security since it is taking the FINGER PRINTS as the authentication for our account. So whenever we want to access our account first we have to press the finger on the finger print scanner. Scanner is interfaced to the micro controller with the serial interfacing. The micro controller reads the data from the scanner. The micro controller allows those users, who are authorized to operate the account. If any unauthorized user tries to operate the account the micro controller switches on the security alarm. The total information about the account holders is stored in the EEPROM. Keypad is used to enter the password to operate the account or Locker.

CHAPTER -3 FINGERPRINT MODULE SPECIFICATION


3.1 GENERAL VIEW
The Ara-Em01 is high performance fingerprint module developed by Armtek Biometrics Technology Co, Ltd .it has many features : easy restructure, powerful functions, compatible with PC and multiple-functions in one module: Fingerprint enrollment, image process, characters acquisition, fingerprint template creation, fingerprint template storage, fingerprint compare (1: 1, 1: N), fingerprint delete. This module can work with different devices based on UAWRT such as PC, SCM and so on. Only easy circuits and fingerprint module can enhance your product into fingerprint authentication power. It is widely used by electronics business, information security, access control, identity authentication and other security industry.

3.1 Fingerprint photo Cable


7

3.2 APPLICATION SOLUTION 1. When ARA-EM01 is embedded into your system, the other functions will be controlled by MCU Controller, so developer can realize his own function logic,
user interface and communication port through hard ware and soft ware development, such as fingerprint time and attendance and so on.

3.2 Application solution

2. Expand the port such as RS485, Wiegand, even GPRS wireless communication with central controller outside by MCU in the central controller system.

3.3 HARDWARE SPECIFICATION

3.3 Hardware specification pin 1 2 3 Name GND Reset TXD spec Grand Module reset control Serial sender

4 5 6 REMARKS

RXD Power EN VCC

Serial receiver Power control 5V

1 reset signal is the low level; the level width is bigger than 10ms. 2 high level turn on the power, low level turn off the power.

3.4 SOFTWARE PORT SPEC


1. Communication port UART (Universal Asynchronous Serial Port), 9600bps to 115200bps (option), start with 1 bit, stop with 1 bit, no check bit. 2. Communication protocol Module stays in slave mode, and host can direct the module work by different command. All the command of the host and pack and analyze the command and the data in standard format.

3.5 FINGERPRINT AUTHENTICATION PERFORMANCE


item Sensor Image Resolution Register time Math time 11 Math time 1N FRR spec AES2510 256*288 500DPI <3% <0.1% <0.5% <0.1%

10

item Work Voltage Work Current Sleep current Work Temperature Humility Module size

Symbol min Vn 4.5

classic max 5 5.5 V

Measure

In

50

60

80

mA

Is

10

12

uA

Tn

20

70

Hn Ln

30 40mm*25mm 20mm*25mm

120

mm

Table 3.1 Fingerprint Authentication Performance

3.5.1 INTERFACE Type UART 3.3V CMOS level Baud rates up to 921.6kbps (factory default is 115.2kbps) RS232/422/485 supported via additional level converter Digital I/O 3.3V CMOS level 8 ports separately configurable 26bit Wiegand I/O supported via additional level converter Description

11

3.5.2 CONNECTOR SPECIFICATIONS Connector Usage J1 J2 Host interface port I Host interface port II (Molex 53261-8090

compatible) J3 J4 Debug port for factory use only Sensor interface port, 20 pin FPC/FFC

3.5.3 FLASH STORAGE STRUCTURE Address 0x0000-0x7fff 0x8000-0x8fff Spec Some codes System parameters storage 0x9000-0xffff Fingerprint database 28k- the end Size 32k 4k

3.5.4 SYSTEM PARAMETERS STORAGE AREA


Flash physical address 0x8000 0x8200 0x8400 0x8600 0 1 2 3 Reserve Parameter list User notebook Reserve Page Spec

12

0x8800 0x8a00 0x8c00 0x8e00

4 5 6 7

Reserve Reserve Reserve Reserve

3.6 COMMAND SPEC


PS_GetImage Code: 01H PS_GenChar Code: 02H Function: read image from the sensor and store it in the image buffer. Function: create fingerprint features document through the image and store in CharBuffer1 or CharBuffer2. PS_Match Code: 03H PS_Search Code: 04H Function: compare the features documents in the CharBuffer1 and Charbuffer2. Function: search the fingerprint database according to the features document in the CharBuffer1 or CharBuffer2. PS_RegModel Code: 05H Function: create fingerprint template according to the features documents in the CharBuffer1 and CharBuffer2. PS_StoreChar Code: 06H PS_LoadChar Code07 H Function: store the template into the flash fingerprint database from the features buffer. Function: read template to features buffer from flash fingerprint database.

13

PS_UpChar

Code: 08H

Function: transfer the data in the features buffer to the PC. Function: load a template from PC to features buffer. Function: delete a template in the flash fingerprint database. Function: clear flash fingerprint database

PS_DownChar

Code: 09H

PS_DeletChar

Code: 0CH

PS_Empty

Code: 0DH

PS_WriteReg

Code: 0EH

Function: write SSR

PS_ReadSysPar a PS_SetPwd

Code: 0FH Code: 12H

Function: read basic system parameters

Function: set device password.

PS_VfyPwd

Code: 13H

Function: verify device password.

PS_GetRandom Code

Code: 14H

Function: get random code

PS_SetChipAdd Code: r PS_WriteNotep ad 15H Code: 18H Code: PS_ValidTempl 1dH

Function: set the chip address

Function: write notepad

Function: read the template number from the flash


14

eteNum

3.7 PACK STRUCTURE


The packet flag=01 The packet flag=02 The packet flag=08 command packet data packet, and data packet followed the last data packet

The entire data packets head is 0xEF01, 0xFFFFFFFF Command Packet Format Nam e Packet head Devic e addres s Pack et Flag Packe t Lengt h 2byte s 1byte 2 bytes Comma nd Paramet er 1 Paramet . er N Checksu m

Size

2bytes

4bytes 1 byte

spec

0xEF0 1

xxxx

01

Data Packet Format Nam e Pack et head Devic e addres s Pack et Flag Packe t Lengt h Comman Paramet d er 1 . Paramet er N Checksu m

15

Size

2byte s

4bytes 1 byte

2byte s

N bytes

2 bytes

Last Data Packet Nam e Packet head Devic e addres s Pack et Flag Packe t Lengt h 2byte s N bytes 2 bytes Comma nd Paramet er 1 Paramet . er N Checksu m

Size

2bytes

4bytes 1 byte

spec

0xEF0 1

xxxx

08

1. Download or upload the data packet in the same format. 2. Packet length = the total bytes quantity of from the packet length to the checksum including checksum but not including the bytes quantity of the packet length itself. 3Checksum is the summer of all the bytes quantity from the packet flag to checksum including packet flag; neglect the rounding over 2bytes. Response packet/data packet: The Packet flag = 07 The packet flag = 02 The packet flag = 08 response packet data packet, and packet followed the last data packet
16

3.8 PHYSICAL DIMENSIONS


3.8.1 MAIN BOARD

3.3 Main Board 3.8.2SENSOR

3.4 Sensor
17

CHAPTER -4 HARDWARE DESCRIPTION


4.1 ADVANCED RISC MACHINE (ARM)
ARM is a 32-bit Reduced Instruction Set Computer (RISC) Instruction Set Architecture (ISA) developed by ARM Holdings. It was named the Advanced RISC Machine, and before that, the Acorn RISC Machine. The ARM architecture is the most widely used 32-bit instruction set architecture in numbers produced. Originally conceived by Acorn Computers for use in its personal computers, the first ARM-based products were the Acorn Archimedes range introduced in 1987. The relative simplicity of ARM processors makes them suitable for low power applications. As a result, they have become dominant in the mobile and embedded electronics market, as relatively low-cost, small microprocessors and microcontrollers. In 2005, about 98% of the more than one billion mobile phones sold each year used at least one ARM processor. As of 2009, ARM processors account for approximately 90% of all embedded 32-bit RISC processors and are used extensively in consumer electronics, including Personal Digital Assistants (PDAs), Tablets, Mobile Phones, Digital Media and Music Players, Hand-Held Game Consoles, Calculators and Computer Peripherals such as Hard Drives and Routers. ARM processors are developed by ARM and by ARM licensees. Prominent ARM processor families developed by ARM Holdings include the ARM7, ARM9, ARM11 and Cortex. 4.1.1History After achieving success with the BBC Micro computer, Acorn Computers Ltd considered how to move on from the relatively simple MOS Technology 6502 processor to address business markets like the one that would soon be dominated by the IBM PC, launched in 1981. The Acorn Business Computer (ABC) plan required a
18

number of second processors to be made to work with the BBC Micro platform, but processors such as the Motorola 68000 and National Semiconductor 32016 were unsuitable, and the 6502 was not powerful enough for a graphics based user interface. Acorn would need a new architecture, having tested all of the available processors and found them wanting. Acorn then seriously considered designing its own processor, and their engineers came across papers on the Berkeley RISC project. They felt it showed that if a class of graduate students could create a competitive 32-bit processor, then Acorn would have no problem. A trip to the Western Design Center in Phoenix, where the 6502 was being updated by what was effectively a single-person company, showed Acorn engineers Steve Furber and Sophie Wilson that they did not need massive resources and state-of-the-art R&D facilities. The official Acorn RISC Machine project started in October 1983. VLSI Technology was chosen as silicon partner, since it already supplied Acorn with ROMs and some custom chips. The design was led by Wilson and Furber, with a key design goal of achieving low-latency input/output (interrupt) handling like the 6502. The 6502's memory access architecture had allowed developers to produce fast machines without the use of costly direct memory access hardware. VLSI produced the first ARM silicon on 26 April 1985 it worked the first time and came to be termed ARM1 by April 1985. The first "real" production systems named ARM2 were available the following year. The ARM2 featured a 32-bit data bus, a 26-bit address space and twenty-seven 32-bit registers. Program code had to lie within the first 64 M byte of the memory, as the program counter was limited to 24 bits because the top 6 and bottom 2 bits of the 32bit register served as status flags. The ARM2 was possibly the simplest useful 32-bit microprocessor in the world, with only 30,000 transistors (compare them with Motorola's six-year older 68000 model which was aptly named, since it contained 68,000 transistors). Much of this simplicity comes from not having microcode (which represents about one-quarter to one-third of the 68000) and, like most CPUs of the day, not including any cache. This simplicity led to its low power usage, while performing better

19

than the Intel 80286. A successor, ARM3, was produced with a 4 KB cache, which further improved performance. The ARM core has remained largely the same size throughout these changes. ARM2 had 30,000 transistors, while the ARM6 grew to only 35,000. ARM's business has always been to sell IP cores, on which this core. licensees use to design

create microcontrollers and CPUs based

The original

manufacturer combines the ARM core with a number of optional parts to produce a complete CPU, one that can be built on old semiconductor fabs and still deliver substantial performance at a low cost. The most successful implementation has been theARM7TDMI with hundreds of millions sold.

4.2 ARM7
ARM720T, ARM7EJ-S, ARM7TDMI and ARM7TDMI-S The ARM7 family is a range of low-power 32-bit RISC microprocessor cores optimized for cost and power-sensitive applications introduced in 1994, the ARM7 family continues to be used in a variety of designs, but newer and more demanding designs are increasingly making use of latest ARM processors such as the Cortex-M0 and Cortex-M3 both of which offer several significant enhancements over the ARM7 family. The ARM Cortex-M3 32-bit processor has been specifically developed to provide a high-performance, low-cost platform for a broad range of

applications including microcontrollers, automotive body systems, industrial control systems and wireless networking. The Cortex-M3 processor provides outstanding computational performance and exceptional system response to interrupts while meeting low cost requirements through small core footprint, industry leading code density enabling smaller memories, reduced pin count and low power consumption. The ARM Cortex-M0 processor is the smallest, lowest power and most energy-efficient ARM processor available. The exceptionally small silicon area, low

20

power and minimal code footprint of the processor enables developers to achieve 32-bit performance at an 8-bit price point, bypassing the step to 16-bit devices. The ARM7 family offers up to 130 MIPS (Dhrystone2.1) and incorporates the Thumb 16-bit instruction set. The family consists of the ARM7TDMI, ARM7TDMIS and ARM7EJ-S processors.

4.3 INTRODUCTION TO ARM7 ARCHITECTURE


ARM is abbreviated as ADVANCED RISC (Reduced Instruction Set Computer) MACHINE The principle feature of the ARM 7 microcontroller ARM 7 is a register based load-and-store architecture with a number of operating modes. ARM 7 is a 32 bit microcontroller, also capable of running a 16-bit instruction set, known as THUMB. ARM 7 achieves a greater code density and enhanced power saving. ARM 7 has a three-stage pipeline to increase the performance of multiple instructions to be processed simultaneously. ARM 7 is the industry leader in low-power processing on a watt per Million Instructions per Second (MIPS) due to simplicity of the design and low gate count. ARM7 has a, built-in JTAG debug port and on-chip embedded ICE that allows programs to be downloaded and fully debugged in-system. ARM 7 is simple and cost-effective because the code and data regions are accessed via a single data bus. ARM 7 is capable of single-cycle execution of all data processing instructions;
21

ARM 7 may take several cycles for data transfer instructions since they will require at least two accesses onto the bus (one for the instruction one for the data).

4.3.1 ARM7 PROGRAMMING MODEL The programmers model of the ARM 7 consists of 15 user registers, as shown in Fig. 3, with R15 being used as the Program Counter (PC). Since the ARM 7 is a loadand-store architecture, a user program must load data from memory into the CPU registers, process this data and then store the result back into memory.

Fig 4.1: Load and Store Architecture As stated above R15 is the Program Counter. R13 and R14 also have special functions; R13 is used as the stack pointer, though this has only been defined as a programming convention. Unusually the ARM instruction set does not have PUSH and POP instructions so stack handling is done via a set of instructions that allow loading and storing of multiple registers in a single operation. Thus it is possible to PUSH or POP the entire register set onto the stack in a single instruction. R14 has special significance and is called the link register. When a call is made to a procedure, the return address is automatically placed into R14, rather than onto a stack. A return can then be implemented by moving the contents of R14 into R15. For multiple calling trees, the contents of R14 (the link register) must be placed onto the stack.

22

Fig 4.2: User Mode Register Model In addition to the 16 CPU registers, there is a current program status register (CPSR). This contains a set of condition code flags in the upper four bits that record the result of a previous instruction, as shown in Fig 4. In addition to the condition code flags, the CPSR contains a number of user-configurable bits that can be used to change the processor mode, enter Thumb processing and enable/disable interrupts.

23

4.3.2 ARM7 PROGRAM FLOW CONTROL In all processors there is a small group of instructions that are conditionally executed depending on a group of processor flags. These are branch instructions such as branch not equal. Within the ARM instruction set, all instructions are conditionally executable.

The top four bits of each instruction contain a condition code that must be satisfied if the instruction is to be executed. This goes a long way to eliminating small branches in the program code and eliminating stalls in the pipeline so increasing the overall program performance. Thus for small conditional branches of three instructions or less, conditional execution of instructions should be used. For larger jumps, normal branching instructions should be used.

24

4.3.3 THUMB SUPPORT The ARM processor is capable of executing both 32-bit (ARM) instructions and 16-Bit (Thumb instructions). The Thumb instruction set must always be entered by running a Branch exchange or branch link exchange instruction and NOT by setting the T bit in the CPSR. Thumb instructions are essentially a mapping of their 32 bit cousins but unlike the ARM instructions, they are unconditionally executed except though for branch instructions.

Fig. 4.3 Thumb Instruction Processing

Thumb instructions only have unlimited access to registers R0-R7 and R13 R15. A reduced number of instructions can access the full register set.

25

The Thumb instruction set has the same load and store multiple instructions as ARM and in addition, has a modified version of these instructions in the form of PUSH and POP that implement a full descending stack in the conventional manner. The Thumb instruction set also supports the SWI instruction; except that the ordinal field is only 8 bits long to support 256 different SWI calls. When the processor is executing Thumb code and an exception occurs, it will switch to ARM mode in order to process the exception. When the CPSR is restored the, Thumb bit will be reset and the processor continues to run Thumb instructions.

Fig.4.4 Thumb Exception Processing Thumb has a much higher code density than ARM code, needing some 70% of the space of the latter. However in a 32-bit memory, ARM code is some 40% faster than Thumb. However it should be noted that if you only have 16-bit wide memory then Thumb code will be faster than ARM code by about 45%. Finally the other important aspect of Thumb is that it can use up to 30% less power than ARM code.

26

4.4 LCD Display


Liquid crystal displays (LCDs) have materials which combine the properties of both liquids and crystals. Rather than having a melting point, they have a temperature range within which the molecules are almost as mobile as they would be in a liquid, but are grouped together in an ordered form similar to a crystal. An LCD consists of two glass panels, with the liquid crystal material sand witched in between them. The inner surface of the glass plates are coated with transparent electrodes which define the character, symbols or patterns to be displayed polymeric layers are present in between the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a defined orientation angle. One each polarisers are pasted outside the two glass panels. These polarisers would rotate the light rays passing through them to a definite angle, in a particular direction When the LCD is in the off state, light rays are rotated by the two polarisers and the liquid crystal, such that the light rays come out of the LCD without any orientation, and hence the LCD appears transparent. When sufficient voltage is applied to the electrodes, the liquid crystal molecules would be aligned in a specific direction. The light rays passing through the LCD would be rotated by the polarizer, which would result in activating / highlighting the desired characters. The LCDs are lightweight with only a few millimeters thickness. Since the LCDs consume less power, they are compatible with low power electronic circuits, and can be powered for long durations. The LCD s doesnt generate light and so light is needed to read the display. By using backlighting, reading is possible in the dark. The LCDs have long life and a wide operating temperature range.

27

The LCDs used exclusively in watches, calculators and measuring instruments are the simple seven-segment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCDs being extensively used in telecommunications and entertainment electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV applications. This section describes the operation modes of LCDs then describe how to program and interface an LCD to 8051 using Assembly and C. 4.4.1LCD operation 1. The declining prices of LCDs. 2. The ability to display numbers, characters and graphics. This is in contrast to LED which is limited to numbers and a few characters. 3. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of the task of refreshing the LCD. In the case of LED s, they must be refreshed by the CPU to keep on displaying the data. 4. Ease of programming for characters and graphics. 4.4.2 LCD pin description: The LCD discussed in this section has 14 pins. The function of each pin is given in table.

Fig:4.5 LCD
28

Pin
1 2 3

symbol
Vss Vcc VEE

I/O
----

Description
Ground +5V power supply Power supply to

control contrast 4 RS I RS=0 to select

command register RS=1 to select data register 5 R/W I R/W=0 for write R/W=1 for read 6 7 8 9 10 11 12 13 14 E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 I/O I/O I/O I/O I/O I/O I/O I/O I/O Enable The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus

Table 4.1: Pin description for LCD


29

The LCD can display a character successfully by placing the 1. Data in Data Register

2. Command in Command Register of LCD

1. Data corresponds to the ASCII value of the character to be printed. This can be done by placing the ASCII value on the LCD Data lines and selecting the Data Register of the LCD by selecting the RS (Register Select) pin. 2. Each and every display location is accessed and controlled by placing respective command on the data lines and selecting the Command Register of LCD by selecting the (Register Select) RS pin. The commonly used commands are shown below with their operations.

Code (hex)
1 2 80 C0 38

Command to LCD Instruction Register


Clear display screen Return home Force cursor to beginning of 1st line Force cursor to beginning of 2nd line 2 lines and 5x7 matrix

4.4.3 USES The LCDs used exclusively in watches, calculators and measuring instruments are the simple seven-segment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCDs being extensively used in telecommunications and entertainment electronics.
30

4.5 MAX 232GENERAL DESCRIPTION


Serial RS-232 (V.24) communication works with voltages (-15V ... -3V for high [sic]) and +3V ... +15V for low [sic]) which are not compatible with normal computer logic voltages. On the other hand, classic TTL computer logic operates between 0V ... +5V (roughly 0V ... +0.8V for low, +2V ... +5V for high). Modern low-power logic operates in the range of 0V ... +3.3V or even lwer.

4.6 Pin description When a processor communicates with the outside world, it provides data in byte sized chunks. Computers transfer data in two ways: parallel and serial. In parallel data transfers, often more lines are used to transfer data to a device and 8 bit data path is expensive. The serial communication transfer uses only a single data line instead of the 8 bit data line of parallel communication which makes the data transfer not only cheaper but also makes it possible for two computers located in two different cities to communicate over telephone. Serial data communication uses two methods, asynchronous and synchronous. The synchronous method transfers data at a time while the asynchronous transfers a single byte at a time. There are some special IC chips made by many manufacturers for data communications. These chips are commonly referred to as UART (universal
31

asynchronous receiver-transmitter) and USART (universal synchronous asynchronous receiver transmitter). The AT89C51 chip has a built in UART.In asynchronous method, each character is placed between start and stop bits. This is called framing. In data framing of asynchronous communications, the data, such as ASCII characters, are packed in between a start and stop bit. We have a total of 10 bits for a character: 8 bits for the ASCII code and 1 bit each for the start and stop bits. The rate of serial data transfer communication is stated in bps or it can be called as baud rate. To allow the compatibility among data communication equipment made by various manufacturers, and interfacing standard called RS232 was set by the Electronics industries Association in 1960. This standard is used in PCs and numerous types of equipment. However, since the standard was set long before the advent of the TTL logic family, its input and output voltage levels are not TTL compatible. In RS232, a 1 bit is represented by -3 to -25V, while a 0 bit is represented +3 to +25 V, making -3 to +3 undefined. For this reason, to connect any RS232 to a microcontroller system we must use voltage converters such as MAX232 to connect the TTL logic levels to RS232 voltage levels and vice versa. MAX232 ICs are commonly referred to as line drivers.

32

The RS232 cables are generally referred to as DB-9 connector. In labeling, DB-9P refers to the plug connector (male) and DB-9S is for the socket connector (female). The simplest connection between a PC and microcontroller requires a minimum of three pin, TXD, RXD, and ground. Many of the pins of the RS232 connector are used for handshaking signals. They are bypassed since they are not supported by the 8051 UART chip.

IBM PC/ compatible computers based on x86(8086, 80286, 386, 486 and Pentium) microprocessors normally have two COM ports. Both COM ports have RS232 type connectors. Many PCs use one each of the DB-25 and DB-9 RS232 connectors. The COM ports are designated as COM1 and COM2. We can connect the serial port to the COM 2 port of a PC for serial communication experiments. We use a DB9 connector in our arrangement. The AT89C52 has two pins that are used specifically for transferring and receiving data serially. These two pins are called TXD and RXD and are part of the port3 (P3.0 and P3.1). These pins are TTL compatible; therefore they require a line driver to make them RS232 compatible. One such line driver is the MAX232 chip. One advantage of MAX232 chip is that it uses a +5v power source which is the same as the source voltage for the at89c51. The MAX232 has two sets of line drivers for receiving and transferring data. The line drivers for TXD are called T1 and T2 while the line drivers for RXD are designated as R1 and R2. T1 and R1 are used for TXD and RXD of the 89c51 and the second set is left unused. In MAX232 that the TI line driver has a designation of T1 in and T1 out on pin numbers 11 and 14, respectively. The T1 in pin is the TTL side and is connected to TXD of the microcontroller, while TI out is the RS232 side that is connected to the RXD pin of the DB9 connector.

33

To allow data transfer between PC and the microcontroller system without any error, we must make sure that the baud rate of the 8051 system matches the baud rate of the PCs COM port. When communicating with various microprocessors one need convert the RS232 levels down to lower levels, typically 3.3 or 5.0v.

RS232 -15v .. -3v

TTL +2v.. +5v

logic HIGH

+3v .. +15v

0v..+8v

LOW

Thus the RS232 signal levels are far too high TTL electronics, and the negative RS232 voltage for high cant be handle at all by computer logic. To receive serial data from an RS232 interface the voltage has to be reduced. Also the high and low voltages are to be inverted. This level converter uses MAX232 and five capacitors. The MAX232 from Maxim was the first IC which in one package contains the necessary drivers and receivers to adapt

the RS232 signal voltage levels to TTL logic .It became popular because it just needs one voltage(+5v or +3.3v) and generates the necessary RS232 levels.

34

1 x female serial port connector 1 x MAX232 4 x 1uf capacitor 1 x 10uf capacitor soldering iron,wires,breadboard etc

35

4.7 Schematic Diagram 4.5.1 RXD and TXD pins in the 8052 The 8052 has two pins that are used specifically for transferring and receving data serially. These two pins are called TXD and RXD and are part of the port 3 group. Pin 11 of the 8052 is assigned to TXD and pin 10 is designated has RXD these pins are TTL compatible, therefore, they require a line driver to make them RS232 compatiable. One such line driver is the MAX232 chip. 4.5.2 Serial Communication UART0, UART1 are the two serial com ports present in LPC2148 controller. To perform the communication TxD0, TxD1, RxD0, and RxD1 are used for serial communication purpose. TxD0, TxD1 are the output pins which can send the data from the controller end. RxD0, RxD1 are the input pins which can receive the data from other end. For UART0 TxD0 and RxD0 are use for communication For UART1 TxD1 and RxD1 are use for communication To transmit a data or to receive a data, separate buffer registers are to be used. THR (Transmitting Buffer Register) is the register used for transmitting a data. RBR (Receiving Buffer Register) is the register used for receiving a data. For UART0 U0THR, U0RBR For UART1 U1THR, U1RBR
36

4.5.3 Line Control Register LCR


LCR determines the format of the character that is to be either transmitted or received. It is a 32 bit register of which lower 8 bits are used to set the format.

Bit 0 and 1 are used to set the length of the word i.e, 0 0 5 bit character length 0 1 6 bit character length 1 0 7 bit character length 1 1 8 bit character length For our purpose the character size is 8 bit so we must use Bit 0 as 1 and Bit 1 as 1 Bit-2 is used to select the number of stop bits i.e, 0 1 stop bit 1 2 stop bits For our purpose we use only 1 stop bit so Bit 2 is to be 0. Bit-3 indicates the selection of Parity enable i.e, 0 Disable the parity generation and checking of parity 1 Enable the parity generation and checking of parity For our purpose we simply disable the parity bit so Bit 3 is 0.

37

Bits 4 and 5 are for the selection of type of parity bit, as we dont use any parity bit generation Bit 4 and 5 are to be 0s Bit-6 is to be 0 to disable the break of transmission Bit-7 is the DLAB DLAB Divisor Latch Access Bit Used to access THR and RBR or Divisor Latch Registers DLAB is 0 Disable the access of Divisor Latches and enable THR and RBR to transmit and receive the characters. DLAB is 1 Used to enable in accessing the Divisor Latches 4.5.4 Line Status Register LSR is read only register that provides the status information on Tx and Rx blocks.

Bit-0 is used in receiving mode and Bit-5 is used in transmitting mode. RDR goes high when any character is received; Similarly THRE pin goes high when any character is transmitted. So for transmitting we use UxLSR as 0x20; And for receiving we use UxLSR as 0x01; In order to be able to program the Baud rate generator this bit must be set. The Baud rate generator is a sixteen bit prescaler which divides down Pclk to generate the UART clock
38

which must run at 16 times the Baud rate. Hence the formula used to calculate the UART Baud rate is: Divisor = Pclk/16 x BAUD RATE; Pclk = Cclk/4; Cclk = Fosc * 5; Fosc = 11.0592MHz; Divisor = (((11059200*5)/4)/16) * 9600 180 To set 9600 baud rate load DLL = 0XB4; DLM = 0X00;

4.8 Interfacing Circuit of max232 with LPC2148 UART1 has the same basic structure as UART0; however it has additional support for modem control. This consists of additional external pins to support the full modem interface (CTS, DCD, DSR, DTR, RI, RTS), there are two additional registers the modem control register and the modem status register and an additional interrupt source to provide a modem status interrupt.

39

Programming Serial Communication using UART0 Program to transmit a char


# include<LPC21xx.h> int main ( ) { PINSEL0 = 0X00000001; // to enable TxD0 pin U0LCR U0DLL U0DLM U0LCR = 0X00000083; // to enable Divisor latch registers so as to set baud rate = 0XB4; // to set baud rate 9600 = 0X00; = 0X00000003; // to enable buffer registers either to transmit / Receive

UOTHR= A; while(!(U0LSR & 0X20));//Wait until UOLSR is =0X20 }

Program to transmit a string


# include<LPC21xx.h> int main ( ) {
40

char x [16] = EMBEDDED SYSTEMS; int i; PINSEL0 = 0X00000001; U0LCR = 0X00000083; baud rate U0DLL = 0XB4; U0DLM = 0X00; U0LCR = 0X00000003; Receive for (i=0; i<16;i++) { U0THR=x[i]; while (! (U0LSR & 0X20)); // wait until U0LSR is = 0X20 } } // to enable TxD0 pin // to enable Divisor latch registers so as to set // to set baud rate 9600 // to enable buffer registers either to transmit /

Program to Receive a char


# include<LPC21xx.h> int main ( ) { char x; PINSEL0 = 0X00000001; // to enable TxD0 pin U0LCR U0DLL U0DLM U0LCR x=U0RBR; } = 0X00000083; // to enable Divisor latch registers so as to set baud rate = 0XB4; // to set baud rate 9600 = 0X00; = 0X00000003; // to enable buffer registers either to transmit / Receive

while (! (U0LSR & 0X01));

Program to receive a string


# include<LPC21xx.h> int main ( )
41

{ char x [16]; int i; PINSEL0 = 0X00000001; U0LCR = 0X00000083; baud rate U0DLL = 0XB4; U0DLM = 0X00; U0LCR = 0X00000003; Receive for (i=0; i<16;i++) { while (! (U0LSR & 0X01)); x[i] =U0RBR; } } // wait until U0LSR is = 0X01 // to enable TxD0 pin // to enable Divisor latch registers so as to set // to set baud rate 9600 // to enable buffer registers either to transmit /

4.6 BUZZER
A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or Piezoelectric. Typical uses of buzzers and beepers include alarms, timers and confirmation of user input such as a mouse click or keystroke. Early devices were based on an electromechanical system identical to an electric bell without the metal gong. Similarly, a relay may be connected to interrupt its own actuating current, causing the contacts to buzz. Often these units were anchored to a wall or ceiling to use it as a sounding board. The word "buzzer" comes from the rasping noise that electromechanical buz zers made.

42

Fig:4.9 Piezoelectric disk beeper A piezoelectric element may be driven by an oscillating electronic circuit or other audio signal source, driven with a piezoelectric audio amplifier. Sounds commonly used to indicate that a button has been pressed are a click, a ring or a beep. To interface a buzzer the standard transistor interfacing circuit is used. Note that if a different power supply is used for the buzzer, the 0V rails of each power supply mustbe connected to provide a common reference. If a battery is used as the power supply, it is worth remembering that piezo sounders draw much less current than buzzers. Buzzers also just have one tone, whereas apices sounder is able to create sounds of many different tones. To switch on buzzer -high 1 To switch off buzzer -low 1 0V A piezo sounder or speaker can be used to produce many different sounds, whereas a buzzer can only produce a single tone. Buzzers produce a noise when power is applied, but a piezo or speaker requires a pulsed signal to generate the noise. Fortunately this is very easy to generate from the microcontroller by using the BASIC sound command.
43

4.7 STEPPER MOTOR


4.7.1 INTRODUCTION TO STEPPER MOTOR A stepper motor is a permanent magnet or variable reluctance dc motor that has the following performance characteristics: 1. Rotation in both directions, 2. Precision angular incremental changes, 3. Repetition of accurate motion or velocity profiles, 4. A holding torque at zero speed, and 5. Capability for digital control. A stepper motor can move in accurate angular increments knows as steps in response to the application of digital pulses to an electric drive circuit from a digital controller. The number and rate of the pulses control the position and speed of the motor shaft. Generally, stepper motors are manufactured with steps per revolution of 12, 24, 72, 144, 180, and 200, resulting in shaft increments of 30, 15, 5, 2.5, 2, and 1.8 degrees per step. Feedback is not always required for control, but the use of an encoder or other position sensor can ensure accuracy when it is essential. The advantage of operating without feedback is that a closed loop control system is not required. 4.7.2 Unipolar stepper motor

44

Unipolar stepping motors with 5 or 6 wires are usually wired as shown in the schematic in Figure 1, with a center tap on each of two windings. In use, the center taps of the windings are typically wired to the positive supply, and the two ends of each winding are alternately grounded to reverse the direction of the field provided by that winding. An is available. The motor cross section shown in Figure 1 is of a 30 degree per step motor the difference between these two motor types is not relevant at this level of abstraction. Motor winding number 1 is distributed between the top and bottom stator pole, while motor winding number 2 is distributed between the left and right motor poles. The rotor is a permanent magnet with 6 poles, 3 south and 3 north, arranged around its circumference. For higher angular resolutions, the rotor must have proportionally more poles. The 30 degree per step motor in the figure is one of the most common permanent magnet motor designs, although 15 and 7.5 degree per step motors are widely available. As shown in the figure, the current flowing from the center tap of winding 1 to terminal a causes the top stator pole to be a north pole while the bottom stator pole is a south pole. This attracts the rotor into the position shown. If the power to winding 1 is removed and winding 2 is energized, the rotor will turn 30 degrees, or one step. Assuming positive logic, where a 1 means turning on the current through a motor winding, the following two control sequences will spin the motor illustrated in Figure 1 clockwise 24 steps or 4 revolutions: Winding 1a 1000100010001000100010001 Winding 1b 0010001000100010001000100 Winding 2a 0100010001000100010001000 Winding 2b 0001000100010001000100010 Time ---> Winding 1a 1100110011001100110011001 Winding 1b 0011001100110011001100110 Winding 2a 0110011001100110011001100 Winding 2b 1001100110011001100110011 Time --->
45

Note that the two halves of each winding are never energized at the same time. Both sequences shown above will rotate a permanent magnet one step at a time. The top sequence only powers one winding at a time, as illustrated in the figure above; thus, it uses less power. The bottom sequence involves powering two windings at a time and generally produces a torque about 1.4 times greater than the top sequence while using twice as much power. 4.7.3 Bipolar Stepper Motor

Bipolar permanent magnet and hybrid motors are constructed with exactly the same mechanism as is used on needed to reverse the polarity of each pair of motor poles is more complex. The schematic in Figure 2 shows how such a motor is wired, while the motor cross section shown here is exactly the same as the cross section shown in Figure 1. The drive circuitry for such a motor requires an H-bridge control circuit for each winding. Briefly, an H-bridge allows the polarity of the power applied to each end of each winding to be controlled independently. The control sequences for single stepping such a motor are shown below, using + and - symbols to indicate the polarity of the power applied to each motor terminal: Terminal 1a +---+---+---+--Terminal 1b --+---+---+---+Terminal 2a -+---+---+---+-Terminal 2b ---+---+---+---+ Time --->
46

Note that these sequences are identical to those for a unipolar permanent magnet motor, at an abstract level, and that above the level of the H-bridge power switching electronics, the control systems for the two types of motor can be identical. Note that many full H-bridge driver chips have one control input to enable the output and another to control the direction. Given such bridge chips, one for each winding, the following control sequences will spin the motor identically to the control sequences given above: Enable 1 1111111111111111

Direction 1 1100110011001100 Enable 2 1111111111111111

Direction 2 0110011001100110 Time --->

4.8 ULN 2803


The ULN2803 is designed to be compatible with standard TTL families while theULN2804 is optimized for 6 to 15 volt high level CMOS or

47

Featuring continuous load current ratings to 500 mA for each of the drivers, the Series ULN28xxA/LW and ULQ28xxA/LW high- voltage, high-current Darlington arrays are ideally suited for interfacing between low-level logic circuitry and multiple peripheral power loads. Typical power loads totaling over 260 W (350 mA x 8, 95 V) can be controlled at an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously. The ULx2803A/LW and ULx2804A/LW are the standard Darlington arrays. The outputs are capable of sinking 500 mA and will withstand at least 50 V in the OFF state. Outputs may be paralleled for higher load current capability. The ULx2823A/LW and ULx2824A/ LW will withstand 95 V in the OFF state. 4.8.1 FEATURES TTL, DTL, PMOS, or CMOS Compatible Inputs Output Current to 500 mA Output Voltage to 95 V Transient-Protected Outputs Dual In-Line Package or Wide-Body Small-Outline Package

Coil 1a

Coil 2a

Coil 1b

Coil 2b

Step 1 Step 2 Step 3 Step 4

High Low Low High

High High Low Low

Low High High Low

Low Low High High

Table 4.2: Inputs to stepper motor

48

4.9 DRIVER CIRCUIT\RELAY


Transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). In these cases a relay will be needed, but note that a low power transistor may still be needed to switch the current for the relay's coil!

Fig:4.10 Driver circuit

4.9.1 Advantages Of Relays


Relays can switch AC and DC, transistors can only switch DC. Relays can switch high voltages, transistors cannot. Relays are a better choice for switching large currents (> 5A). Relays can switch many contacts at once.

4.9.2 Disadvantages Of Relays Relays are bulkier than transistors for switching small currents. Relays cannot switch rapidly, transistors can switch many times per second . Relays use more power due to the current flowing through their coil. Relays require more current than many chips can provide, so a low power transistor may be needed to switch the current for the relay's coil.
49

The function is same as that of a normal switch but here in relay no need to press the switch to make it on or off manually, rather a +5volts DC or 0 volt( in our case) will perform the function of making switch on or off respectively. When voltage is applied to the pin of the coils, the coil becomes energized making the switch closed and thus completing the circuit which is connected with the pins of the switch.

4.10 REGULATED POWERSUPPLY


A variable regulated power supply, also called a variable bench power supply, is one where you can continuously adjust the output voltage to your requirements. Varying the output of the power supply is the recommended way to test a project after having double checked parts placement against circuit drawings and the parts placement guide. This type of regulation is ideal for having a simple variable bench power supply. Actually this is quite important because one of the first projects a hobbyist should undertake is the construction of a variable regulated power supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for testing.

50

Most digital logic circuits and processors need a 5 volt power supply. To use these parts we need to build a regulated 5 volt source. Usually you start with an unregulated power supply ranging from 9 volts to 24 volts DC (A 12 volt power supply is included with the Beginner Kit and the Microcontroller Beginner Kit.). To make a 5 volt power supply, we use a LM7805 voltage regulator IC (Integrated Circuit). The IC is shown below

4.10.1 CIRCUIT FEATURES


Brief description of operation: Gives out well regulated +5V output, output current capability of 100 mA Circuit protection: Built-in overheating protection shuts down output when regulator IC gets too hot Circuit complexity: Very simple and easy to build Circuit performance: Very stable +5V output voltage, reliable operation Availability of components: Easy to get, uses only very common basic components Design testing: Based on datasheet example circuit, I have used this circuit successfully as part of many electronics projects Applications: Part of electronics devices, small laboratory power supply Power supply voltage: Unregulated DC 8-18V power supply Power supply current: Needed output current + 5 mA Component costs: Few dollars for the electronics components + the input transformer cost

51

4.11 BLOCK DIAGRAM

Figure 4.11: Block diagram

4.12 POWER SUPPLY CIRCUIT DIAGRAM

52

4.13 EEPROM
OVERVIEW The IS24C02 is a low cost 2,048-bit serial EEPROM. It is fabricated using ISSIs advanced CMOS EEPROM technology and operates from a single supply. The IS24C02 is internally organized as a 256 x 8 memory bank. The IS24C02 features a serial interface and software protocol allowing operation on a simple 2-wire bus. Up to eight IS24C02s may be connected to the 2-wire bus by programming the A0, A1, and A2 inputs.

PIN CONFIGURATION

PIN DESCRIPTIONS A0-A2 SDA SCL WC VCC GND Address Inputs Serial Data I/O Serial Clock Input Write Control Input Power Ground

A0, A1, and A2 - The address inputs are used to set the least significant three bits of the slave address. These inputs may be tied HIGH or LOW, or they may be actively driven.
53

These inputs allow up to eight IS24C02 devices to be connected together on the bus. When left floating, A0, A1 and A2 are pulled to ground. The default values are zeros. Serial Data (SDA) - The SDA pin is a bidirectional pin used to transfer data into and out of the device. Data may change only when SCL is LOW. It is an open-drain output, and may be wire ORed with any number of open-drain or open-collector outputs. Serial Clock (SCL) - The SCL input is used to clock all data into and out of the device. In the WRITE mode, data must remain stable when SCL is HIGH. In the READ mode, data is clocked out on the falling edge of SCL.

4.14 APPLICATIONS
The IS24C02 is ideal for high volume applications requiring low power and low density storage. This device uses a low-cost, space-saving 8-pin plastic package. Candidate applications include robotics, alarm devices, electronic locks, meters and instrumentation.

54

CHAPTER -5 EXECUTION DETAILS


5 .1 Vision3
Vision3 is an IDE (Integrated Development Environment) that helps you write, compile, and debug embedded programs. It encapsulates the following components: A project manager. A make facility. Tool configuration. Editor. A powerful debugger.

To help you get started, several example programs (located in the \C51\Examples, \C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided. HELLO is a simple program that prints the string "Hello World" using the Serial Interface. 5.1.1Building an Application in Vision2 To build (compile, assemble, and link) an application in Vision2, you must: 1. Select Project - (for example, 166\EXAMPLES\HELLO\HELLO.UV2). 2. Select Project - Rebuild all target files or Build target. Vision2 compiles, assembles, and links the files in your project.

5.1.2Creating Your Own Application in Vision2 To create a new project in Vision2, you must 1. Select Project - New Project. 2. Select a directory and enter the name of the project file.
55

3. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the Device Database. 4. Create source files to add to the project. 5. Select Project - Targets, Groups, Files, Add/Files, select Source Group1, and add the source files to the project. 6. Select Project - Options and set the tool options. Note when you select the target device from the Device Database all special options are set automatically. You typically only need to configure the memory map of your target hardware. Default memory model settings are optimal for most applications. 7. Select Project - Rebuild all target files or Build target. 5.1.3 Debugging an Application in Vision2 To debug an application created using Vision2, you must: 1. Select Debug - Start/Stop Debug Session. 2. Use the Step toolbar buttons to single-step through your program. You may enter G, main in the Output Window to execute to the main C function. 3. Open the Serial Window using the Serial #1 button on the toolbar. Debug your program using standard options like Step, Go, Break, and so on. 5.1.4 Starting Vision2 and creating a Project

Vision2 is a standard Windows application and started by clicking on the program icon. To create a new project file select from the Vision2 menu Project New Project. This opens a standard Windows dialog that asks you for the new project file name. We suggest that you use a separate folder for each project. You can simply use the icon Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the file name for the new project, i.e. Project1.

56

Vision2 creates a new project file with the name PROJECT1.UV2 which contains a default target and file group name. You can see these names in the Project Window Files. Now use from the menu Project Select Device for Target and select a CPU for your project. The Select Device dialog box shows the Vision2 device database. Just select the microcontroller you use. We are using for our examples the Philips 80C51RD+ CPU. This selection sets necessary tool options for the 80C51RD+ device and simplifies in this way the tool Configuration

5.2 Building Projects and Creating a HEX Files


Typical, the tool settings under Options Target are all you need to start a new application. You may translate all source files and line the application with a click on the Build Target toolbar icon. When you build an application with syntax errors, Vision2 will display errors and warning messages in the Output Window Build page. A double click on a message line opens the source file on the correct location in a Vision2 editor window. Once you have successfully generated your application you can start debugging. After you have tested your application, it is required to create an Intel HEX file to download the software into an EPROM programmer or simulator. Vision2 creates HEX files with each build process when Create HEX files under Options for Target Output is enabled. You may start your PROM programming utility after the make process when you specify the program under the option Run User Program #1. 5.2.1 CPU Simulation Vision2 simulates up to 16 Mbytes of memory from which areas can be mapped for read, write, or code execution access. The Vision2 simulator traps and reports illegal memory accesses being done.

57

In addition to memory mapping, the simulator also provides support for the integrated peripherals of the various 8051 derivatives. The on-chip peripherals of the CPU you have selected are configured from the Device

5.2.2 Database selection You have made when you create your project target. Refer to page 58 for more Information about selecting a device. You may select and display the on-chip peripheral components using the Debug menu. You can also change the aspects of each peripheral using the controls in the dialog boxes. 5.2.3 Start Debugging You start the debug mode of Vision2 with the Debug Start/Stop Debug Session command. Depending on the Options for Target Debug Configuration, Vision2 will load the application program and run the startup code Vision2 saves the editor screen layout and restores the screen layout of the last debug session. If the program execution stops, Vision2 opens an editor window with the source text or shows CPU instructions in the disassembly window. The next executable statement is marked with a yellow arrow. During debugging, most editor features are still available. For example, you can use the find command or correct program errors. Program source text of your application is shown in the same windows. The Vision2 debug mode differs from the edit mode in the following aspects: The Debug Menu and Debug Commands described on page 28 are Available. The additional debug windows are discussed in the following. The project structure or tool parameters cannot be modified. All build Commands are disabled. 5.2.4 Disassembly Window The Disassembly window shows your target program as mixed source and assembly program or just assembly code. A trace history of previously executed
58

instructions may be displayed with Debug View Trace Records. To enable the trace history, set Debug Enable/Disable Trace Recording. If you select the Disassembly Window as the active window all program step commands work on CPU instruction level rather than program source lines. You can select a text line and set or modify code breakpoints using toolbar buttons or the context menu commands.

59

5.3 SOURCE CODE

1. 2.

Click on the Keil vision Icon on Desktop The following fig will appear

3. 4.

Click on the Project menu from the title bar Then Click on New Project

60

5.

Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

6. 7. 8.

Then Click on save button above. Select the component for u r project. i.e. Atmel Click on the + Symbol beside of Atmel

61

9.

Select AT89C51 as shown below

10. 11.

Then Click on OK The Following fig will appear

12.

Then Click NO for copy of standard code


62

13. 14.

Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.

15.

Click on the file option from menu bar and select new

63

16.

The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.

17. 18.

Now start writing program in either in C or ASM For a program written in Assembly, then save it with extension . asm and for C based program save it with extension .C

19.

Now right click on Source group 1 and click on Add files to Group Source
64

20.

Now you will get another window, on which by default C files will appear.

21. 22. 23.

Now select as per your file extension given while saving the file Click only one time on option ADD Now Press function key F7 to compile. Any error will appear if so happen.

65

24. 25.

If the file contains no error, then press Control+F5 simultaneously. The new window is as follows

26. 27.

Then Click OK Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

66

28.

Drag the port a side and click in the program file.

29. 30.

Now keep Pressing function key F11 slowly and observe. You are running your program successfully

67

CHAPTER- 6 FUTURE SCOPE


1. The performance of the system can be further improved in terms of operating speed, memory capacity by using the advanced controllers. 2. The storage memory of the particular user can be increased by interfacing the controller to the PC for all these transactions. 3. The device can be made to perform better by providing the power supply with the help of Battery to reduce the requirement of main AC supply. 4. A speaking voice alarm used to indicate the unauthorized person accessing the ATM and the Locker system and to indicate the wrong Passport. 5. The system can be made to communicate with modems or mobile phones to alert the user on every transaction in the ATM mode and to alert the authorities in the Passport verification mode.

68

CHAPTER- 7 CONCLUSION
A step by step approach in designing the microcontroller based system for securing the transactions of the user and providing the security for the locker system and even more for the PASSPORT verification using a finger print scanner has been followed. The result obtained in providing the security is quite reliable in all the three modes. The system has successfully overcome some of the aspects existing with the present technologies, by the use of finger print Biometric as the authentication Technology.

69

BIBLIOGRAPHY
1. www.atmel.com 2. www.8051projects.com 3. www.microsoftsearch.com 4. www.geocities.com 5. www.alldatasheet.com 6. www.bioenable.com 7. www.final-yearprojects.co.cc

70

Potrebbero piacerti anche