P. 1
SATISH REPORT

SATISH REPORT

|Views: 88|Likes:
Publicado porGay Ku

More info:

Published by: Gay Ku on Jan 26, 2011
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

10/29/2012

pdf

text

original

Sections

  • 1.1 ABOUT SOFTWARE PIRACY:
  • 1.2 OUR PROJECT:
  • 1.3 PLUG AND PLAY DEVICES:
  • 1.4.1 HARDWARE REQUIREMENTS:
  • 1.4.2 LANGUAGES USED:
  • 1.4.3 SOFTWARE USED:
  • 2.1 ABOUT DESIGN:
  • 2.2 MICROCONTROLLER:
  • 2.3 EMBEDDED SYSTEM:
  • 2.4 PLUG AND PLAY DEVICE:
  • 2.5 RS232:
  • 2.6 LCD:
  • 2.7 FINGER PRINT SENSOR:
  • 3.1 INTRODUCTION:
  • 3.2 DIFFERENCES BETWEEN MICROCONTROLLER AND MICROPROCESSOR:
  • 3.3 PIN CONFIGURATION AND ARCHITECTURE OF AT89S51:
  • 3.4 FEATURES OF AT89S51:
  • 3.5 MICROCONTROLLER CLOCK:
  • 3.6 MICRO CONTROLLER RESET
  • 3.7.1 THE ACCUMULATOR:
  • 3.7.2 THE "R" REGISTERS:
  • 3.7.3 THE "B" REGISTER:
  • 3.7.4 THE PROGRAM COUNTER (PC):
  • 3.7.5 THE DATA POINTER (DPTR):
  • 3.7.6 THE STACK POINTER (SP):
  • 3.7.7 INPUT / OUTPUT PORTS:
  • 3.7.8 TIMERS / COUNTERS:
  • 3.8.1 I/O PORTS (P0, P1, P2, P3):
  • 3.8.2 PORT 0:
  • 3.8.3 PORT 1:
  • 3.8.4 PORT 2:
  • 3.8.5 PORT 3:
  • 3.8.6 OSCILLATOR INPUTS (XTAL1, XTAL2):
  • 3.8.7 RESET LINE (RST):
  • 3.8.8 ADDRESS LATCH ENABLE (ALE):
  • 3.8.9 PROGRAM STORE ENABLE (-PSEN):
  • 3.8.10 EXTERNAL ACCESS (-EA):
  • 3.9.1 COMPATIBILTY ISSUES:
  • 3.9.2 MAX232:
  • 3.10.1EASY TO USE DATA DISPLAYS:
  • 3.10.2 COMPATIBILITY AND FEATURES:
  • 3.11.1 FEATURES:
  • 3.11.2 APPLICATIONS:
  • 3.12.1 BLOCK DIAGRAM:
  • 3.12.2 RECTIFIER UNIT:
  • 3.12.3 FILTER UNIT:
  • 3.12.4 VOLTAGE REGULATOR:
  • 4.1 STEPS TO PROGRAM:
  • 4.2 EMBEDDED SYSTEM:
  • 4.3 KEIL SOFTWARE:
  • 4.4 VISUAL BASIC:
  • 4.5 PROGRAMMING FOR WINDOW WITH VB:
  • 4.6 FEATURES:
  • 5. CONCLUSION

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

after getting devices. Microprocessors have less bit handling instructions. which was already made available inside during device fabrication. Intel delivered all these microcontrollers (8051) with user’s program fused inside the device. But Microcontroller is concerned with that of bits within the chip. 3. This area is used for stack operations and temporary storage of data. So. Each device has some amount of data RAM built in the device for internal processing. 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.2 DIFFERENCES MICROPROCESSOR: BETWEEN MICROCONTROLLER AND Microprocessors have many instructions for moving data from external memory to internal memory. Originally this 8031 architecture was introduced with on chip ‘one time programmable’ version of Program Memory of size 4K X 8. which contains two separate buses for both program and data. timers/counters.1 INTRODUCTION: The generic microcontroller architecture sports a Harvard architecture. . the most important part of any embedded controller. 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. Microprocessors are concerned with rapid movement of code and data from external memory. The memory portion was mapped at the lower end of the Program Memory area. but microcontrollers have many such instructions. But microcontrollers have a few such instructions. Other portions of the architecture include few 8 bit and 16 bit registers and 8 bit memory locations. versatile serial communication port. 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.CHAPTER 3 HARDWARE AND SOFTWARE DESCRIPTION 3. This base architecture is supported with on chip peripheral functions like I/O ports. But.

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

FIG: 3.3.1 PIN CONFIGURATION .

1ARCHITECTURE OF AT89S51: .3.3.

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

Program Status Word (PSW) and 16 bit registers. The Accumulator. Its primary elements are an 8 bit Arithmetic Logic Unit (ALU). Program Counter (PC) and Data Pointer Register (DPTR). few more 8 bit registers.6. is used as a general register to .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.6 MICRO CONTROLLER RESET RESET is an active High input When RESET is set to High. Microcontroller goes back to the power on state Power-On Reset Push PB and active High on RST Release PB.3. B register. Accumulator (Acc).1 THE ACCUMULATOR: If worked with any other assembly language you will be familiar with the concept of an accumulator register.1: RESET CIRCUITRY 3. 3. Stack Pointer (SP).7. as its name suggests. Capacitor discharges and RST goes low RST must stay high for a min of 2 machine cycles FIG 3.

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

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

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

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

With 8052 derivatives. With C/T2 set. 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.8. In some circuit designs it is available for accessing devices while in others it is used to address external RAM or external code memory. two bits of port 1 are optionally used as described for extended timer 2 functions. If the circuit requires external RAM or ROM. P1. Note that there are no pull-up resistors on port 0. keypads. 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. P1. 3. 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.6 (EXF2) external flag to be set. these lines can still be used for your own purposes if you don’t need these features of timer 2. 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.8. typical derivatives do not use port 1 for any functions themselves. port 2 is dual-function.1 (T2EX): If timer 2 is in auto-reload mode and T2CON. When the MOVX @DPTR instruction is used. In this case.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. In these cases. a 1-0 transition on this line will cause timer 2 to be reloaded with the auto-reload value. If the circuit requires external code memory. the microcontroller will automatically use the port 2 I/O lines to access each instruction that is to be executed. 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. Further. Unlike port 0. In this case. If the circuit requires external code memory. This will also cause the T2CON. Port 1 is commonly used to interface to external hardware such as LCDs. 3. which may cause an interrupt if so enabled. P1. and other devices.8.4 PORT 2: Like port 0.0 is the clock source for timer 2.3 (EXEN2) is set.5 PORT 3: .0 (T2): If T2CON. then timer 2 will be incremented whenever there is a 1-0 transition on this line. port 2 is used to output the high byte of the memory address that is to be accessed.1 is set (C/T2). These two lines are not assigned these special functions on 8051ís since 8051ís don’t have a timer 2. 3.3 PORT 1: Port 1 consists of 8 I/O lines that you may use exclusively to interface to external parts. the microcontroller will automatically use the port 0 I/O lines to access each instruction that is to be executed.

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

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

If EA is tied high (connected to +5V) then the microcontroller will execute the program it finds in internal/onchip code memory. Today's computers generally address data in bytes or some multiple thereof. 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.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. 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. 3. the serial port's transmit pin's voltage is negative (1) and is said to be in a MARK state. Of course. Whenever the serial port sends a logical zero (0) a positive voltage is affected. whenever the serial port sends a logical one (1) a negative voltage is effected on the transmit pin.9 SERIAL COMMUNICATION: Serial communication is basically the transmission or reception of data one bit at a time. The serial port contains an electronic chip called a Universal Asynchronous Receiver/Transmitter (UART) that actually does the conversion. (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). This line should be attached to the Output Enable (-OE) pin of the EPROM that contains your code memory. 3.8. 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. . ALE will pulse at a rate of 1. Every character on this page is actually expressed internally as one byte. A byte contains 8 bits.The ALE line is used in this fashion both for accessing external RAM as well as for accessing instructions in external code memory. Electrically speaking. We will discuss the transmit and receive pin first. When your program is executed from external code memory. ALE will pulse at a rate of 1/6th that of the oscillator frequency.0592 MHz.8.843. The serial port has many pins. Thus if the oscillator is operating at 11. If EA is tied low (to ground) then it will attempt to execute the program it finds in the attached external code memory EPROM. When no data is being sent. your EPROM must be properly connected for the microcontroller to be able to access your program 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. A bit is basically either a logical 1 or zero. 3.200 times per second.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.

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

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

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

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

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

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

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

For a positive cycle. 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. it passes only low frequency signals and bypasses high frequency signals. This capacitor is also called as a decoupling capacitor or a bypassing capacitor. The primary purpose of a regulator is to aid the rectifier and filter circuit in providing a constant DC voltage to the device. .5% of the load.12.3 FILTER UNIT: Filter circuits which are usually capacitors acting as a surge arrester always follow the rectifier unit. Normally one alteration of the input voltage will reverse the polarities.C1R1 is for bypassing ripples. The DC output has a ripple frequency of 100Hz. 3. 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. 3. A load resistor R1 is connected so that reference to the ground is maintained. two diodes are connected to the positive voltage at the top winding and only one diode conducts. The load resistor should be 1% to 2.4 VOLTAGE REGULATOR: The voltage regulators play an important role in any power supply unit. i.12. the voltage can be maintained within a close tolerant region of the desired output. In this circuit due to positive half cycle D1 & D2 will conduct to give 10. 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. The output obtained is not a pure DC and therefore filtration has to be done. Since each alteration produces a resulting output pulse. frequency =2*50Hz. With a regulator connected with the DC output.C2R2 is used as a low pass filter. Opposite ends of the transformer will therefore always be 180 degree out of phase with each other.be somewhat less than 90% of the applied RMS value.e.8V pulsating DC.

4. CHAPTER SOFTWARE DESCRIPTION .

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

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

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

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

case 0x49: trans =5. real-time kernels. case 0x47: trans =4. debuggers. break. 251. ARM. } SCON = 0x50. integrated environments. Now developers can find exactly where programs spend the most time. developers can create a high-fidelity simulation of their actual target hardware and environment. break. Keil Software is pleased to announce simulation support for the Atmel ARM family of microcontrollers. macro assemblers.3 KEIL SOFTWARE: Keil Software makes C compilers. An Execution Profiler that measures time spent in each function. source line. simulators. 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. and XC16x/C16x/ST10 microcontroller families. No extra hardware or test equipment is required. The Logic Analyzer and Execution Profiler . The integrated simulator provides complete peripheral simulation.trans =3. and assembler instruction. 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. and evaluation boards for the 8051. break. "Using nothing more than the provided simulation support and debug scripts. } } 4.

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

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. F LOW CHART: . A new OLE (object linking and embedding) control A collection of common dialog boxes that streamline common user interface tasks. The flow chart of program is shown.

3.1 YES NO .NO FIG:2.

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 .

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

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

mdiMain.Show blnStatus = True End Sub .

e.this would become small in size and need no installation of supporting soft wares for our key 1 . Further our project code can also be written in flash memory pen drive alike device . because to pirate we know the key of software. cannot make any other duplicate copy of it. CONCLUSION Our project much better than any other piracy preventing project.but here key code is encrypted using embedded system. 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. then can find sequence of key using few keys . hence hacker can never find the key and logic behind it .5. Hence information theft can also be avoided in any organization. If there is it will not allow the to duplicate it by making an other copy of it. hence where is no key the software will not open. our project key is like an hardware key for bike and lock. Hence never software can be pirated i.exe extension address of the folder or file.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->