CHAPTER 1 INTRODUCTION 1.1 ABOUT SOFTWARE PIRACY: The software product duplication is generally called as the piracy.

Starting from operating system to the audio player software we are getting the original as well as the pirated version .this is because main theme behind them is found and copy it’s duplicate and release them cheaper rate. Initially the producer tried to prevent piracy by law such patent ,copy right protection .but it is worth full protect our product at online retail with this copyright protection .hence they went for soft key that is producer can lock product by series of number. This was also came to end by hackers .they first found they key and logic behind it and unlock the original product with the duplicate key. 1.2 OUR PROJECT: To prevent the software piracy we can adapt a new technique. That is providing software with unique hard ware key .here the key code is encrypted into this small chip. That chip can be used as key to unlock the software .unique thing of our project is encrypted code into hardware, hence the code cannot be found by hacker .the software will only work when the key plugged to the computer. Our key is a plug and play device and will not the user to make another copy of the software when key is plugged .the software will not work when key is unplugged 1.3 PLUG AND PLAY DEVICES: The hardware can be interface to the computer with any supporting installation of new software. The plug and play devices does not need the to install any program into the computer to support the device. The windows support plug and play devices hence no need any extra software to support our hard ware key 1.4 SPECIFICATION: The hardware and software specification of our project are as follows; 1.4.1 HARDWARE REQUIREMENTS: 1. AT89S51 microcontroller

2.5v power supply 3. LCD display 4. RS232 connector 1.4.2 LANGUAGES USED: Embedded c, assembly languages. 1.4.3 SOFTWARE USED: 1. Keil compiler 2. Flash programmer 3. Orcad CHAPTER 2 PROCESSING UNIT 2.1 ABOUT DESIGN: Our project is to interface with computer hence first this it must be plug and play for easy interfacing. And size of our project must be small.

BLOCK DIAGRAM
LCD DISPLAY

AT89S51 MICROCONTROLLER UNIT UNIT POWER SUPPLY

RS232

FINGER PRINT SENSOR COMPUTER

FIG: 2.1.1 BLOCK DIAGRAM 2.2 MICROCONTROLLER: When using a microprocessor the size and cost of the circuit will become greater. This is because the microprocessor does not contain an internal memory timers and etc. when providing an external memory, timer etc will make the size our project huge and this would our project cost to rise high. Hence we selected micro controller [1].

2.3 EMBEDDED SYSTEM: We decided our project size must be compact, hence we preferred embedded system [1] .we can also use VLSI but programming step become complex. And needs very huge memory and also the size would become greater. 2.4 PLUG AND PLAY DEVICE:

If any hardware is interfaced with computer the supporting software must be installed .this makes computer interfacing tough .windows can support any plug and play devices without installing support software. Hence our project interfacing becomes easier .main thing behind plug and play is flash memory if we use flash memory to program our interfacing will become easier. 2.5 RS232: Serial communication is basically the transmission or reception of data one bit at a time. Today's computers generally address data in bytes or some multiple thereof. A byte contains 8 bits. A bit is basically either a logical 1 or zero. Every character on this page is actually expressed internally as one byte. The serial port is used to convert each byte to a stream of ones and zeroes as well as to convert a streams of ones and zeroes to bytes. The serial port contains a electronic chip called a Universal Asynchronous Receiver/Transmitter (UART) that actually does the conversion. 2.6 LCD: The BPP-420 and -440 work like a simple serial-receive terminals. They display text in a 4line format on a high-contrast, supertwist LCD Module. They understand common control characters like carriage returns, linefeeds, tabs, backspace, etc. Special characters allow cursor Positioning, backlight control, and the unique “big-character” mode shown above 2.7 FINGER PRINT SENSOR: FIM10-LV (Fingerprint Identification Module) is an evolutionary standalone fingerprint recognition module consisted of optic sensor and processing board. Its voltage is so low (3.3V) enough to implement a series of 23,000 authentication consuming 4 piece of AA batteries and executes average 1.2 seconds of high speed authentication. As CPU and highly upgraded algorithm are embedded into a module, it provides high recognition ratio even to small-size, wet, dry, calloused fingerprint. POWER SUPPLY As we all know any invention of latest technology cannot be activated without the Source of power. So in this fast moving world we deliberately need a proper power source which will be apt for a particular requirement. All the electronic components starting from diode to Intel IC ‘s only work with a DC supply ranging from -+5V to -+12V.We are utilizing for the same, the cheapest and commonly available energy source of 230V – 50Hz and stepping down, rectifying, filtering and regulating the voltage. This will be dealt briefly in the forthcoming sections

. But Microcontroller is concerned with that of bits within the chip. This area is used for stack operations and temporary storage of data. after getting devices. Other portions of the architecture include few 8 bit and 16 bit registers and 8 bit memory locations. Microprocessors are concerned with rapid movement of code and data from external memory. timers/counters. which contains two separate buses for both program and data. 3. customers couldn’t change any thing in their program code. it has two distinctive memory spaces of 64K X 8 size for both program and data. But microcontrollers have a few such instructions. Microprocessors have less bit handling instructions. The memory portion was mapped at the lower end of the Program Memory area. This base architecture is supported with on chip peripheral functions like I/O ports. the most important part of any embedded controller. versatile serial communication port. Each device has some amount of data RAM built in the device for internal processing.1 INTRODUCTION: The generic microcontroller architecture sports a Harvard architecture. but microcontrollers have many such instructions. So. Originally this 8031 architecture was introduced with on chip ‘one time programmable’ version of Program Memory of size 4K X 8. Intel delivered all these microcontrollers (8051) with user’s program fused inside the device.CHAPTER 3 HARDWARE AND SOFTWARE DESCRIPTION 3.2 DIFFERENCES MICROPROCESSOR: BETWEEN MICROCONTROLLER AND Microprocessors have many instructions for moving data from external memory to internal memory. which was already made available inside during device fabrication. It is based on an 8 bit central processing unit with an 8 bit Accumulator and another 8 bit B register as main processing blocks. So it is clear that this architecture was designed to cater many real time embedded needs Now you may be wondering about the non mentioning of memory space meant for the program storage. But.

timer etc and microcontroller needs no such external ports [2].3 PIN CONFIGURATION AND ARCHITECTURE OF AT89S51: . parallel port. 3.Of course Microprocessor needs additional chips for memory.

3.FIG: 3.1 PIN CONFIGURATION .

3.3.1ARCHITECTURE OF AT89S51: .

1: CLOCK . 64K Program Memory address space. Full Duplex UART. 6-source / 5-vector interrupt structure with priority levels.3. Extensive Boolean processing capabilities. 3. 64K Data Memory address space.5 MICROCONTROLLER CLOCK: Microcontroller has an on-chip oscillator It needs an external crystal Crystal decides the operating frequency of the 8051 FIG 3. 128 bytes of on chip Data Memory.FIG: 3. Two 16 bit timer/counters. On-chip clock oscillator.5.4 FEATURES OF AT89S51: The following list gives the features of the microcontroller architecture: Optimized 8 bit CPU for control applications. 32 Bi-directional and individually addressable I/O lines.2 ARCHITECTUREOF AT89S51 3.

as its name suggests. Program Status Word (PSW) and 16 bit registers. Stack Pointer (SP).6 MICRO CONTROLLER RESET RESET is an active High input When RESET is set to High. B register.1 THE ACCUMULATOR: If worked with any other assembly language you will be familiar with the concept of an accumulator register.6. Accumulator (Acc). Microcontroller goes back to the power on state Power-On Reset Push PB and active High on RST Release PB. 3. Capacitor discharges and RST goes low RST must stay high for a min of 2 machine cycles FIG 3. Program Counter (PC) and Data Pointer Register (DPTR).7 CENTRAL PROCESSING UNIT The CPU is the brain of the microcontrollers reading user’s programs and executing the expected task as per instructions stored there in.3. Its primary elements are an 8 bit Arithmetic Logic Unit (ALU). is used as a general register to . The Accumulator.1: RESET CIRCUITRY 3.7. few more 8 bit registers.

In this case. These registers are used as auxiliary registers in many operations. The concept of register banks adds a great level of flexibility to the 8051.2 THE "R" REGISTERS: The "R" registers are sets of eight registers that are named R0. your program may instruct the 8052 to use one of the alternate register banks. or 3. However. Thus. Aside from the MUL and DIV instructions.7. When the 8052 is initialized PC always starts at 0000h and is incremented each time an instruction is executed.4 THE PROGRAM COUNTER (PC): The Program Counter (PC) is a 2-byte address that tells the 8051 where the next instruction to execute is found in memory. 3. 2. register bank 0 (addresses 00h through 07h) is used by default.e. R1. 3. i.accumulate the results of a large number of instructions. register bank 0. More than half of the 8052ís 255 instructions manipulate or use the Accumulator in some way. there are four sets of ‘R’ registers. the “B” register are often used as yet another temporary storage register much like a ninth "R" register. R4 is the same as Internal RAM address 04h. To continue with the above example.3 THE "B" REGISTER: The "B" register is very similar to the Accumulator in the sense that it may hold an 8-bit (1byte) value. The "B" register is only used implicitly by two 8051 instructions: MUL AB and DIV AB. register R4 will now be synonymous with Internal RAM address 0Ch. If you select register bank 2. always remember that the register banks really reside in the first 32 bytes of Internal RAM. 2. It can hold an 8-bit (1-byte) value and is the most versatile register the 8051 has due to the sheer number of instructions that make use of the accumulator. It is important to note that PC isn’t . perhaps you are adding 10 and 20. if your program instructs the 8051 to use register bank 1. 3. When the 8051 is first powered up. and 3. The original number 10 may be stored in the Accumulator whereas the value 20 may be stored in. In this case. For example. especially when dealing with interrupts (we'll talk about interrupts later). for example. To process the addition you would execute the command: As mentioned earlier.7. and if you select register bank 3 it is synonymous with address 1Ch.. R4 will no longer be the same as Internal RAM address 04h. 1.7. register R4. say. register banks 1. if you want to quickly and easily multiply or divide A by another number. However. R4 is synonymous with 14h. you may store the other number in "B" and make use of these two instructions. through R7.

there is no way to ask the 8051 "What address are you about to execute?" As it turns out. When the 8051 is initialized SP will be initialized to 07h. Since some instructions are 2 or 3 bytes in length the PC will be incremented by 2 or 3 in these cases. This order of operation is important. The Stack Pointer is used to indicate where the next value to be removed from the stack should be taken from. as the name suggests. the 8051 returns the value from the memory location indicated by SP and then decrements the value of SP. 3. you can’t do something like PC=2430h. The Accumulator. This makes sense taking into account what was mentioned two paragraphs above: First the 8051 will increment the value of SP (from 07h to 08h) and then will store the pushed value at that memory address (08h). and "B" register are all 1-byte values. It is often used to store 2-byte values that have nothing to do with memory locations. etc.7. That is to say. and RETI.always incremented by one. "R" registers. is used to point to data. If you immediately push a value onto the stack. When you push a value onto the stack. ACALL.6 THE STACK POINTER (SP): The Stack Pointer. While DPTR is most often used to point to data in external memory or code memory. When you pop a value off the stack. The PC just described is a 16-bit value but isn’t directly user-accessible as a working register.) there is no way to read the value of PC. It is also used intrinsically whenever an interrupt is triggered. SP is modified directly by the 8051 by six instructions: PUSH. may hold an 8-bit (1-byte) value. the 8051 first increments the value of SP and then stores the value at the resulting memory location. . DPTR. if you execute LJMP 2430h you’ve effectively accomplished the same thing. It is also interesting to note that while you may change the value of PC (by executing a jump instruction. many developers take advantage of the fact that it’s the only true 16-bit register available.5 THE DATA POINTER (DPTR): The Data Pointer (DPTR) is the 8051 is only user-accessible 16-bit (2-byte) register. 3. On the other hand. POP. this is not completely true: There is one trick that may be used to determine the current value of PC. The Program Counter is special in that there is no way to directly modify its value. like all registers except DPTR and PC. LCALL. It is used by a number of commands that allow the 8051 to access external memory. the value will be stored in Internal RAM address 08h. When the 8052 accesses external memory it accesses the memory at the address indicated by DPTR. RET.7. That is to say.

they can accumulate occurrences of external events (from DC to 500 KHz) with 16 bit precision.7. Working as counter. You can comfortably combine I/O operations and special operations for Port 3 lines.7. The device has 32 I/O pins configured as four eight bit parallel ports (P0. These I/O pins can be accessed directly by memory instructions during program execution to get required flexibility.3. These port lines can be operated in different modes and all the pins can be made to do many different tasks apart from their regular I/O function executions. There is a mode control register and a control register to configure these timers/counters in number of ways. Use software to get longer delays. Each pin can be used as an input or as an output under the software control. Different pins can be configured as input or outputs independent of each other or the same pin can be used as an input or as output at different times. use port P0 as a multiplexed address/data bus. Remaining ports. determine pulse widths or initiate events with one microsecond resolution up to a maximum of 65 millisecond (corresponding to 65. When you don’t use these special functions. 3. Also. But all the 8 lines of P3 support special functions: Two external interrupt lines. I/O operations may be combined in many ways. P2 and P3). P1. low order 8 bits of the address bus are output on P0. which access external memory. At the beginning of an external memory cycle.8 TIMERS / COUNTERS: Microcontroller has two 16 bit Timers/Counters capable of working in different modes.7 INPUT / OUTPUT PORTS: Microcontroller I/O port structure is extremely versatile and flexible. serial port’s two data lines and two timing control strobe lines are designed to use P3 port lines. P1 and P3 are available for standard I/O functions. 536 counts). any instruction that accesses external Program Memory will output the higher order byte on P2 during read cycle. The same pins transfer data byte at the later stage of the instruction execution. Instructions. Even within a single port. two counter inputs. you can use corresponding port lines as a standard I/O. Each consists of a ‘High’ byte and a ‘Low’ byte which can be accessed under software. These timers can be used to measure time intervals. .

the current state of these lines may be read by reading the corresponding bits of the SFRs. 3. P2.8 MICROCONTROLLER PIN FUNCTIONS: 3. P2. P1.8. P1. Likewise. 32 of them are dedicated to I/O lines that have a one-toone relation with SFRs P0. and P3.8.1 I/O PORTS (P0.1:TIMER/COUNTER MODES 3.2 PORT 0: . All of the ports have internal pull-up resistors except for port 0. P3): Of the 40 pins of the typical 8052.FIG:3.7. The developer may raise and lower these lines by writing 1s or 0s to the corresponding bits in the SFRs.

port 2 is used to output the high byte of the memory address that is to be accessed. port 2 may be used to access other devices as long as the devices are not being accessed at the same time a MOVX instruction is using port 2 to address external RAM. P1. Note that there are no pull-up resistors on port 0. port 0 cannot be utilized for other purposes since the state of the I/O lines are constantly being modified to access external code memory. a 1-0 transition on this line will cause timer 2 to be reloaded with the auto-reload value.8. the microcontroller will automatically use the port 0 I/O lines to access each instruction that is to be executed.4 PORT 2: Like port 0. If the circuit requires external RAM or ROM. then timer 2 will be incremented whenever there is a 1-0 transition on this line. In this case.5 PORT 3: . In this case. the microcontroller will automatically use port 0 to clock in/out the 8-bit data word as well as the low 8 bits of the address in response to a MOVX instruction and port 0 I/O lines may be used for other functions as long as external RAM isn’t being accessed at the same time. If the circuit requires external code memory. Unlike port 0. Further. port 2 is dual-function. P1. and other devices. which may cause an interrupt if so enabled. the microcontroller will automatically use the port 2 I/O lines to access each instruction that is to be executed. typical derivatives do not use port 1 for any functions themselves.0 is the clock source for timer 2.Port 0 is dual-function in that it in some designs port 0ís I/O lines are available to the developer to access external devices while in other designs it is used to access external memory. With C/T2 set.3 PORT 1: Port 1 consists of 8 I/O lines that you may use exclusively to interface to external parts.8. With 8052 derivatives. P1. These two lines are not assigned these special functions on 8051ís since 8051ís don’t have a timer 2. 3. these lines can still be used for your own purposes if you don’t need these features of timer 2. In these cases. port 2 cannot be utilized for other purposes since the state of the I/O lines are constantly being modified to access external code memory. Port 1 is commonly used to interface to external hardware such as LCDs. 3. keypads.8.3 (EXEN2) is set. When the MOVX @DPTR instruction is used.6 (EXF2) external flag to be set.0 (T2): If T2CON.1 is set (C/T2). two bits of port 1 are optionally used as described for extended timer 2 functions. so it may be necessary to include your own pull-up resistors depending on the characteristics of the parts you will be driving via port 0.1 (T2EX): If timer 2 is in auto-reload mode and T2CON. If the circuit requires external code memory. In some circuit designs it is available for accessing devices while in others it is used to address external RAM or external code memory. 3. This will also cause the T2CON.

Note that when interfacing an 8052 to an RS-232 port that you may not connect this line directly to the RS232 pin.3 (-INT1): When so configured. rather. This pin is available for any use the developer may assign it if the circuit does not need to trigger an external 1 interrupt. P3. P3. Please see the chapter on interrupts for details.1 (TXD): The UART/serial port uses P3.’ This may either be low-level triggered or may be triggered on a 1-0 transition.4 (T0): When so configured.’ In circuit designs that will be using the microcontroller’s internal serial port. this line is used to trigger an ‘External 0 Interrupt. This pin is available for any use the developer may assign it if the circuit does not to control timer 1 externally. This pin is available for any use the developer may assign it if the circuit does not to control timer 0 externally.Port 3 consists entirely of dual-function I/O lines. This line will be asserted low by the microcontroller whenever a MOVX instruction writes to external RAM.5 (T1): When so configured. this line is used as the clock source for timer 1. P3. Please see the chapter on interrupts for details. This line should be . While the developer may access all these lines from their software by reading/writing to the P3 SFR. This pin is available for any use the developer may assign it if the circuit has no need to receive data via the integrated serial port. Note that when interfacing an 8052 to an RS-232 port that you may not connect this line directly to the RS-232 pin. depending on how the timer is configured. Timer 1 will be incremented either every instruction cycle that T1 is high or every time there is a 1-0 transition on this line.1 as the ‘transmit line. this line is used as the clock source for timer 0. This pin is available for any use the developer may assign it if the circuit does not need to trigger an external 0 interrupt. this is the line into which serial data will be clocked. P3.0 as the receive line. P3. P3. depending on how the timer is configured. Timer 0 will be incremented either every instruction cycle that T0 is high or every time there is a 1-0 transition on this line. P3. you must pass it through a part such as the MAX232 to obtain the correct voltage levels. you must pass it through a part such as the MAX232 to obtain the correct voltage levels. this is the line that the microcontroller will clock out all data which is written to the SBUF SFR.6 (-WR): This is external memory write strobe line. In circuit designs that will be using the microcontroller’s internal serial port. Please see the chapter on timers for details.’ This may either be low-level triggered or may be triggered on a 1-0 transition. rather.2 (-INT0): When so configured. this line is used to trigger an ‘External 1 Interrupt.0 (RXD): The UART/serial port uses P3. each pin has a pre-defined function that the microcontroller handles automatically when configured to do so and/or when necessary. This pin is available for any use the developer may assign it if the circuit has no need to transmit data via the integrated serial port. Please see the chapter on timers for details.

Keep in mind that Internal RAM is not affected by a reset. 3.7 RESET LINE (RST): Pin 9 is the master reset line for the microcontroller. exerting ALE high to latch the low-byte of the address into a latch IC (such as the 74HC573). It is also common to connect the reset line to a watchdog IC or a supervisor IC (such as MAX707). SFRs. The latter is highly recommended for commercial and professional designs since traditional resistor-capacitor networks attached to the reset line. This line should be connected to the RAM’s write (-W) line. this isn’t necessarily the case. When this pin is brought high for two instruction cycles. This is because.8 ADDRESS LATCH ENABLE (ALE): The ALE at pin 30 is an output-only pin that is controlled entirely by the microcontroller and allows the microcontroller to multiplex the low-byte of a memory address and the 8-bit data itself on port 0. are not terribly reliable. The reset line is often connected to a reset button/switch that the user may press to reset the circuit. are restored to their default conditions and the program counter will be reset to 0000h. This line will be asserted low by the microcontroller whenever a MOVX instruction writes to external RAM. 3.8. This is accomplished by placing the low-byte of the address on port 0.0592 MHz as well as 12 MHz. while often sufficient for students or hobbyists. 3. .8. including the I/O ports.6 OSCILLATOR INPUTS (XTAL1. A TTL clock source may also be attached to XTAL1 and XTAL2 to provide the microcontroller’s clock. P3. while the high-byte of the memory address is sent On port 2. This pin is available for any use the developer may assign it if the circuit does not write to external RAM using MOVX. Common crystal frequencies are 11. the microcontroller is effectively reset.7 (-RD): This is external memory write strobe line. This pin is available for any use the developer may assign it if the circuit does not read from external RAM using MOVX. The microcontroller will begin executing code at 0000h when pin 9 returns to a low state. port 0 is used both to send the low byte of the memory address and the data itself. XTAL2): The 8052 is typically driven by a crystal connected to pins 18 (XTAL2) and 19 (XTAL1). and then placing the 8 data-bits on port 0. While a crystal is the normal clock source.8. In this way the 8052 is able to output a 16-bit address and an 8-bit data word with 16 I/O lines instead of 24. although many newer derivatives are capable of accepting frequencies as high as 40 MHz.connected to the RAM’s write (-W) line.

843. The serial port contains an electronic chip called a Universal Asynchronous Receiver/Transmitter (UART) that actually does the conversion. Whenever the serial port sends a logical zero (0) a positive voltage is affected. The serial port has many pins. Of course. .9 PROGRAM STORE ENABLE (-PSEN): The Program Store Enable (PSEN) line at pin 29 is exerted low automatically by the microcontroller whenever it accesses external code memory. the serial port's transmit pin's voltage is negative (1) and is said to be in a MARK state. If EA is tied low (to ground) then it will attempt to execute the program it finds in the attached external code memory EPROM.0592 MHz. 3. your EPROM must be properly connected for the microcontroller to be able to access your program in external code memory. Today's computers generally address data in bytes or some multiple thereof. (The terms MARK and SPACE are also used to simply denote a negative voltage (1) or a positive voltage (0) at the transmit pin respectively).8. This line should be attached to the Output Enable (-OE) pin of the EPROM that contains your code memory. Note that the serial port can also be forced to keep the transmit pin at a positive voltage (0) and is said to be the SPACE or BREAK state.200 times per second. A byte contains 8 bits. The serial port is used to convert each byte to a stream of ones and zeroes as well as to convert stream of ones and zeroes to bytes. We will discuss the transmit and receive pin first. 3. ALE will pulse at a rate of 1/6th that of the oscillator frequency. Electrically speaking. PSEN will not be exerted by the microcontroller and will remain in a high state if your program is being executed from internal code memory.9 SERIAL COMMUNICATION: Serial communication is basically the transmission or reception of data one bit at a time.The ALE line is used in this fashion both for accessing external RAM as well as for accessing instructions in external code memory. The only exception is when the MOVX instruction is executed one ALE pulse is missed in lieu of a pulse on WR or RD.8. Thus if the oscillator is operating at 11. Every character on this page is actually expressed internally as one byte.10 EXTERNAL ACCESS (-EA): The External Access (-EA) line at pin 31 is used to determine whether the 8052 will execute your program from external code memory or from internal code memory. A bit is basically either a logical 1 or zero. whenever the serial port sends a logical one (1) a negative voltage is effected on the transmit pin. ALE will pulse at a rate of 1. When your program is executed from external code memory. When no data is being sent. 3. If EA is tied high (connected to +5V) then the microcontroller will execute the program it finds in internal/onchip code memory.

6. Therefore. then the last transmitted data bit will always be a logical 0. This value in general is 1 or 2. The sequence is repeated for each byte sent. odd. The baud rate is the number of times the signal can switch states in one second. then the last data bit transmitted will be a logical 1 if the data transmitted had an even amount of 0 bits. Remembering that bits are transmitted from least significant bit . space. FiIG: 3. or 8 bits) followed by one or two STOP BITs which is a negative(1) voltage. The second characteristic is parity. It is dependent on the baud rate. mark. or none. The binary representation of the letter 'A' is 01000001. then the last data bit transmitted will be a logical 1 if the data transmitted had an odd amount of 0 bits. If odd parity. The parity characteristic can be even. This means each bit has the duration of 1/9600 of a second or about100µsec. how long does the signal stay in a particular state to define a bit?. If even parity. then the last transmitted data bit will always be a logical 1.1 BYTE TRANSMISSIONS At this point you may want to know what the duration of a bit is. followed by the data (general 8 bits. 7. In other words. This length in general can be anywhere from 5 to 8 bits. the line can switch states 9. If no parity then there is no parity bit transmitted. Assume we want to send the letter 'A' over the serial port. When transmitting a character there are other characteristics other than the baud rate that must be known or that must be setup. The answer is simple.600 times per second. but could be 5. If MARK parity. The third characteristic is the amount of stop bits. Figure 1 shows a diagram of what a byte transmission would look like. the UART (serial port) first sends a START BIT which is a positive voltage (0). if the line is operating at 9600 baud. If SPACE parity.When transmitting a byte.9. The first characteristic is the length of the byte that will be transmitted. These characteristics define the entire interpretation of the data stream.

In the case of the above example. As such. but not at the same time. asserted by terminals to show their presence. It re-asserts it when it can receive again. 1 stop bit. asserted by modems if they can receive data. The above paragraph alluded to hardware flow control.(LSB) to most significant bit (MSB). the bit stream transmitted would be as follows for the line characteristics 8 bits. up to 960 bytes can be transferred in one second. A terminal does the same thing instead with the RTS signal. LSB (0 1 0 0 0 0 0 1 0 1) MSB The above represents (Start Bit) (Data Bits) (Stop Bit) To calculate the actual byte transfer rate simply divide the baud rate by the number of bits that must be transferred for each byte of data. signal ground. The above discussion was concerned with the "electrical/logical" characteristics of the data stream. transmit data line. no parity. Data Set Ready (DSR). Serial communication can be half duplex or full duplex. The section RS232 Cabling describes these signals and how they are connected. asserted by terminals if they can receive data. and 9600 baud. Another method of hardware flow control in practice is to perform the same procedure in the previous paragraph except that the DSR and DTR signals are used . at 9600 baud. asserted by modems to show their presence. asserted by modems to signal a successful connection to another modem. asserted by modems to signal the phone ringing. Half duplex communication is all but outdated except for a very small focused set of applications. signal ground and the data line. Full duplex communication means that a device can receive and transmit data at the same time. Data Terminal Ready (DTR). Ring Indicator (RI). Half duplex serial communication needs at a minimum two wires. We will expand the discussion to line protocol. Full duplex serial communication needs at a minimum three wires. It can do them both. A modem in general drops (logical 0) its CTS line when it can no longer receive characters. Request To Send (RTS). and receive data line. The RS232 specification governs the physical and electrical characteristics of serial communications. These signals are the Carrier Detect Signal (CD). each character requires 10 bits to be transmitted for each character. Half duplex means that the device cannot send and receive at the same time. Clear To Send (CTS). Hardware flow control is a method that two connected devices use to tell each other electronically when to send or when not to send data. This specification defines several additional signals that are asserted (set to logical 1) for information and control beyond the data signals and signal ground.

Communication links like present in the Norton Commander program can use this null modem cable. The computer out through an Ethernet card is 12v. This character is generally a hexadecimal 11. with this simple null modem cable no hardware flow control can be implemented. 3. when a device can no longer receive. If using this method. This method requires a simple 3 wire serial communication link.9. This null modem cable can also be used when communicating with devices which do not have modem control signals like electronic measuring equipment etc. Note that hardware flow control requires the use of additional wires. 3. If the software on both sides is well structured. their signal level will never go high. Another method of flow control used is known as software flow control. if either of the two devices checks the DSR or CD inputs. . This might cause a problem. this three wire null modem cable is often talked about. The only way to perform flow control is with software flow control using the XOFF and XON characters. This causes the software to hang because no physical connection is present to either CTS line to make this possible. it will transmit a character that the two devices agreed on. transmit data.this max 232 interfaces them and voltage between them is adjusted by this max232 [1]. it is simple but can we use it in all circumstances? There is a problem. This character is known as the XOFF character. the RTS output is set high and then a waiting cycle is started until a ready signal is received on the CTS line. As they are not connected.the microcontroller works at 5v.2 MAX232: This acts as an level shifter in interfacing an high voltage device with low voltage device. that this null modem cable is useless. The only type of communication which is allowed on such a null modem line is data-only traffic on the cross connected Rx/Tx lines. The benefit to this however is crisp and reliable flow control. and signal ground. When a device can receive again it transmits an XON character that both devices agreed to. This does however not mean. for example when a computer interfaces with an microcontroller.9. As you can imagine. receive data. These signals normally define the ability of the other side to communicate. This character is generally a hexadecimal 13.1 COMPATIBILTY ISSUES: If you read about null modems. Yes.for the handshake. The same holds for the RTS/CTS handshaking sequence.

They understand common control characters like carriage returns.1EASY TO USE DATA DISPLAYS: The BPP-420 and -440 work like a simple serial-receive terminals. and voltage-generator functions are available as cells in the Texas Instruments Lin ASIC library. etc.3 V and a typical hysteresis of 0.1 LCD 3.10 LCD Introduction FIG3. . They display text in a 4line format on a high-contrast. backspace.10.10. receiver. FIG: 3.5 V. and can accept ±30-V inputs.5.The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply.1: MAX 232 3. tabs. These receivers have a typical threshold of 1. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. backlight control.9. Special characters allow cursor Positioning. supertwist LCD Module. The driver. and the unique “big-character” mode shown above. Each driver converts TTL/CMOS input levels into EIA-232 levels. linefeeds.

10. The manuals include program examples for the BASIC Stamps® I and II. a right-alignment instruction for easy data-field formatting. For new applications.10. or compatibility with existing Backpack applications[2]. 3. They’re also compatible with the text-mode instructions for our graphics displays. since they understand a sensible subset of the ASCII control characters. consider our ILM-216 for the best mix of price and features. making the transition from one display to another a snap. and 9600 bps. 1 stop bit). plus PC BASIC.2 LCD SERIAL INTERFACE BPI-216s consist of a supertwist 2x16 LCD with a serial interface factory installed. ground. Data rates are set by configuration switches. and serial data (RS-232 or inverted TTL level. 8 data bits. Interfacing is easy—just connect +5V. You already know how to program for these displays. New features in the current release (rev 3. lowest current draw. and a larger serial buffer. the 4x40 accepts 1200.The displays will even drive a (customer-provided) piezo buzzer for audio alerts. . no parity. FIG:3. For compatibility with our older 4x20 displays. But the BPI-216 is the right choice if you require the smallest footprint. The 4x20 display supports data rates of 2400 and 9600 bps. 4800. And the BPP-420 can emulate our simpler LCD Serial Backpack interface.2 COMPATIBILITY AND FEATURES: The BPP-420 and BPP-440 use identical sets of control characters. 2400.0 or higher) of these products include big-alpha Capability (letters A—Z added to large-character mode).

11 FINGER PRINT SENSOR: FIM10-LV (Fingerprint Identification Module) is an evolutionary standalone fingerprint recognition module consisted of optic sensor and processing board. Convenient DK without a connection to PC. it provides high recognition ratio even to small-size. Accurate authentication ratio even to small-size/wet/dry fingerprint. wet.11.2 seconds of high speed authentication. Economical due to low voltage consumption 3. Fast acquisition of difficult finger types under virtually any condition.We are utilizing for the same. Various authentication using 1:1/1: N matching and Password. passes instructions to LCD Display of choice for BASIC Stamp® applications 10s of thousands sold! 3. Due to technologies of simple and robust hardware design and including keypad function of the existed DK in one board.3V) enough to implement a series of 23.2 APPLICATIONS: Door Lock System Safe Box Simple Access Controller Vehicle Control POWER SUPPLY As we all know any invention of latest technology cannot be activated without the Source of power.000 authentication consuming 4 piece of AA batteries and executes average 1. 3.2400/9600 baud serial input Lowest current draw: 2 . dry. calloused fingerprint. All the electronic components starting from diode to Intel IC ‘s only work with a DC supply ranging from -+5V to +12V.3mA Simple protocol prints text.11.1 FEATURES: Built-in fingerprint authentication. the cheapest and commonly available energy . As CPU and highly upgraded algorithm are embedded into a module. Its voltage is so low(3. So in this fast moving world we deliberately need a proper power source which will be apt for a particular requirement. it can be executed to develop viable applications and perform user enrollment and authentication needed for fingerprint recognition without a connection to PC.

rectification is normally achieved using a solid state diode. Reversing the polarity of voltage will not permit electron flow. As AC is applied to the diode. only electrons flow when the anode and cathode is negative. Diode has the property that will let the electron flow easily in one direction at proper biasing condition.2 RECTIFIER UNIT: In the power supply unit.1 POWER SUPPLY 3.1.1 BLOCK DIAGRAM: FIG3.source of 230V – 50Hz and stepping down. rectifying. The DC voltage appearing across the output terminals of the bridge rectifier will .12. filtering and regulating the voltage. This will be dealt briefly in the forth-coming sections.14.12. A commonly used circuit for supplying large amounts of DC power is the bridge rectifier. 3. Two diodes will conduct during negative cycle and the other two will conduct during the positive half cycle. A bridge rectifier of four diodes (4*IN4007) are used to achieve full wave rectification.

Since each alteration produces a resulting output pulse.8V pulsating DC. two diodes are connected to the positive voltage at the top winding and only one diode conducts. 3.5% of the load. the voltage can be maintained within a close tolerant region of the desired output. is used not only to ‘short’ the ripple with frequency of 120Hz to ground but also to leave the frequency of the DC to appear at the output.12. At the same time one of the other two diodes conducts for the negative voltage that is applied from the bottom winding due to the forward bias for that diode.C1R1 is for bypassing ripples.be somewhat less than 90% of the applied RMS value. it passes only low frequency signals and bypasses high frequency signals. The primary purpose of a regulator is to aid the rectifier and filter circuit in providing a constant DC voltage to the device. Normally one alteration of the input voltage will reverse the polarities. For a positive cycle. A load resistor R1 is connected so that reference to the ground is maintained. i. .4 VOLTAGE REGULATOR: The voltage regulators play an important role in any power supply unit.e.C2R2 is used as a low pass filter.3 FILTER UNIT: Filter circuits which are usually capacitors acting as a surge arrester always follow the rectifier unit. Power supplies without regulators have an inherent problem of changing DC voltage values due to variations in the load or due to fluctuations in the AC liner voltage. The output obtained is not a pure DC and therefore filtration has to be done. The DC output has a ripple frequency of 100Hz. frequency =2*50Hz. 3. This capacitor is also called as a decoupling capacitor or a bypassing capacitor. With a regulator connected with the DC output. Opposite ends of the transformer will therefore always be 180 degree out of phase with each other.12. The load resistor should be 1% to 2. In this circuit due to positive half cycle D1 & D2 will conduct to give 10.

4. CHAPTER SOFTWARE DESCRIPTION .

assembler. because they allow different applications to be loaded and peripherals to be connected. For example. the we debug them the compilation is done We run the program and check the out put . 4.then the code is translated to assembly language program. to large stationary installations like factory controllers.4.2 EMBEDDED SYSTEM: An '''embedded system''' is a special-purpose computer system designed to perform one or a few dedicated functions. as many systems have some element of programmability. a general-purpose computer. The compilation of program becomes easy in embedded c. or the systems controlling nuclear power plans. or increasing the reliability and performance. design engineers can optimize it. handheld computers share some elements with embedded systems &mdash. reducing the size and cost of the product. benefiting from economies of scale. to very high with multiple units. This software can act as an editor compiler. It is usually ''embedded'' as part of a complete device including hardware and mechanical parts. In contrast.h> . "embedded system" is not an exactly defined term. In general. We first create the coding our program. with a single microcontroller chip. Then the assembly language code is embedded to the system using flash programmer. The embedded c program is shown. #include<stdio. Since the embedded system is dedicated to specific tasks. Physically. Embedded systems have become very important today as they control many of the common devices we use. Hence we prefer KEIL compiler. such as a personal computer. can do many different tasks depending on programming. Complexity varies from low. We are using KEIL compiler software to create and compile the software. peripherals and networks mounted inside a large chassis or enclosure.h> #include<reg51. such as the operating systems and microprocessors which power them &mdash. For simplicity if we use the VHDL the program length would become large and the large memory will be required. Some embedded systems are mass-produced.1 STEPS TO PROGRAM: We prefer embedded c as our programming language. but are not truly embedded systems. embedded systems range from portable devices such as digital watches and MP3 players.

while(1) { if(trans ==1) { SBUF = 0x42.ch. delay2(1). } . trans =0. } if(trans ==2) { SBUF = 0x44. EA=1. void delay2(int). void delay1(int).void serial_init(void). ES=1. trans =0. delay2(1). void main() { serial_init(). unsigned char trans.

delay2(1). delay2(1). } if(trans ==4) { SBUF = 0x48. trans =0. trans =0.if(trans ==3) { SBUF = 0x46. } } } void serial_init(void) { TMOD =0x20. TR1=1. TH1=0xFD. SCON=0x50. } void delay2(int n) { .

break.i++) delay1(1000).i<n. } void delay1(int n) { int i. for(i=0. switch(ch) { case 0x41: trans =1. case 0x45: .i++). case 0x43: trans =2.i<n.int i. } void serialP () interrupt 4 { if(RI==1) { ch = SBUF . for(i=0. break.

No extra hardware or test equipment is required. Now developers can find exactly where programs spend the most time. break. An Execution Profiler that measures time spent in each function. macro assemblers. and assembler instruction. and evaluation boards for the 8051. The Keil µVision Debugger simulates the complete ARM instruction-set as well as the on-chip peripherals for each device in the AT91 ARM/Thumb microcontroller family. } SCON = 0x50. "Using nothing more than the provided simulation support and debug scripts. integrated environments. The Logic Analyzer and Execution Profiler . 251. case 0x49: trans =5. Keil Software is pleased to announce simulation support for the Atmel ARM family of microcontrollers. debuggers. source line. case 0x47: trans =4. The integrated simulator provides complete peripheral simulation.3 KEIL SOFTWARE: Keil Software makes C compilers. simulators. break. real-time kernels. and XC16x/C16x/ST10 microcontroller families. } } 4. ARM. Other new features in the µVision Debugger include: An integrated Software Logic Analyzer that measures I/O signals as well as program variables and helps developers create complex signal processing algorithms.trans =3. break. developers can create a high-fidelity simulation of their actual target hardware and environment.

the programmer creates an application. ran to two or three pages. which could be written in four lines in MSDOS. dialog. 4. President of Keil Software USA. Although this environment was like a boon to the user. It is one of the first languages to support event driven programming a style of program especially suited to graphical user interface." said Jon Ward. The demand for faster.4 VISUAL BASIC: The Microsoft VB programming system for windows is an exciting advance for anyone who is involved in writing window base applications. boxes etc are easily designed and these features require no more than a few lines of programming to control. 4. A simple program to display a message on the screen. fonts. moving the mouse etc. Its simplicity made it easy for the users to write amazing programs. smaller and easy to use software led to the development of Microsoft quick Base. the programmer writes a program that responds the users action like choosing a command. The aim in modern computer application is to have the user in charge. It represents the animated view of the moving train with boogies with the multimedia effects etc. This was in line with the programming language technology of the 1980’s but an even bigger change was on the horizon namely. graphical user interface (GUI). Inc. life was suddenly a lot together for programmers. This project has been done with a virtual view of the traction of the train. Instead of writing a program that plots out every step in precise order. which is a collection of cooperating many programs. now.will help developers when it comes time to develop and tune signaling algorithms.VB lets you take full advantage of the window graphical environment to built powerful application quickly. Over the years this programming language was enhanced and developed. It provides simplicity and ease of use without sacrificing performance or the graphical features that make window such a pleasant environment to work in Menus. . As more people began to use computers the isotonic and complicated languages used for programming became more of an obstacle. Instead of writing on large program. A language called BASIC was developed to counteract this. simpler.5 PROGRAMMING FOR WINDOW WITH VB: The VB programming system packages up the complexity of windows in a truly amazing way.

The flow chart of program is shown. F LOW CHART: .6 FEATURES: Improved performance Visual data access with the data control so that it is possible to create data browsing application without writing code.4. A new OLE (object linking and embedding) control A collection of common dialog boxes that streamline common user interface tasks.

3.NO FIG:2.1 YES NO .

YES NO YES NO .

NO YES Verify authentication and login into the software The program code for hardware key verification is shown below Private blnStatus As Boolean .

Input Call handleinput(strDataBuf) If blnStatus = True Then Exit Sub End Select End Sub Private Sub handleinput(strDataBuf As String) txtCode.Text & strDataBuf If txtCode.Text = "SECRET CODE1000123451357" Then txtCode.Value = pbrStatus.Text = txtCode.Text = "" For i = 0 To 9 On Error Resume Next pbrStatus.Value + 1 Sleep (300) Next i KeyOk If blnStatus = True Then Exit Sub End If End Sub .CommEvent Case comEvReceive strDataBuf = strDataBuf & Comm.Dim i Private Sub Comm_OnComm() Dim strDataBuf As String Select Case Comm.

8.RThreshold = 1 .n.Enabled = True Comm.InputMode = comInputModeText . "Choose Comm Port".SThreshold = 10 . 1) If intPortId = 0 Then Exit Sub End If With Comm .PortOpen = True .1" .Handshaking = 0 .Text = "" Me.Settings = "9600.Private Sub Form_Load() intPortId = InputBox("Enter Comm Port Number to which device is connected ".Hide .RTSEnable = True .CommPort = intPortId .Output = "C" End Sub Private Sub KeyOk() txtCode.InputLen = 1 End With tmrVerify.

Show blnStatus = True End Sub .mdiMain.

exe extension address of the folder or file. SCOPE OF OUR FURTHER DEVOPEMENT: We can also lock any other important files and folders in our computer by mentioning the . Hence any one user can using key with password can only access the folder. Further our project code can also be written in flash memory pen drive alike device . If there is it will not allow the to duplicate it by making an other copy of it.5.this would become small in size and need no installation of supporting soft wares for our key 1 . then can find sequence of key using few keys . because to pirate we know the key of software. Hence information theft can also be avoided in any organization. cannot make any other duplicate copy of it. hence hacker can never find the key and logic behind it . Hence never software can be pirated i.but here key code is encrypted using embedded system. hence where is no key the software will not open. our project key is like an hardware key for bike and lock.e. CONCLUSION Our project much better than any other piracy preventing project.

Sign up to vote on this title
UsefulNot useful