You are on page 1of 74

ABSTRACT

The proposed project work aims at the automation in identification of student, and maintaining their attendance which is one of the important tasks in college. In earlier days, attendance is taken manually and entered to the computer by a programmer. But in case of large number it becomes difficult and clumsy. So to automate it, RFIDs are used.

To detect the RFID tags, a software program is developed in a micro controller chip such that the micro controller along with the RF module detects the RFID tags. Whenever the RF tag comes into the vicinity of the RF reader, the micro controller grabs the 10 digit Hexadecimal code stored in the tag and sends it to the GSM modem.

CHAPTER-1

INTRODUCTION
The proposed project is designed to identify a person and to mark his/her attendance along with timing information automatically, thereby reducing the manual effort to a considerable extent. Hence the project RF-ID BASED ATENDANCE SYSTEM.

Now a days as student irregularity has been increased to a greater extent, it has become a big subject for maintaining their details and identifying them in marking attendance. Hence the need has come out, thus this project work has taken up which serves the purpose of automation. By detecting RFID tag, the RF module marks the attendance automatically.

This project work is basically related to radio frequency communication. As we know the modern communication plays a dominant role in the communication revolution. The proposed project work is aimed to use radio frequency communication between RFID tag and RFID module where the identification is performed.

This is innovative project work introduced in the field of wireless communication. Radio Frequency communication is utilized in this project work to make a link between tag and the reader. The reader part may be located at any of the staff rooms and the monitoring is done by the head of the department.

This project throws more exposure on the radio frequency communication. As we know today, the modern communication plays a dominant role in modern civilization. Now a days, with the advancement of the technology particularly in the field of wireless communication, of day to day living have become a part of information and we find wireless communication system at many applications.

CHAPTER-2

THEORITICAL BACKGROUND
2.1 HISTORY OF RFID:
In 1946 Leon Theremin invented an espionage tool for the soviet union which retransmitted incident radio waves with audio information. Sound waves vibrated a diaphragm which slightly altered the shape of the resonator, which modulated the reflected radio frequency. Even though this device was a passive convert listening device not an identification tag, it has been attributed as a predecessor to RFID technology. The technology used in RFID has been around since the early 1920s according to one source (although the same source states that RFID systems have been around just since the late 1960s). Similar technology, such as the IFF transponder invented by the United Kingdom in 1939, was routinely used by the allies in world war-II to identify aircraft as friend or foe. Transponders are still used by military and commercial aircraft to this day. Another early work exploring RFID is the landmark 1948 paper by Harry Stockman, titled "Communication by Means of Reflected Power" (Proceedings of the IRE, pp 1196 1204, October 1948). Stockman predicted that "considerable research and development work has to be done before the remaining basic problems in reflected-power communication are solved, and before the field of useful applications is explored." Mario Cardullo's in 1973 was the first true ancestor of modern RFID; a passive radio transponder with memory. The initial device was passive, powered by the interrogating signal, and was demonstrated in 1971 to the New York Port Authority and other potential users and consisted of a transponder with 16 bit memory for use as a toll device. The basic Cardullo patent covers the use of RF, sound and light as transmission medium. The original business plan presented to investors in 1969 showed uses in transportation (automotive vehicle identification, automatic toll system, electronic license plate, electronic manifest, vehicle routing, vehicle performance monitoring), banking (electronic check book, electronic credit card), security (personnel identification, automatic gates, surveillance) and medical (identification, patient history).

A very early demonstration of reflected power (modulated backscatter) RFID tags, both passive and semi-passive, was done by Steven Depp, Alfred Koelle and Robert Freyman at the Los Alamos Scientific Laboratory in 1973. The portable system operated at 915 MHz and used 12 bit tags. This technique is used by the majority of today's UHF and microwave RFID tags.The first patent to be associated with the abbreviation RFID was granted to Charles Walton in 1983 2.2 RFID TAGS: RFID tags come in three general varieties:- passive, active, or semi-passive (also known as battery-assisted). Passive tags require no internal power source, thus being pure passive devices (they are only active when a reader is nearby to power them), whereas semipassive and active tags require a power source, usually a small battery. To communicate, tags respond to queries generating signals that must not create interference with the readers, as arriving signals can be very weak and must be told apart. Besides backscattering, load modulation techniques can be used to manipulate the reader's field. Typically, backscatter is used in the far field, whereas load modulation applies in the near field, within a few wavelengths from the reader. Frequency Ranges Tag power source LF 125KHz Generally passive tags only using inductive coupling HF 13.56MHz Generally passive tags only using inductive or capacitive coupling Moderate UHF 868-915MHz Active tags with integral battery or passive tags using capacitive storage E-field coupling Fast Micro wave 2.45&5.8GHz Active tags with integral battery or passive tags using capacitive storage E-field coupling Fast

Data rate

Slower

Ability to read near metal or wet surfaces Applications

Better

Moderate

Poor

Worse

Access control & security identifying widgets through manufacturing processes

Library books identification Access control employee IDs

Supply chain tracking highway Toll tags

Highway toll tags identification of private vehicle fleet in/out of a yard

Table:2.2. Various factors of RF-Id tags

PASSIVE: Passive RFID tags have no internal power supply. The minute electrical current induced in the antenna by the incoming radio frequency signal provides just enough power for the CMOS integrated circuit in the tag to power up and transmit a response. Most passive tags signal by backscattering the carrier wave from the reader. This means that the antenna has to be designed both to collect power from the incoming signal and also to transmit the outbound backscatter signal. The response of a passive RFID tag is not necessarily just an ID number; the tag chip can contain non-volatile, possibly writable EEPROM for storing data. Passive tags have practical read distances ranging from about 10 cm (4 in.) (ISO 14443 ) up to a few meters (Electronic Product Code (EPC) and ISO 18000-6), depending on the chosen radio frequency and antenna design/size. Due to their simplicity in design they are also suitable for manufacture with a printing process for the antennas. The lack of an onboard power supply means that the device can be quite small: commercially available products exist that can be embedded in a sticker, or under the skin in the case of low frequency RFID tags. In 2007, the Danish Company RFID sec developed a passive RFID with privacy enhancing technologies built-in including built-in firewall access controls, communication encryption and a silent mode ensuring that the consumer at point of sales can get exclusive control of the key to control the RFID. The RFID will not respond unless the consumer authorizes it, the consumer can validate presence of a specific RFID without leaking identifiers and therefore the consumer can make use of the RFID without being trackable or otherwise leak information that represents a threat to consumer privacy.

ACTIVE:
Unlike passive RFID tags, active RFID tags have their own internal power source, which is used to power the integrated circuits and broadcast the signal to the reader. Active tags are typically much more reliable (i.e. fewer errors) than passive tags due to the ability for active tags to conduct a "session" with a reader. Active tags, due to their onboard power supply, also transmit at higher power levels than passive tags, allowing them to be more effective in "RF challenged" environments like water (including humans/cattle, which are mostly water), metal (shipping containers, vehicles), or at longer distances, generating strong responses from weak requests (as opposed to passive tags, which work the other way around).

In turn, they are generally bigger and more expensive to manufacture, and their potential shelf life is much shorter. Many active tags today have practical ranges of hundreds of meters, and a battery life of up to 10 years. Some active RFID tags include sensors such as temperature logging which have been used to monitor the temperature of perishable goods like fresh produce or certain pharmaceutical products. Other sensors that have been married with active RFID include humidity, shock/vibration, light, radiation, temperature, and atmospherics like ethylene. Active tags typically have much longer range (approximately 500 m/1500 feet) and larger memories than passive tags, as well as the ability to store additional information sent by the transceiver. The United States Department of Defense has successfully used active tags to reduce logistics costs and improve supply chain visibility for more than 15 years. SEMI-PASSIVE: Semi-passive tags are similar to active tags in that they have their own power source, but the battery only powers the microchip and does not broadcast a signal. The RF energy is reflected back to the reader like a passive tag. An alternative use for the battery is to store energy from the reader to emit a response in the future, usually by means of backscattering. The battery-assisted receive circuitry of semi-passive tags lead to greater sensitivity than passive tags, typically 100 times more. The enhanced sensitivity can be leveraged as increased range (by a factor 10) and/or as enhanced read reliability. The enhanced sensitivity of semi-passive tags place higher demands on the reader, because an already weak signal is backscattered to the reader. For passive tags, the reader-totag link usually fails first. For semi-passive tags, the reverse (tag-to-reader) link usually fails first. Semi-passive tags have three main advantages 1) Greater sensitivity than passive tags 2) Better battery life than active tags. 3) Can perform active functions under its own power, even when no reader is present.

The following figure shows the circuit diagram of RF reader

Fig:2.2.Circuit diagram of a RF reader

CHAPTER-3

BLOCK DIAGRAM
The block diagram consists of three sections 1. Power supply section 2. RF reader section 3. RF tag section

Fig:3.0. Block diagram of RF-ID attendance system In the power supply section, the AC power (230-0-230V) from the transformer is converted into 122 volts after passing through full wave rectifier (16.8V). We are using a 2200F capacitor for removing the ripples. Then it is passed through a voltage regulator (IC7805) which provides a fixed output voltage 5volts. This acts as power supply to all the components in the reader section. In the absence of power supply, a battery is used to provide supply to the external RAM and real time clock (RTC DS1302 IC). In the tag section which consists of RF tag. RF tag consists of antenna and memory chip. The memory chip contains a unique Hexadecimal code. Unique means every tag contains a different code.

Whenever the tag is placed at a vicinity of 10Cms from the reader section the RF module in reader section generates carrier frequency of 125 KHz that is transmitted by transmitter antenna. This induces an Electro Magnetic field in the transponder. Therefore the chip in the transponder gets excited and sends a unique hexadecimal code through the antenna (TK5530) to the transmitter antenna. Through the multiplexer, the code is sent to microcontroller or personal computer. In the personal computer, all the details corresponding to the tag are noted. If the tag is invalid that is its details are not feeded in the computer, the reader recognizes that the tag is invalid tag. Otherwise, the corresponding tag holders in-time will be noted, when the holder swipes card again, out-time will be noted. The same tag should not swipe more than one time with in a period of 60seconds. This time limit is to avoid the misleading of in-time and out-time at a time due to confirm swipes of the tag holder. Not only the in-time and out-time, the details contain information about his bio-data, number of leaves, salary payments and other details. Through the microcontroller, it is send through latches (HC573) to the external RAM for storing the information (hexadecimal code). Through the microcontroller, it is send through latches to transistor pack (ULN 2003) for giving buzzer indication and LED indication, to give the identification that the code in the tag is read by the reader. The tag hexadecimal code can also be seen through the display section. Hence a reset switch is used, to indicate whether reader or personal computer to work. The vicinity between the reader and tag can also be increased, but complexion of the circuit increases to a greater extent. One crystal is used for RTC, and the crystal frequency is 32.768KHZ. Another crystal is used for microcontroller, and the frequency is around 11MHz (11.09MHz).

CHAPTERE-4

CIRCUIT DESCRIPTION
4.1 MICROCONTROLLER:
Microprocessors and microcontrollers stem from the basic idea. The contrast between a microcontroller and a microprocessor is best exemplified by the fact that most microprocessors have many operational codes (opcodes) for moving data from external memory to the CPU; microcontrollers have one or two. Microprocessors have one or two types of bit handling instructions; microcontrollers will have many. The microprocessor is concerned with rapid movement of code and data from external addresses to the chip; the microcontroller is concerned with rapid movement of bits within the chip. The microcontroller can function as a computer with the addition of no external digital parts; the microprocessor must have additional parts to be operational.

DESCRIPTION:
The AT89C52 is a low power, high performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer.

In addition, the AT89C52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timers/counters, serial port and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillators, disabling all other chip functions until the next interrupt or hardware reset.

PIN CONFIGURATION:

Fig:4.1.1. Pin configuration of AT89C52

PIN DESCRIPTION:
1. VCC Supply voltage +5V 2. GND Ground. 3. PORT 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during access to external program and data memory. In this mode, P0 has internal pull-

ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification. 4. PORT 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The port 1 output buffers can sink/source four TTL inputs. When 1s are written to port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer or counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming and verification

Table4.1.2. Port1 alternate functions 5. PORT 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during access to external data memory that uses 16-bitaddresses (MOVX @ DPTR). In this application, port 2 uses strong internal pull-ups when emitting 1s. During access to external

data memory that uses 8-bit addresses (MOVX @ RI), port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. 6. PORT 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 3pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C52, as shown in the following table. Port 3 also receives some control signals for Flash programming and verification.

Table4.1.3. Port3 alternate functions RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 96 oscillator periods after the Watchdog times out. The DISTRO bit in SFR AUXR (address 8EH) can be used to disable this future. In the default state of bit DISTRO, the RESET HIGH out feature is enabled. ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the low byte of the address access to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the

oscillator frequency and may be used for external timing or clocking purposes. Note however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89C52 is executing code from external programming memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. PROGRAM COUNTER: Program counter is a 16-bit register and is used to hold the address of a byte in memory. Program instruction bytes are fetched from locations in memory that are addressed by the PC. Program ROM may be on the chip at addresses 0000H to 0FFFH, external to the chip for the address that exceed 0FFFH, are totally external for all addresses from 0000H to FFFFH. The PC is automatically increment after every instruction byte is fetched and may also be altered by certain instructions. The PC is the only register that does not have an internal device. SPECIAL FUNCTION REGISTERS (SFR): The 128 bytes of on-chip additional RAM locations from 80H to FFH are reserved for the special functions and therefore these are called as special function registers SFRs. These SFRs are used for control or to show the status of various functions done by the 89C52 microcontroller. All SFRs are directly addressable and can be read or written to as well. Note that SFRs space is only reserved for the special functions and cannot be used for any other purposes. Some SFRs are bit addressable and allow their individual bits to be set or cleared by instructions.

Fig:4.1.4. Special function registers


DUAL DATA POINTER: To facilitate accessing both internal and external data memory, two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address locations 82H-83H and DPI at 84H85H. Bit DPS=0 in SFR AUXR1 selects DP0 and DPS=1 selects DP1. The DPTR register is made up of 8-bit registers, named DPH and DPL. The user should always initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register. CRYSTAL OSCILLATOR: XTAL1 and XTAL2 are the input and output, respectively of an inverting amplifier that can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven; there are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-bytwo flip-flop, but minimum and maximum voltage high and low time specifications must be observed.

Fig:4.1.5 Crystal oscillator

MEMORY ORGANISATION:
PROGRAM MEMORY:
The 80C51 has separate address spaces for program and data memory. The Program memory can be up to 64K bytes long. The lower 4K can reside on-chip. The 80C51 can address up to 64K bytes of data memory to the chip. The MOVX instruction is used to access the external data memory.

The 80C51 has 128 bytes of on-chip RAM, plus a number of Special Function Registers (SFRs). The lower 128 bytes of RAM can be accessed either by direct addressing (MOV Data addr) or by indirect addressing (MOV @Ri).

Fig:4.1.6 Direct and indirect address area


The 128 bytes of RAM which can be accessed by both direct and indirect addressing can be divided into three segments as listed below.
1.Register Banks 0-3:

Locations 0 through IFH(32 bytes). The device after reset defaults to register bank 0. To use the other register banks, the user must select them in software. Each register bank contains eight 1-byte registers 0 through 7. Reset initializes the stack pointer to location 07H and it is incremented once to start from location 08H, which is the first register (R0) of the second register bank. Thus, in order to use more than one register bank, the SP should be initialized to a different location of the RAM where it is not used for data storage (i.e., the higher part of the RAM). 2. Bit Addressable area: 16 bytes have assigned for this segment, 20H-2FH. Each one of the 128 bits of this segment can be directly addressed (0-7FH). The bits can be referred to in two ways, both of which are acceptable by most assemblers. One way is refer to their Address (i.e., 0-7FH). The other way is with reference to bytes 20H to 2FH. Thus, bits 0-7 can also be referred to as bits 20.0-20.7 and bits 8-FH are the same as 21.0-21.7, and so on. Each of the 16 bytes in this segment can also be addressed as a byte. 2. Scratch Pad Area: 30H through 7FH are available to the user as data RAM. However, if the stack pointer has been initialized to this area, enough bytes should be left aside to prevent SP data destruction.

Fig:4.1.7. Scratch Pad area

4.2 MAX232 IC:


DESCRIPTION:
The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3V, a typical hysteresis of 0.5V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232F levels. The driver, receiver, and voltagegenerator functions are available as cells in the Texas Instruments LinASIC library.

PIN DIAGRAM:

Fig:4.2. Pin diagram of MAX232

4.3 TK5530 IC:


DESCRIPTION:
The TK5530 is a complete transponder, with implements all important functions for immobilizer and identification systems. It consists of a plastic cube which accommodates the read-only Identification Integral Circuits (IDIC) e5530 and the antenna is realized by a LCcircuit. The identifying data are stored in a 128bit PROM on the e5530, realized as an array of laser-programmable fuses. The logic block diagram for the e5530 is shown in figure. The data are sent bit-serially as a code.Any attempt to fake the base station with a wrong transponder can be recognized immediately.

Fig:4.3. TK5530 IC System block diagram

4.4 U2270B IC:


DESCRIPTION:
The U2270B is an IC for IDIC read/write base stations in contact less identification and immobilizer stations. The IC incorporates the energy-transfer circuit to supply the transponder. It consists of an on-chip power supply, oscillator and a coil driver optimized for automotive-specific distances. It also includes all signal-processing circuits which are necessary to transform the small input signal into a microcontroller-compatible signal. SYSTEM BLOCK DIAGRAM:

Fig:4.4. U2270B IC System block diagram

4.5 RF MODULE:
CY8C0104/05 RFID Module has tremendous features if compared with any 125KHz RFID chips or modules in the market. It is the easiest way to go with 125KHz RFID applications and most important the cheapest one in the RFID industry. Stunning characteristics of the chip/module will help you to design your product just in few weeks or even few days. Traditional RFID reader chips in the market are just analog front-end chips and the designers need to know about the RFID concept and should be able to write complicated decode algorithms for the demodulated signal by using external microcontroller. CY8C0104/05 have analog front-end and microcontroller combined in one chip/module. The designers never need to know about decode algorithms or RFID concept so that it results in profoundly shorter design time if compared with the traditional 125KHz RFID ICs in the market. Moreover all these advantages come with cheaper and more reasonable prices.

CY8C0104/05 demodulates the Manchester RF 32/64 signal and decodes it automatically. The data retrieved from the transponder is ready to be processed inside the device or to be sent over I2C/ UART / SPI or custom protocols with GPIO. The user can control chip/module with an external device such as microcontroller, PC or handheld device with UART/I2C (requires free upgrade pack) or custom defined GPIO protocol. Alternatively, with its most unique feature, users can embed their own code into the module/chip so module/chip performs operations automatically, thus no external microcontroller is required.

CHAPTERE-5

POWER SUPPLY SECTION


5.1 RECTIFIER:
Rectifier is a device used for converting A.C voltage into D.C voltage. Four diodes (IN 4007) are used for the present work which are connected in the form of a bridge circuit. Advantages of bridge rectifier are No center tap is required on transformer, hence cost is reduced. It is suitable for higher voltage applications. It has less PIV rating per diode

5.2 FILTER CIRCUIT:


The output of a rectifier is pulsating, i.e., it has a D.C value and some A.C variations known as ripples. In most of the electronic circuits or devices a very steady D.C output is required. This is achieved with the help of a device known as filter. Thus the device that converts the pulsating output of a rectifier into a steady D.C level is known as a filter. Following filter circuits are commonly used Series inductor filter Shunt capacitor filter LC filter CLC or pi filter

5.3 VOLTAGE REGULATOR:


A voltage regulator is a circuit that supplies a constant voltage regardless of changes in load currents. Although voltage regulators can be designed using op-amps it is quicker and easier to use IC voltage regulators. Typical performance parameters for voltage regulators are line regulation, load regulation, temperature stability and ripple rejection. Further more IC voltage regulators are versatile and relatively inexpensive under available with features such as a programmable output, current or voltage boosting, internal short circuit current limiting, thermal shutdown and floating operation for high voltage applications. 78XX series are three terminal, positive fixed voltage regulators. There are seven output voltage positions available such as 5, 6, 8, 12, 15, 18 and 24 volts. In 78XX the last

two numbers (XX) indicate the output voltage. There are also available 79XX series of fixed output negative voltage regulators which are compliments to the 78XX series devices.

Fig:5.3. Fixed Output Voltage Regulators The above figure shows the standard representation of monolithic voltage regulator. A capacitor Ci is usually connected between input terminal and ground to cancel the inducitve effects due to long distribution leads. The output capacitor Co improves the transient response.

CHAPTER-6 HARDWARE DETAILS


ATMEL 89 C 51 :
FEATURES: Compatible with MCS-51 Products. 4 Kbytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles. Fully Static Operation: 0Hz to 24 MHz Three-level Program Memory Lock 128 x 8-Bit Internal Ram 32 Programmable I/O Lines Two 16-Bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low Power Idle and Power Down Modes

MAX232 IC:
FEATURES:
Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28 Operates From a single 5-V power supply with1.0-F charge-pump capacitors Operates up to 120Kbits/sec Two drivers and two receivers 30-V input levels Low supply current8mA typical ESD protection exceeds JESD 22-2000-V human-body model (A114-A) Upgrade with improved ESD (15-KV HBM) and 0.1F charge-pump capacitors is available with the MAX202

TK5530 IC:
FEATURES:
Identification transponder in plastic cube. Basic component: e5530 IDIC. Includes coil and capacitor for tuned circuit antenna. Carrier frequency: 125 KHz.

APPLICATIONS:
Car immobilizer Access control Alarm system Other identification systems

U2270B IC:
FEATURES:

Carrier frequency Fosc100KHz 150KHz. Typical data rate up to 5Kbaud at125KHz. suitable for Manchester and Biphase modulation Power supply from car battery or from 5V regulated voltage. Optimized for car immobilizer applications. Tuning capability Microcontroller-compatible interface Low power consumption in standby mode Power-supply output for microcontroller.

APPLICATIONS:
Car immobilizers Animal identification Access control Process control

CHAPTER-7 FABRICATION DETAILS


The basic raw material in the manufacture of PCB is copper cladded laminate. The laminate consists of two or more layers insulating reinforced materials bonded together under heat and pressure by thermo setting resins used are phenolic or epoxy. The rein forced materials used are electrical grade paper or woven glass cloth. The laminates are manufactured by impregating thin sheets of rein forced materials (woven glass cloth or electrical grade paper) with the required resin (phenolic or epoxy). The laminates are divided into various grades by National Electrical Manufacturers Association (NEMA). The nominal overall thickness of laminate normally used in PCB industry is 1.6mm with copper cladding on one or two sides. The copper foil thickness is 35 Microns (0.035mm) OR 70 Microns (0.070mm). The next stage in PCB fabrication is artwork preparation. The artwork (Master drawing) is essentially a manufacturing tool used in the fabrication of PCBs. It defines the pattern to be generated on the board. Since the artwork is the first of many process steps in the Fabrication of PCBs. It must be very accurately drawn. The accuracy of the finished board depends on the accuracy of artwork. Normally, in industrial applications the artwork is drawn on enlarged scale and photographically reduced to require size. It is not only easy to draw the enlarged dimensions but also the errors in the art work correspondingly get reduced during photo reduction. For ordinary application of simple single sided boards artwork is made on ivory art paper using draft aids. After taping on an art paper and photography (Making the negative) the image of the photo given is transformed on silk screen for screen printing. After drying the paint, the etching process is carried out. This is done after drilling of the holes on the laminate as per the components layout. The etching is the process of chemically removing un-wanted copper from the board. The next stage after PCB fabrication is solder masking the board to prevent the tracks from corrosion and rust formation. Then the components will be assembled on the board as per the component layout. The next stage after assembling is the soldering the components. The soldering may be defined as process where in joining between metal parts is produced by heating to suitable temperatures using non-ferrous filter metals has melting temperatures below the melting temperature of the metals to be joined. This non-ferrous intermediate metal is called solder. The solders are the alloys of lead and tin.

CHAPTER-8

ADVANTAGES AND APPLICATIONS


8.1 ADVANTAGES:
Whether you are concerned with tracking inventory in a warehouse or Maintaining a fleet of vehicles. There is a clear need for a fully automated data capture and analysis System that will help you keep track of your valuable asserts and equipment. Active Wave RFID technologies provide unique solutions to difficult Logistical tracking of inventory or equipment- particularly in applications where optically based systems fail and when read/write capabilities are required. The technology is stable, and evolving, with open architectures increasingly available.

Advantages of RFID technology:


Provides product visibility in all stages of supply chain. Enables you to view past and present conditions of your inventories. Identifies products one by one not on type level. Enables on-time delivery. Enables you to control your products in all stages of supply chain. Provides high security. Minimizes errors.

8.2 APPLICATIONS:
Recent advances in radio frequency identification (RFID) technology have enabled the early adoption in many commercial applications like supply chain management, logistics and transportation but skeptics believe that although RFID has an advantage over plain vanilla bar-coding in logistics, it will take a while for it to become mainstream. Radio frequency identification (RFID) is a method of remotely storing and retrieving data using devices called RFID tags/transponders. An RFID tag is a small object, such as an adhesive sticker, that can be attached to or incorporated into a product. Simply put, RFID involves putting a small radio transmitter on a tag or a label with a unique identification

number (UIN) on it. When passed under a RFID reader, the number contained in the tag is transmitted to a computer, which matches it with corresponding data. RFID is used for various purposes - among others to tag merchandise at stores, to prevent shoplifting, to tag prescriptions, over-the-counter medicines, and hospital products and to help combat the illegal trafficking of counterfeit pharmaceutical products. But unlike barcodes, there is no global public body that governs the frequencies used for RFID. In principle, every country can set its own rules, but some standards have been made regarding RFID technology.
Inventory Applications: Enterprises have to manage huge numbers of raw materials and

products in production and supply chain processes. This management process is laborious, costly and complicated for especially big enterprises. Present product tracking systems are based on barcode system and require enormous amounts of labor, time and costs. With RFID based inventory control systems, real-time and accurate tracking

ACCESS CONTROL SYSTEMS:


Access control is among the fields where RFID technology is intensely used. Having an effective access control system becomes more and more important and necessary in buildings such as companies, enterprises and public institutions where many people enter and exit everyday. Conventional systems are generally based on barcode system and with these systems; ID or entrance cards can be read closely and one by one.

OTHER RFID APPLICATIONS:


With each passing day, usage of RFID increases throughout the world as well as in Turkey. InfoDif presents solutions which are innovative and respond to your needs in all fields with this technology which proved its advantages and safety. You can benefit from InfoDifs world standard RFID systems in several fields including shopping and livestock.

SHOPPING WITH RFID:


The wireless RFID technology provided by InfoDif enables consumers to make payments just with a wave of their payment cards. This technology not only shortens the time allocated for shopping but also enables enterprises to have more information about their customers and their shopping habits and patterns. Using this information, shopping centers

can individualize their services for each customer and increase customer satisfaction and loyalty, reduce costs and increase profitability. RFID is safer than conventional payment methods and customers feel more secure and comfortable. No card number is stored on RFID tags; they have just an ID number which can only be read by an assigned reader. Payment cards with RFID tags are safer than credit cards because any card number or information about the user is not printed on the card.

AIRLINE BAGGAGE TRACKING :


RFID system can be integrated to existing baggage labels, control desk printers and classification devices. With RFID technology, all baggage can be scanned automatically in groups regardless of their types. With InfoDifs RFID smart labels, secure and economic identification and tracking of baggage and passenger-baggage verification can be ensured.

RFID IN ANIMAL IDENTIFICATION:


RFID technology is used for tracking millions of livestock animals throughout the world. RFID is used in identifying, counting and tracking meat and dairy animals, valuable domestic animals and laboratory animals used in long lasting and expensive experiments.

RFID IN PHARMACY:
The pharmaceutical industry faces logistic product returns due to overstocking or expiry. The pharmaceutical industry seeks a better way to track drugs in all stages of supply chain; from production to delivery to pharmacies. RFID is considered to be the most efficient way to ensure accuracy and validity of data in this sector and solve all these problems and losses. RFID will increase the quality and security of products in this sector and costs will be reduced.

PARKING LOT APPLICATIONS:


InfoDif provides parking lot managers with RFID based parking lot access control solutions which are time and cost effective. These systems which are secure and automatic

can be used in parking lots in the city as well as in parking lots in airports, universities, hospitals and companies. RFID tags and readers can be integrated to existing parking lot access control systems thus installation, operation and maintenance of this new system does not require high costs.

DOCUMENT TRACKING:
Smart tags which are among the products provided by InfoDif improve and ease management of important documents in various sectors such as insurance and legal sectors. Besides, RFID technology prevents severe problems which may be caused by loss of important documents and files. RFID speeds up the workflow with fast and easy document tracking.

RFID BENEFITS VS. BARCODE:


The optical nature of barcode requires labels to be "seen" by the Lasers. That lineof-sight Between label and reader is often difficult, impractical, or even impossible to achieve in industrial environments. In order to function properly, a barcode reader must have clean, clear optics, the label must be clean and free of abrasion, and the reader and label must be properly oriented with respect to each other. RFID technology enables tag reading from a greater distance, even in harsh environments. In addition, the information imprinted on a barcode is fixed and cannot be changed. ActiveWave RFID tags, on the other hand, have electronic memory similar to what is in your computer or digital camera to store information about the inventory or equipment. This information can be dynamically updated.

8.3 THE ADVANTAGES OF RFID VS. BARCODE TECHNOLOGY:


No line of sight requirement. The tag can stand a harsh environment. Long read range.Wireless identification (even without line-of-sight contact) is possible It is able to penetrate through different materials like cardboard boxes, timber, etc. The memory can be read and re-written without limit. Several transponders can be identified in less than one second. It is possible to read many transponders simultaneously. It is resistant against environmental influences.

The shape and colour of the transponders is adaptable. Transponders can be integrated completely into a product. High security is guaranteed through copy protection and encryption High data retention up to 10 years It has an integrated data memory on which product data can be stored. Information can be stored on the tag without using a data base. RFID tagged objects can be read more than 20 times faster than the barcode technology. RFID tagged objects can also be read even if they are soiled heavily. The placing of the RFID tagged objects is less problematic in contrast to the barcode technology. It is sufficient that the object is situated within the range of the reader. Portable database Multiple tag read/write. Tracking people, items, and equipment in realtime.

CONCLUSION
The project report RFID BASED ATTENDANCE SYSTEM is completed successfully. Identification has become an integral part of person in this century. There is a greater demand for reliable and accurate identification. Hence in this project we have implemented RFIDs. In the earlier days we have used bar codes but they are unreliable. Various faults in the earlier days identification has been analyzed thoroughly. The main advantage of implementing staff identification using micro controller is that the digital output can be directly connected to any P.C. and can monitor it continuously. We hope that this project would be very useful in future for student as well as staff identification. Basically this project work comes under communication. But it is applicable to schools, colleges, companies. This type of design is very well suited in the field of communication. Since it is a demonstration unit, the range between RF antenna and Tag is limited to 10Cms, because, in this project work a low power transmitter is used and the limitation being the power transmitted by the RF antenna. However by increasing the power radiating capacity of the antenna the range can be increased and by using parallel readers tracking of the RF card is also possible.

REFERENCES
8051 Micro Controller, II Edition, PENRAM International By Kenneth, J Ayala OpAmps and Linear Integrated Circuits, IV Edition Pearson By Ramakant A Gayakwad Programming and Customizing 8051 Micro Controller, II Edition By Myke Predko Principles of Communication Systems TATA McGraw Hill, II Edition By Taub and Schilling Radio frequency Identification Fundamentals and Applications By John Wiley and Sons.

JOURNALS:
ELECTRONICS FOR U IEEE JOURNALS

WEBSITES:
www.atmel.com www.google.com www.wikipedia.org

PROGRAM CODE
;THIS IS RF BACKUP READER PROGRAM ;P0 = DATA ;P1.0 = RTC DATA ;P1.1 = RTC CLK ;P1.2 = RTC RST ;P1.3 = ;P1.4 = ;P1.5 = BUZZ ;P1.6 = LED1 ;P1.7 = LED2 ;P2.0 = LSB STRB ;P2.1 = MSB STRB ;P2.2 = DSP DATA STRB ;P2.3 = - CS ;P2.4 = ENABLE -CS ;P2.7 = RS ;P2.6 = R/W ;P2.5 = EN ;P3.2= DATA SEL :01-PC,10-RFRD ;P3.3= DATA SEL ;P3.4= PC IRQ ;P3.5= -OE ;P3.6= RD/-WR ;P3.7= ; DATA FROM SEC TO YEAR,WEEK (40H TO 4CH) ;25H TIME FLAG 01= NOT REQ,02 = REQ TXD MACRO JNB TI,$ CLR TI MOV SBUF,R6 MACEND RXD MACRO JNB RI,$ CLR RI MOV R7,SBUF MACEND

;--TIME DATE DISPLAY -TDISP MACRO LCALL READ LCALL CON LCALL CON1 LCALL ASSEM LCALL DISP MACEND NOP2 MACRO NOP NOP NOP MACEND ;******************************************** ORG 0 LJMP START0 ORG 0050H START0: MOV P0,#FFH MOV P1,#FFH MOV P2,#F0H MOV P3,#FFH CLR P2.0 CLR P2.1 CLR P2.2 CLR P2.3 CLR P1.5 CLR P1.6 CLR P1.7 ;******************************* LCALL SPINI ;MOV R6,#00H ;TXD ;LCALL XDEL ;******************************* LCALL LCDINI LCALL HEAD LCALL SSEC QQ12: JB P1.4,QQ13 LCALL DEL

JB P1.4,QQ12 LCALL RTCINI LCALL TAIL QQ13: TDISP LCALL SEC QQXX: JB P3.4,RFRE LCALL DEL JB P3.4,QQXX LCALL PCCOMMX VERIF: QQ11: JB P3.4,RFRE JB P3.4,QQ11 LJMP PCCOM RFRE: LJMP RFREAD ;--------------------------PCCOM: MOV SP,#20H CLR P3.2 SETB P3.3 NOP2 CLR RI LCALL XRXD CJNE R4,#01H,VERIF CLR A MOV A,R1 MOV R7,A CJNE R7,#01H,PCT1 LJMP PCREAD PCT1: CJNE R7,#02H,PCT2 LJMP PCWRITE PCT2: CJNE R7,#03H,PCT3 LJMP PCFORMAT PCT3: CJNE R7,#04H,PCT4 LJMP PCTDUP PCT4: CJNE R7,#05H,PCT5 LJMP PCTDRD PCT5: CJNE R7,#06H,PCT6 LJMP PCINI

PCT6: CJNE R7,#07H,PCT7 LJMP PCREADB PCT7: CJNE R7,#08H,PCT8 LJMP AAAAAA PCT8: CJNE R7,#09H,PCT9 LJMP AAAAAA PCT9: CJNE R7,#0AH,PCT10 LJMP AAAAAA PCT10: AAAAAA: ;MOV R6,#FEH ;TXD LJMP VERIF HHHH: LJMP HHHH ;--------------------------------------PCREAD: LCALL XRXD CJNE R4,#01H,PCREADR MOV A,R1 MOV 60H,A LCALL XRXD CJNE R4,#01H,PCREADR MOV A,R1 MOV 61H,A MOV R0,#70H PCTX: LCALL RAMRD ;TXD MOV A,R6 MOV @R0,A INC 61H INC R0 CJNE R0,#80H,PCTX LCALL RAMCON ;---------------MOV R0,#70H NLTXT: MOV A,@R0 MOV R6,A TXD INC R0 CJNE R0,#7BH,NLTXT MOV R0,#30H NLTXTN: MOV A,@R0 MOV R6,A

TXD INC R0 CJNE R0,#3AH,NLTXTN ;------------------PCREADR: LJMP VERIF ;-----------------------PCREADB: LCALL XRXD CJNE R4,#01H,PCREADR MOV A,R1 MOV 60H,A LCALL XRXD CJNE R4,#01H,PCREADR MOV A,R1 MOV 61H,A LCALL RAMRD TXD LJMP VERIF ;------------------------RAMCON: MOV A,7BH MOV 30H,A MOV A,7CH MOV 31H,A MOV A,7DH MOV 32H,A MOV A,7EH MOV 33H,A MOV A,7FH MOV 34H,A LCALL CON ;--------MOV A,41H ADD A,#30H MOV 30H,A MOV A,40H ADD A,#30H MOV 31H,A MOV A,43H ADD A,#30H MOV 32H,A

MOV A,42H ADD A,#30H MOV 33H,A MOV A,45H ADD A,#30H MOV 34H,A MOV A,44H ADD A,#30H MOV 35H,A MOV A,47H ADD A,#30H MOV 36H,A ;LCALL WRD MOV A,46H ADD A,#30H MOV 37H,A MOV A,49H ADD A,#30H MOV 38H,A MOV A,48H ADD A,#30H MOV 39H,A RET ;--------- RAMRD --------RAMRD: MOV P0,61H SETB P2.0 NOP2 CLR P2.0 MOV P0,60H SETB P2.1 NOP2 CLR P2.1 MOV P0,#FFH NOP2 SETB P3.6 ;-WE NOP2 CLR P2.4 ;-CE

NOP2 SETB P2.3 NOP2 CLR P3.5 ;-OE NOP2 MOV R6,P0 SETB P3.5 SETB P2.4 CLR P2.3 NOP2 RET ;************************************* PCWRITE: LCALL XRXD CJNE R4,#01H,PCWRITER MOV A,R1 MOV 60H,A LCALL XRXD CJNE R4,#01H,PCWRITER MOV A,R1 MOV 61H,A LCALL XRXD CJNE R4,#01H,PCWRITER MOV A,R1 MOV 62H,A MOV R0,#00H LCALL RAMWR TXD PCWRITER: LJMP VERIF ;--------- RAMRD --------RAMWR: MOV P0,60H SETB P2.1 NOP2 CLR P2.1 MOV P0,61H SETB P2.0 NOP2 CLR P2.0 MOV P0,62H NOP2 SETB P3.5 ;-OE

NOP2 CLR P2.4 ;-CE NOP2 SETB P2.3 NOP2 CLR P3.6 ;-WE NOP2 SETB P3.6 NOP2 SETB P3.5 SETB P2.4 CLR P2.3 NOP2 ;---------- READ AFTER WRITE -------MOV P0,#FFH NOP2 SETB P3.6 ;-WE NOP2 CLR P2.4 ;-CE NOP2 SETB P2.3 NOP2 CLR P3.5 ;-OE NOP2 MOV R6,P0 SETB P3.5 SETB P2.4 CLR P2.3 NOP2 RET ;**************** TOTAL DATA DEL.... PCFORMAT: LCALL XRXD CJNE R4,#01H,PCFORMATR MOV A,R1 MOV 61H,A CJNE A,#FEH,PCFORMATR LCALL FORDIS ;----------WRITING ALL ZEROS------------MOV 60H,#00H MOV 61H,#00H MOV 62H,#00H MOV DPTR,#0000H RAMNXT0:MOV 60H,DPH MOV 61H,DPL LCALL RAMWR CJNE R6,#00H,PCFORMATR INC DPTR

MOV A,DPH CJNE A,#80H,RAMNXT0 ;--------- WRITING ALL ONES -------------MOV 60H,#00H MOV 61H,#00H MOV 62H,#FFH MOV DPTR,#0000H RAMNXT: MOV 60H,DPH MOV 61H,DPL LCALL RAMWR CJNE R6,#FFH,PCFORMATR INC DPTR MOV A,DPH CJNE A,#80H,RAMNXT MOV 60H,#00H MOV 61H,#10H MOV 62H,#01H LCALL RAMWR CJNE R6,#01H,PCFORMATR MOV 60H,#00H MOV 61H,#11H MOV 62H,#00H LCALL RAMWR CJNE R6,#00H,PCFORMATR MOV R6,#00H TXD LCALL FOROK LCALL SEC LCALL PCCOMMX LJMP VERIF PCFORMATR: MOV R6,#01H TXD LCALL FORFAIL LCALL SEC LCALL PCCOMMX LJMP VERIF ;***************************************** PCTDUP: MOV R0,#50H PCT: LCALL XRXD CJNE R4,#01H,PCTDUPR CLR A MOV A,R1 MOV @R0,A INC R0

CJNE R0,#5DH,PCT LJMP WRITE PCTDUPR:LJMP VERIF ;************** TIME DATE READ ************ PCTDRD: LCALL TAIL LCALL READ LCALL CON LCALL CON1 LCALL ASSEM LCALL DISP MOV R0,#50H PCTDX: MOV A,@R0 ADD A,#30H MOV R6,A TXD NOP2 INC R0 CJNE R0,#5DH,PCTDX LCALL SEC LCALL PCCOMMX LJMP VERIF ;******* RTC INI ********************** PCINI: LCALL RTCINI LCALL TAIL LCALL SEC LCALL READ LCALL CON LCALL CON1 LCALL ASSEM LCALL DISP LCALL SEC LCALL PCCOMMX LJMP VERIF ;**************************************** ;************ RF REDER MODULE *********** RFREAD: SETB P3.2 CLR P3.3 NOP2 CLR RI LCALL RFCOMMX RFNXT1: MOV R0,#6FH RFNXT: LCALL XRXD CJNE R4,#01H,RTRT1

CLR A MOV A,R1 MOV @R0,A INC R0 CJNE R0,#7CH,RFNXT ;.................. CLR A MOV A,6FH CJNE A,#02H,SWIPEA CLR A MOV A,7BH CJNE A,#03H,SWIPEA ;.................. LCALL RFSTORE CLR RI LCALL OTXD LJMP RFNXT1 SWIPEA: LCALL SWIPE CLR RI LJMP RFNXT1 RTRT1: LCALL RFCOMMX CLR RI RTRT: JB RI,RFNXT1 JB P3.4,RTRT LCALL DEL JB P3.4,RTRT LJMP QQ12 ;-----------------------------OTXD: LCALL DEL CLR P3.2 SETB P3.3 LCALL DEL MOV A,50H MOV 60H,A MOV A,51H MOV 61H,A MOV R0,#70H OPCTX: LCALL RAMRD ;TXD MOV A,R6 MOV @R0,A INC 61H

INC R0 CJNE R0,#80H,OPCTX ;---------------MOV R0,#70H ONLTXT: MOV A,@R0 MOV R6,A TXD INC R0 CJNE R0,#7BH,ONLTXT LCALL RAMCON MOV R0,#30H ONLTXTN: MOV A,@R0 MOV R6,A TXD INC R0 CJNE R0,#3BH,ONLTXTN SETB P3.2 CLR P3.3 LCALL DEL CLR RI RET ;-----------------------------RFSTORE: ;50H,51H HOLDS ADDRESS LCALL READ LCALL CON LCALL CON1 LCALL ASSEM MOV 7AH,#FFH CLR A MOV A,62H MOV 7BH,A CLR A MOV A,61H MOV 7CH,A CLR A MOV A,63H MOV 7DH,A CLR A MOV A,64H MOV 7EH,A

CLR A MOV A,66H MOV 7FH,A ;------------------ ADD READ MOV 60H,#00H MOV 61H,#10H LCALL RAMRD MOV 50H,R6 MOV 60H,#00H MOV 61H,#11H LCALL RAMRD MOV 51H,R6 ;-------------------MEM FULL VERIFICATION CLR A MOV A,50H CJNE A,#7FH,NXTMEM CLR A MOV A,51H CJNE A,#F0H,NXTMEM LCALL MEMFULL LCALL BP3SEC LCALL SEC LCALL BP3SEC LCALL SEC LCALL BP3SEC RET ;------------------- WRITE NXTMEM: MOV DPH,50H MOV DPL,51H ;------------------CLR A MOV A,50H MOV 60H,A CLR A MOV A,51H MOV 61H,A MOV R0,#70H RFNXTW: MOV A,@R0 MOV 62H,A LCALL RAMWR MOV A,R6 CJNE A,62H,RFERR INC 61H

INC R0 INC DPTR CJNE R0,#80H,RFNXTW ;------------------- RAM ADD UPDATE ;-------------------MOV 60H,#00H MOV 61H,#10H CLR A MOV A,DPH MOV 62H,A LCALL RAMWR MOV A,R6 CJNE A,62H,RFERR MOV 60H,#00H MOV 61H,#11H CLR A MOV A,DPL MOV 62H,A LCALL RAMWR MOV A,R6 CJNE A,62H,RFERR LCALL DISCLR LJMP IDINF IDINFR: LCALL BP1SEC RET RFERR: LCALL RAMERR RET ;**************************************** IDINF: CLR p2.7 CLR p2.6 MOV P0,#80H LCALL WRI ;MOV DPH,#1CH ;MOV DPL,#20H ;LCALL TLINE MOV A,50H MOV 30H,A LCALL ACON MOV A,41H MOV P0,A LCALL WRD MOV A,40H MOV P0,A

LCALL WRD MOV A,51H MOV 30H,A LCALL ACON MOV A,41H MOV P0,A LCALL WRD MOV A,40H MOV P0,A LCALL WRD MOV P0,#3AH LCALL WRD ;---------CLR p2.7 CLR p2.6 MOV P0,#86H LCALL WRI MOV R1,#70H RTKL: CLR A MOV A,@R1 MOV P0,A LCALL WRD INC R1 CJNE R1,#7CH,RTKL CLR p2.7 CLR p2.6 MOV P0,#C0H LCALL WRI MOV A,7BH MOV 30H,A MOV A,7CH MOV 31H,A MOV A,7DH MOV 32H,A MOV A,7EH MOV 33H,A MOV A,7FH MOV 34H,A

LCALL CON ;--------MOV A,41H ADD A,#30H MOV P0,A LCALL WRD MOV A,40H ADD A,#30H MOV P0,A LCALL WRD MOV P0,#3AH LCALL WRD MOV A,43H ADD A,#30H MOV P0,A LCALL WRD MOV A,42H ADD A,#30H MOV P0,A LCALL WRD MOV P0,#20H LCALL WRD MOV P0,#20H LCALL WRD MOV A,45H ADD A,#30H MOV P0,A LCALL WRD MOV A,44H ADD A,#30H MOV P0,A LCALL WRD MOV P0,#2DH LCALL WRD MOV A,47H ADD A,#30H MOV P0,A LCALL WRD MOV A,46H

ADD A,#30H MOV P0,A LCALL WRD MOV P0,#2DH LCALL WRD MOV A,49H ADD A,#30H MOV P0,A LCALL WRD MOV A,48H ADD A,#30H MOV P0,A LCALL WRD LJMP IDINFR ;------------------------------BP1SEC: SETB P1.6 MOV R5,#02H ZM1: MOV R6,#FFH ZM2: MOV R7,#FFH ZM3: DJNZ R7,ZM3 CPL P1.5 DJNZ R6,ZM2 DJNZ R5,ZM1 CLR P1.6 CLR P1.5 RET BP3SEC: SETB P1.6 MOV R5,#06H YM1: MOV R6,#FFH YM2: MOV R7,#FFH YM3: DJNZ R7,YM3 CPL P1.5 DJNZ R6,YM2 DJNZ R5,YM1 CLR P1.6 CLR P1.5 RET ;--------------------------RAMERR: MOV DPH,#1CH MOV DPL,#10H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE

RET DISCLR: MOV DPH,#1BH MOV DPL,#A0H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET PCCOMMX: SETB P1.7 LCALL SEC CLR P1.7 LCALL SEC SETB P1.7 LCALL SEC CLR P1.7 LCALL SEC SETB P1.7 LCALL SEC CLR P1.7 LCALL SEC SETB P1.7 MOV DPH,#1BH MOV DPL,#C0H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET RFCOMMX: CLR P1.7 MOV DPH,#1BH MOV DPL,#D0H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET FORDIS: MOV DPH,#1BH MOV DPL,#E0H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET

FOROK: MOV DPH,#1BH MOV DPL,#F0H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET FORFAIL: MOV DPH,#1CH MOV DPL,#00H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET SWIPE: MOV DPH,#1CH MOV DPL,#30H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET MEMFULL: MOV DPH,#1CH MOV DPL,#40H LCALL TLINE MOV DPH,#1BH MOV DPL,#A0H LCALL BLINE RET ;**************************************** RTCINI: SETB P1.2 LCALL DEL CLR P1.1 LCALL DEL MOV R0,#8EH LCALL CWRRD MOV R0,#00H LCALL CWRRD CLR P1.2 LCALL DEL1 ;**************************** SETB P1.2 LCALL DEL

CLR P1.1 LCALL DEL MOV R0,#80H LCALL CWRRD MOV R0,#00H LCALL CWRRD CLR P1.2 LCALL DEL1 ;***************************** SETB P1.2 LCALL DEL CLR P1.1 LCALL DEL MOV R0,#84H LCALL CWRRD MOV R0,#00H LCALL CWRRD CLR P1.2 LCALL DEL1 MOV R0,#50H IIOO: MOV @R0,#00H INC R0 CJNE R0,#5CH,IIOO MOV 5CH,#01H LCALL WRITE RET ;**************************** XMTOP: LCALL LCDINI SETB P1.2 LCALL DEL CLR P1.1 LCALL DEL MOV R0,#90H LCALL CWRRD MOV R0,#A5H LCALL CWRRD CLR P1.2 LCALL DEL1 ;*********** MAIN MODULE ****************** YMTOP: LCALL TAIL

LCALL READ LCALL CON LCALL CON1 LCALL ASSEM LCALL DISP LJMP YMTOP ;****************************************** ;**** DATA READ IN BURST MODE ***** READ: SETB P1.2 LCALL DEL CLR P1.1 LCALL DEL MOV R0,#BFH LCALL CWRRD LCALL DATAR MOV 30H,R6 LCALL DATAR MOV 31H,R6 LCALL DATAR MOV 32H,R6 LCALL DATAR MOV 33H,R6 LCALL DATAR MOV 34H,R6 LCALL DATAR MOV 35H,R6 LCALL DATAR MOV 36H,R6 LCALL DATAR MOV 37H,R6 CLR P1.1 CLR P1.2 RET ;*********** READ END ****************** ;*********** WRITE ****************** WRITE: MOV A,51H SWAP A ADD A,50H

MOV 60H,A MOV A,53H SWAP A ADD A,52H MOV 61H,A MOV A,55H SWAP A ADD A,54H MOV 62H,A MOV A,57H SWAP A ADD A,56H MOV 63H,A MOV A,59H SWAP A ADD A,58H MOV 64H,A MOV A,5BH SWAP A ADD A,5AH MOV 66H,A MOV A,5CH MOV 65H,A SETB P1.2 LCALL DEL CLR P1.1 LCALL DEL MOV R0,#BEH LCALL CWRRD MOV R0,60H LCALL CWRRD MOV R0,61H LCALL CWRRD MOV R0,62H LCALL CWRRD MOV R0,63H LCALL CWRRD MOV R0,64H LCALL CWRRD MOV R0,65H LCALL CWRRD ;WEEK

MOV R0,66H LCALL CWRRD MOV R0,#00H LCALL CWRRD CLR P1.1 LCALL DEL1 CLR P1.2 LCALL DEL1 LCALL TAIL LCALL READ LCALL CON LCALL CON1 LCALL ASSEM LCALL DISP LCALL SEC3 LCALL PCCOMMX LJMP VERIF ;RET ;*********** WRITE END ****************** BSEC: MOV PSW,#10H MOV R5,#02H BM1: MOV R6,#FFH BM2: MOV R7,#FFH BM3: DJNZ R7,BM3 DJNZ R6,BM2 DJNZ R5,BM1 MOV PSW,#00H DJNZ R4,BSEC SETB P2.4 MOV R4,6BH CSEC: MOV PSW,#10H MOV R5,#04H CM1: MOV R6,#FFH CM2: MOV R7,#FFH CM3: DJNZ R7,CM3 DJNZ R6,CM2 DJNZ R5,CM1 MOV PSW,#00H DJNZ R4,CSEC RET ;************ SECOND *************** CON: CLR A MOV A,30H

ANL A,#7FH MOV 30H,A ANL A,#0FH MOV 40H,A MOV A,30H SWAP A ANL A,#0FH MOV 41H,A ;************ MIN *************** CLR A MOV A,31H ANL A,#7FH MOV 31H,A ANL A,#0FH MOV 42H,A MOV A,31H SWAP A ANL A,#0FH MOV 43H,A ;************ HOUR *************** CLR A MOV A,32H ANL A,#7FH MOV 32H,A ANL A,#0FH MOV 44H,A MOV A,32H SWAP A ANL A,#0FH MOV 45H,A ;************ DAY *************** CLR A MOV A,33H ANL A,#7FH MOV 33H,A ANL A,#0FH MOV 46H,A MOV A,33H SWAP A ANL A,#0FH MOV 47H,A ;************ MON *************** CLR A MOV A,34H ANL A,#7FH MOV 34H,A ANL A,#0FH MOV 48H,A

MOV A,34H SWAP A ANL A,#0FH MOV 49H,A ;************ YEAR *************** CLR A MOV A,36H ANL A,#7FH MOV 36H,A ANL A,#0FH MOV 4AH,A MOV A,36H SWAP A ANL A,#0FH MOV 4BH,A ;************ WEEK *************** CLR A MOV A,35H ANL A,#07H MOV 4CH,A RET ACON: ;30H SOURCE/ 40H LSB ASCII,41H MSB ASCII

CLR A MOV A,30H MOV 30H,A ANL A,#0FH ADD A, #30H MOV 40H,A CJNE A,#3AH,A1 MOV 40H,#41H CJNE A,#3BH,A2 MOV 40H,#42H CJNE A,#3CH,A3 MOV 40H,#43H CJNE A,#3DH,A4 MOV 40H,#44H CJNE A,#3EH,A5 MOV 40H,#45H CJNE A,#3FH,A6 MOV 40H,#46H MOV A,30H SWAP A ANL A,#0FH ADD A,#30H MOV 41H,A

A1: A2: A3: A4: A5: A6:

CJNE A,#3AH,GA1 MOV 41H,#41H GA1: CJNE A,#3BH,GA2 MOV 41H,#42H GA2: CJNE A,#3CH,GA3 MOV 41H,#43H GA3: CJNE A,#3DH,GA4 MOV 41H,#44H GA4: CJNE A,#3EH,GA5 MOV 41H,#45H GA5: CJNE A,#3FH,GA6 MOV 41H,#46H GA6: RET ;################################### ;********* WRITE 1BYTE INTO RTC ********** CWRRD: CLR A MOV A,R0 MOV 20H,A JNB 00H,DB0 SETB P1.0 LCALL CLKP LJMP K1 DB0: CLR P1.0 LCALL CLKP ;-------------K1: JNB 01H,DB1 SETB P1.0 LCALL CLKP LJMP K2 DB1: CLR P1.0 LCALL CLKP

;-------------K2: JNB 02H,DB2 SETB P1.0 LCALL CLKP LJMP K3 DB2: CLR P1.0 LCALL CLKP ;-------------K3: JNB 03H,DB3

SETB P1.0 LCALL CLKP LJMP K4 DB3: CLR P1.0 LCALL CLKP

;-------------K4: JNB 04H,DB4 SETB P1.0 LCALL CLKP LJMP K5 DB4: CLR P1.0 LCALL CLKP

;-------------K5: JNB 05H,DB5 SETB P1.0 LCALL CLKP LJMP K6 DB5: CLR P1.0 LCALL CLKP

;-------------K6: JNB 06H,DB6 SETB P1.0 LCALL CLKP LJMP K7 DB6: CLR P1.0 LCALL CLKP ;-------------JNB 07H,DB7 SETB P1.0 LCALL CLKP LJMP K8 CLR P1.0 LCALL CLKP RET

K7:

DB7:

K8:

CLKP: mov r4,#02H djnz r4,$

SETB P1.1 mov r4,#02H djnz r4,$ CLR P1.1 RET ;*********** DATA 1 BYTE READ MODULE ****** DATAR: MOV R0,#00H LCALL CLKR LCALL CLKR LCALL CLKR LCALL CLKR LCALL CLKR LCALL CLKR LCALL CLKR LCALL CLKR CLR A MOV A,R0 MOV R6,A RET

CLKR: CLR P1.1 mov r4,#02H ;DELAY djnz r4,$ MOV R1,P1 CLR A MOV A,R1 ANL A,#01H MOV R1,A CLR A MOV A,R0 ADD A,R1 RR A MOV R0,A SETB P1.1 mov r4,#02H djnz r4,$ RET

;*********************************** ;#################################### ;************************************ DISP: CLR p2.7 CLR p2.6 MOV P0,#86H LCALL WRI MOV A,45H ;10 HR CLR C ADD A,#30H MOV P0,A LCALL WRD MOV A,44H ; HR CLR C ADD A,#30H MOV P0,A LCALL WRD MOV P0,#3AH LCALL WRD MOV A,43H ;10 MIN CLR C ADD A,#30H MOV P0,A LCALL WRD MOV A,42H ;MIN CLR C ADD A,#30H MOV P0,A LCALL WRD MOV P0,#3AH LCALL WRD MOV A,41H ;10 SEC CLR C ADD A,#30H MOV P0,A LCALL WRD MOV A,40H CLR C ADD A,#30H MOV P0,A ;SEC

LCALL WRD CLR p2.7 CLR p2.6 MOV P0,#C4H LCALL WRI MOV A,47H ;10 DAY CLR C ADD A,#30H MOV P0,A LCALL WRD MOV A,46H ; DAY CLR C ADD A,#30H MOV P0,A LCALL WRD MOV P0,#B0H LCALL WRD

MOV A,49H ;10 MON CLR C ADD A,#30H MOV P0,A LCALL WRD MOV A,48H ;MON CLR C ADD A,#30H MOV P0,A LCALL WRD MOV P0,#B0H LCALL WRD MOV A,4BH CLR C ADD A,#30H MOV P0,A LCALL WRD ;10 Y

MOV A,4AH ;Y CLR C ADD A,#30H MOV P0,A LCALL WRD ;----------------------

MOV P0,#20H LCALL WRD WDIS: MOV P0,#CDH LCALL WRI WDIST: MOV R0,4CH CJNE R0,#01H,W1 MOV P0,#53H LCALL WRD MOV P0,#55H LCALL WRD MOV P0,#4EH LCALL WRD CJNE R0,#02H,W2 MOV P0,#4DH LCALL WRD MOV P0,#4FH LCALL WRD MOV P0,#4EH LCALL WRD CJNE R0,#03H,W3 MOV P0,#54H LCALL WRD MOV P0,#55H LCALL WRD MOV P0,#45H LCALL WRD CJNE R0,#04H,W4 MOV P0,#57H LCALL WRD MOV P0,#45H LCALL WRD MOV P0,#44H LCALL WRD CJNE R0,#05H,W5 MOV P0,#54H LCALL WRD MOV P0,#48H LCALL WRD MOV P0,#55H LCALL WRD CJNE R0,#06H,W6 MOV P0,#46H LCALL WRD MOV P0,#52H LCALL WRD

W1:

W2:

W3:

W4:

W5:

MOV P0,#49H LCALL WRD W6: CJNE R0,#07H,W7 MOV P0,#53H LCALL WRD MOV P0,#41H LCALL WRD MOV P0,#54H LCALL WRD W7: CJNE R0,#08H,W8 MOV P0,#44H LCALL WRD MOV P0,#45H LCALL WRD MOV P0,#4CH LCALL WRD CJNE R0,#09H,W9 MOV P0,#43H LCALL WRD MOV P0,#4FH LCALL WRD MOV P0,#50H LCALL WRD W9: CJNE R0,#0AH,W10 MOV P0,#52H LCALL WRD MOV P0,#2EH LCALL WRD MOV P0,#54H LCALL WRD W10: CJNE R0,#0BH,W11 MOV P0,#49H LCALL WRD MOV P0,#4EH LCALL WRD MOV P0,#54H LCALL WRD W11: RET ;******** DISP END ************** ASSEM: MOV A,51H SWAP A ADD A,50H MOV 60H,A

W8:

MOV A,53H SWAP A ADD A,52H MOV 61H,A MOV A,55H SWAP A ADD A,54H MOV 62H,A MOV A,57H SWAP A ADD A,56H MOV 63H,A MOV A,59H SWAP A ADD A,58H MOV 64H,A MOV A,5BH SWAP A ADD A,5AH MOV 66H,A MOV A,5CH MOV 65H,A RET ;WEEK

ASSEM1: MOV A,51H SWAP A ADD A,50H MOV 61H,A MOV A,53H SWAP A ADD A,52H MOV 62H,A MOV A,55H SWAP A ADD A,54H MOV 63H,A RET SETS: SETB p1.5 SETB p1.6 SETB p1.7 LCALL DEL1

RET CON1: MOV R0,#50H MOV R1,#40H NTXW: CLR A MOV A,@R1 ANL A,#0FH MOV @R0,A INC R0 INC R1 CJNE R0,#5DH,NTXW RET ;************ DELAYS *********** DEL: mov r4,#0AH djnz r4,$ RET DDEL: MOV R5,#03H EDR: mov r4,#FFH djnz r4,$ djnz r5,EDR RET ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;********** LCD INI **************** LCDINI: CLR P0.0 CLR P0.1 CLR P0.2 CLR P2.5 CLR p2.7 CLR p2.6 MOV P0,#30H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#30H LCALL WRI CLR p2.7 CLR p2.6

MOV P0,#30H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#38H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#01H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#01H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#01H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#02H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#0CH LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#1CH LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#38H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#06H LCALL WRI CLR p2.7 CLR p2.6 MOV P0,#01H

LCALL WRI RET ;*********** HEADER WRITE *************** HEAD: CLR p2.7 CLR p2.6 MOV P0,#80H LCALL WRI MOV DPTR,#1B00H MOV R7,#00H KL: CLR A MOVC A,@A+DPTR MOV P0,A LCALL WRD INC DPTR INC R7 CJNE R7,#10H,KL CLR p2.7 CLR p2.6 MOV P0,#C0H LCALL WRI KL1: CLR A MOVC A,@A+DPTR MOV P0,A LCALL WRD INC DPTR INC R7 CJNE R7,#20H,KL1 LCALL SSEC RET TAIL: CLR p2.7 CLR p2.6 MOV P0,#80H LCALL WRI MOV DPTR,#1B20H MOV R7,#00H XKL: CLR A MOVC A,@A+DPTR MOV P0,A

LCALL WRD INC DPTR INC R7 CJNE R7,#10H,XKL CLR p2.7 CLR p2.6 MOV P0,#C0H LCALL WRI XKL1: CLR A MOVC A,@A+DPTR MOV P0,A LCALL WRD INC DPTR INC R7 CJNE R7,#20H,XKL1 LCALL DEL1 RET ;---------------------------TLINE: CLR p2.7 CLR p2.6 MOV P0,#80H LCALL WRI ;MOV DPTR,#1B00H MOV R7,#00H TKL: CLR A MOVC A,@A+DPTR MOV P0,A LCALL WRD INC DPTR INC R7 CJNE R7,#10H,TKL RET BLINE: CLR p2.7 CLR p2.6 MOV P0,#C0H LCALL WRI ;MOV DPTR,#1B00H MOV R7,#00H BKL: CLR A MOVC A,@A+DPTR MOV P0,A LCALL WRD INC DPTR

INC R7 CJNE R7,#10H,BKL RET ;******** INSTRUCTION /DATA WRITE ********* WRI: SETB P2.2 MOV R0,#7FH DJNZ R0,$ CLR P2.2 SETB P2.5 MOV R0,#FFH DJNZ R0,$ CLR P2.5 MOV R0,#FFH DJNZ R0,$ RET WRD: SETB P2.2 MOV R0,#7FH DJNZ R0,$ CLR P2.2 SETB p2.7 ; REGISTER CLR p2.6 ;READ WRITE SETB P2.5 ;ENABLE MOV R0,#FFH DJNZ R0,$ CLR P2.5 CLR p2.6 CLR p2.7 MOV R0,#FFH DJNZ R0,$ RET ;****************************** DEL1: MOV R7,#FFH DJNZ R7,$ RET MOV R5,#02H MOV R6,#FFH MOV R7,#FFH DJNZ R7,M3 DJNZ R6,M2 DJNZ R5,M1 RET

SEC: M1: M2: M3:

SEC3: M13: M23: M33:

MOV R5,#0BH MOV R6,#FFH MOV R7,#FFH DJNZ R7,M33 DJNZ R6,M23 DJNZ R5,M13 RET

SSEC: SM1: SM2: SM3:

MOV R5,#1FH MOV R6,#FFH MOV R7,#FFH DJNZ R7,SM3 DJNZ R6,SM2 DJNZ R5,SM1 RET ;************** UART PORT INT ************* ;******* 9600bps,8BIT,NO PARITY *********** SPINI: MOV A,#00H MOV TCON,#40H MOV TMOD,#20H MOV SCON,#52H MOV IE,#9AH MOV TH1,#FDH MOV TL1,#FDH RET ;******************************************** XDEL: mov r4,#0FH djnz r4,$ RET XDEL1: mov r4,#0FH djnz r4,$ RET XDEL2: MOV R5,#5FH GB: mov r4,#FFH djnz r4,$ DJNZ R5,GB RET ;******************************** ;R4 IS STATUS,R1 REG DATA XRXD: MOV R4,#00H MOV R7,#08H XAE: MOV R6,#FFH XAD: MOV R5,#FFH XAB:

JNB RI,XAC CLR RI MOV R1,SBUF MOV A,R1 MOV R6,A TXD MOV R4,#01H ;STATUS CHK #01 OK,#02 NOT OK ;MOV 25H,#01H RET XAC: DJNZ R5,XAB DJNZ R6,XAD DJNZ R7,XAE MOV R4,#02H ;MOV 25H,#02H RET ;*********** DISPLAY FORMAT ************** EDIS: CLR A ;MOV A,60H MOV A,@R1 SWAP A ANL A,#0FH CLR C ADD A,#30H MOV 65H,A MOV P0,R7 LCALL WRI LCALL XDEL MOV P0,65H LCALL WRD CLR A ;MOV A,60H MOV A,@R1 ANL A,#0FH CLR C ADD A,#30H MOV 65H,A INC R7 MOV P0,R7 LCALL WRI LCALL XDEL MOV P0,65H LCALL WRD RET **********************************************************

You might also like