Top Banner
KUSHAGRA ABHINAV ECE DEPARTMENT RIMT-IET RF Based Car Documentation Checking System
79
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Rf

KUSHAGRA ABHINAV

ECE DEPARTMENT

RIMT-IET

RF Based Car Documentation Checking System

Page 2: Rf

RIMT-INSTITUTE OF ENGINEERING&TECHNOLOGY

MANDI GOBINDGARH

Report

On

RF Based Car Documentation Checking System

Submitted To Submitted By

Mr.Abhishek Sharma Kushagra Abhinav

(HOD ECE Dept.)

Page 3: Rf

CERTIFICATE

This is to certify that the project report entitled “RF Based Car Documentation

Checking System” which has been completed and submitted by Group no.-10,

B-tech (E.C.E), 4th (

7th

sem) year towards the partial fulfilment of the

requirement for award of the degree of Bachelor of Engineering in

ELECTRONICS AND COMMUNICATION (ECE), is the bonafide work by

them and has been completed under my guidance and supervision.

HoD ECE Deptt. Training Incharge

Mr. Abhishek Sharma Mr. Ravinder Pal Singh

Page 4: Rf

INDEX

SR. No. Topic Page

1.

2.

3.

4.

5.

6.

7.

8.

Acknowledgement

Introduction to project

PCB Designing and Fabrication of project

Component and Project Detail

Software module

Technical Drawings & Layouts

Conclusion and Applications

Bibliography

4

5

8

14

47

72

77

78

Page 5: Rf

ACKNOWLEDGEMENT

“If practical knowledge carves and sharps the career of a person, practical experience polishes it

and adds luster and brilliance to it.”

Here, we found this golden chance to acknowledge all those people who had blessed, encouraged

and supported us technically and morally through all the phases of our project. we thank

almighty God for giving us this opportunity to express gratitude to all those who helped us in our

project. The report of “GSM modem based message display on notice board” undertaken by

“RIMT-IET” is a learning experience for us.

First of all, we would like to pay our immense gratitude to Mr. Ravinder Pal Singh and Mr.

Ashok Arora of RIMT-IET to undergo this training under his concern.we are also grateful to Mr.

Abhishek Sharma (HOD ECE Department) RIMT-IET, Mandi Gobindgarh for providing help

and giving us a chance for showing our skills through continued support and cooperation during

this project.

We extend our fort right thanks to our family and friends for their moral support and

encouragement throughout the project .

Page 6: Rf

Chapter 1:-Introduction to project

Objective:

In this project we will check the documentation of customer using RFID module. In this there is

no need of paper RC, driving license and other documents. Everything will be in electronics

records memories. When any car will come in contact with government toll plaza or checking

system, then our car RFID will transmit our car ID and documentation to that station. If we will

have complete documents (RC, DRIVING LICENSE, INSURANCE AND POLLUTION

CHEK) then barrier will open and will allow to car passing otherwise barrier will not open and

police will catch you.

Technology used:-

We will use GSM modem for recharging the amount in our card. On receiver end it will check

our all documentations and will give response to it. We will use RF technology for this purpose.

RF remote control which is built using HT12E and HT12D chips. The remote control is built

using RF encoder chip HT12E that will generate different codes. These codes will be transmitted

by 434 MHz RF transmitter. At the receiving side these codes will be received by 434 MHz RF

receiver and decoded by RF decoder chip HT12D.In this project we show that how we design a

RF information transfers. In this project we use two RF modules for wireless data transfer. IN

this project we use 89s52 microcontroller as a main processor. This controller is basically a 40

pin IC. In this project we use two sensors also. ROM of 89s52 is 8k and ram is 256 byte. We are

using 16*2 LCD in this project. LCD is connected to port 0 which will display the no. On

receiver side RF module will give signal to microcontroller. Microcontroller is decision maker

here and informer to person on duty. It will give data to LCD, buzzer and LED‟s. we will also

use four LEDs for immediate action. These sensors are connected to the port p34 and port

p35Pin no 40 is connected to the positive supply. In this project we provide a 5 volt dc power

supply. This power supply is truly regulated power supply. Pin no 20 is connected to the negative

supply. Here we supply a negative voltage on this pin. Crystal is connected to the pin no 18 and

19 of the microcontroller. Crystal provides a clock signal to run the vehicle and process all the

internal requirement of the circuit. We use two sensors and these two sensors are connected to

the p3.4 and p3.5 of the microcontroller. For the regulated power supply we use ic 7805 as a

regulator to provide a fix 5 volt power supply.

Application area:-

The prime application area of this project is on the toll plaza on the national highway, but we can

use this system to all the parking area where it is need to check all the document of each and

every car. Currently this system is being used in all the major cities parking area where security

is the prime concern. This type of system can really be helpful to each and every organization

parking area; this system has the major role to protect the car form being stolen.

Page 7: Rf

Ht12E Encoder RF

Module TX

Antenna

Sensor

And MCU

GSM

MODEM

DIP switch

Block Diagram

Block diagram of Receiver

Block diagram transmitter

Microcontroller circuit 5 v dc

circuit

On/off

Switch

Ht12D

Decoder

RF

Modeule

Antenna LCD display

BUZZER

CIRCUIT

LED visual

INDIACTI

ON

12v DC

supply

Motor drive

circuit

DC motor

Page 8: Rf

Circuit Diagram

Circuit Diagram of Receiver

Circuit Diagram of Transmitter

Page 9: Rf

Chapter 2: PCB Designing and Fabrication of Project.

OrCAD

OrCAD is a proprietary software tool suite used primarily for electronic design automation. The

software is used mainly by electronic design engineers and electronic technicians to create

electronic schematics and electronic prints for manufacturing printed circuit boards.

The name OrCAD is a portmanteau, reflecting the company and its software's origins: Oregon +

CAD.

Founded in 1985 by John Durbetaki, Ken and Keith Seymour as “OrCAD Systems Corporation”

in Hillsboro, Oregon, the company became a leading worldwide supplier of desktop electronic

design automation (EDA) software. "Wouldn't it be nice if there were a CAD program that was

both inexpensive and would run in the IBM Personal Computer (PC)? John Durbetaki thought so

back in 1984, when he began designing an expansion chassis for the IBM PC. Durbetaki, who

had left Intel Corp. after five years as an engineer and project manager, decided, along with

brothers Keith and Ken Seymour, to start his own company to develop add-on instrumentation

for the PC." Durbetaki began creating his own schematic capture tool for his use in the PC

expansion chassis project; eventually, the hardware project was shelved entirely in favour of

developing low-cost, PC-based CAD software. The company's first product was SDT (Schematic

Design Tools), which shipped for the first time late in 1985.

OrCAD Capture CIS

OrCAD Capture CIS is a software tool used for circuit schematic capture. It is part of the

OrCAD circuit design suite.

Capture CIS is nearly identical to the similar OrCAD tool, Capture. The difference between the

two tools comes in the addition of the component information system (CIS). The CIS links

component information, such as printed circuit board package footprint data or simulation

behaviour data, with the circuit symbol in the schematic. When exported to other tools in the

Page 10: Rf

OrCAD design suite, the data stored in the CIS is also transferred to the other tool. Thus, when a

design engineer exports a schematic to the circuit board layout utility, the majority of the circuit

elements have footprints linked to them. This saves time for the design engineer.

Capture CIS has the ability to export net lists, representative of the circuit schematic which is

currently open, to the OrCAD simulation utility, PSpice. Capture CIS also exports a simulation

configuration file, accessible through the simulation toolbar. This, coupled with the CIS, allows

for quick simulations with data representative of how the circuit will behave. Capture may also

export a net list to the SPICE simulation utility.

Capture may export a hardware description of the circuit schematic that is currently open, either

in Verilog or VHDL.

Capture also has the ability to export net lists to several different circuit board layout utilities,

such as OrCAD Layout, Allegro, and others. When combined with the CIS, circuit board

footprints are linked to this net list. This, combined with the pin to pin interconnect description

of the net list, will open the correct part footprints, and, if the CIS data that CIS exported is

correct, will connect all of the pads together with representative lines. This feature makes the

circuit board design process easier for the design engineer.

Recent versions of capture also include a TCL/TK scripting functionality that allows users to

execute a command through a command prompt. The command can be stored and replayed later.

This allows users extensive customization and scripts can be written to automate any task

possible though the graphical interface.

The latest version of OrCAD also includes a marketplace much like the Android or iPhone app

stores. This enables customers to get on-demand access to information, design data, and

resources from across the Web, and apps both free and paid, written in TCL/TK which can be

used to customize the design environment and get features and capabilities not supported by the

tool.

Page 11: Rf

Capture CIS Option

Capture CIS option is a part of Capture CIS that can interface with any database which

complies with Microsoft's ODBC standard. Data in an MRP, ERP, or PDM system can be

directly accessed for use during component decision-making process.

PSPICE

PSPICE is a SPICE analog circuit and digital logic simulation program for Microsoft Windows.

PSPICE is an acronym for Personal computer Simulation Program with Integrated Circuit

Emphasis.

PSPICE was the first version of UC Berkeley SPICE available on a PC, having been released in

January 1984 to run on the original IBM PC. This initial version ran from two 360 KB floppy

disks and later included a waveform viewer and analyser program called Probe. Subsequent

versions improved on performance and moved to DEC/VAX minicomputers, Sun workstations,

Apple Macintosh, and Microsoft Windows.

LAYOUT

The Layout design flow

Layout supports every phase of the design process. A typical printed circuit board

design flow has five key phases:

• Board-level schematic

• Component placement

• Board routing

• Post processing

• Intertool communication

Board-level schematic

Using a schematic capture tool, such as OrCAD Capture, you can create a Layoutcompatible

Page 12: Rf

netlist that includes preset design rules to guide logical placement and routing. This gives you the

ability to specify critical design rules at the schematic level, such as component locations, net

spacing criteria, component group information, net widths, and routing layers, and bring them

into Layout in a netlist. If the schematic netlist changes, you can reload it. Layout‟s AutoECO

(automatic engineering change order) utility updates the board without harming finished work.

Component placement

Whether you choose to use Layout‟s manual placement tools, or the interactive and

autoplacement utilities (available in Layout Plus only), you have ultimate control of

the component placement process. You can place components individually or in

groups.

During autoplacement, Layout‟s shove capability moves components out of your

way automatically while adhering to design rule check (DRC) guidelines. You can

autoplace components individually, by area, or you can autoplace the entire board.

.

Board routing

With Layout, you can route your board manually, or you can use Layout‟s interactive and

automatic routing tools (available in Layout Plus and Layout only).Using manual routing, you

guide the routing process and manually route each track.Then you optimize routing using a

variety of manual routing commands.In interactive routing, you still control the routing of

individual tracks, but can take advantage of Layout‟s automatic routing technologies, such as

push-and-shove,which moves tracks to make space for the track you are currently routing.

If you choose to use Layout‟s autorouter, you can interrupt routing at any time to manage and

control the routing process. You can autoroute a single track, a selected area of the board, a

group of nets, or the entire board.

Post processing

In Layout, all of your output settings are stored in a spreadsheet that you can call up

and revise. You can give layer-by-layer instructions for writing to Gerber files, DXF

Page 13: Rf

Files, or hardcopy devices. Layout produces more than twenty standard reports, including

fabrication drawings, assembly drawings, and pick-and-place reports. In addition, you can create

custom reports of your own.

Intercool communication

Layout has the capability to communicate interactively with OrCAD Capture and OrCAD

Express using intertool communication (ITC).You can use intertool communication to

communicate updated schematic information to Layout at any stage of the design process. Also,

you can back annotate board data to Capture or Express from Layout.Intertool communication

supports cross-probing to facilitate design analysis. If you select a signal or part in Capture or

Express, the corresponding signal or part is highlighted in Layout, and vice versa.

Procedure to Develop Film and PCB Fabrication:

1. Take out the print out of the Layout of Bottom Layer from OrCAD Layout on

Transparent Sheet or Butter Paper. (This will be the Positive of the Design)

2. In the Dark Room, to develop the negative, Switch off all the light and switch on the red

light lamp of Film Marker Machine. Take the lith film and cut according to the positive

size. Now put the positive film on the dark side of Lith film then develop the film in film

marker machine: (put both film attached to each other as described above in the film

marker, lock the machine, press the button or switch on the machine for 15-20 seconds).

Then take out the lith film.

3. Now wash the lith film in the Sodium Carbonate and Beautile Solution about 2-3 minutes

; the film will be darken and the circuit will be develop (this is known as negative)

4. Wash the developed negative in water 1 minute.

5. To make the circuit of negative as transparent, wash the negative in fixer solution about

2-3 minutes. (This will be final negative). And dry the negative by any method (hanging

in Air or in Oven).

6. Now cut the Copper sheet in accordance to negative, and clean it by using steel wool.

7. Dip the cleaned copper sheet in the dip coating machine (Photo resist)10 seconds and

take out it when it will be properly squeezed.

Page 14: Rf

8. Put the copper sheet in side oven for 1.5 minutes and take out when it will be little bit

paste-able.

9. Now Put the Negative on the Copper sheet and Expose it under UV light (UV Exposure

Machine) for 3 minutes.

10. Dip the UV exposed Copper sheet in Developer Machine for 1-2 minutes. Now circuit

will be visible.

11. Wash the PCB with water under low flow (otherwise Circuit will be vanished).

12. Dip the PCB in Blue ink in Developer / Dye Machine for 10-20 seconds. (Now circuit

will be visible with blue ink)

13. Put the PCB in the oven for 2 minutes.

14. Now to etch the unwanted copper put the PCB in Etching Machine until unwanted copper

will be removed.

15. Clean the PCB with steel wool.

Page 15: Rf

Chapter: 3 Component Detail and Working in Project.

Component’s Detail:-

Name Value Amount

STEP DOWN TRANSFORMER 220 – 9 VOLT AC 1

DIODE IN 4007 8

VOLT REGULATOR 7805 1

RESISTOR 47K 2

RESISTOR 470 ohm 3

RESISTOR 1 K ohm 2

TRANSISTOR: NPN 2

TRANSISTOR PNP 2

CAPACITOR 1000µF 1

CAPACITOR 470 µF 1

CAPACITOR 33 µF 1

MICROCONTROLLER 89S52 1

L.C.D. 2BY16. 1

VARIABLE RESISTOR 4K7 1

RF Module 2

GENERAL P.C.B 1

Encoder/Decoder

HT12e 1

HT12d 1

IC817 2

L.E.D 1

Optocoupler 6

Page 16: Rf

RESISTORS

The flow of charge (or current) through any material,

encounters an opposing force similar in many respect

to mechanical friction. This opposing force is called

resistance of the material. It is measured in ohms. In

some electric circuits resistance is deliberately introduced in the form of the resistor.

Resistors are of following types:

1. Wire wound resistors.

2. Carbon resistors.

3. Metal film resistors.

4.

Wire Wound Resistors:

Wire wound resistors are made from a long (usually Ni-Chromium) wound on a ceramic core.

Longer the length of the wire, higher is the resistance. So depending on the value of resistor

required in a circuit, the wire is cut and wound on a ceramic core. This entire assembly is coated

with a ceramic metal. Such resistors are generally available in power of 2 watts to several

hundred watts and resistance values from 1ohm to 100k ohms. Thus wire wound resistors are

used for high currents.

Carbon Resistors:

Carbon resistors are divided into three types:

a. Carbon composition resistors are made by mixing carbon grains with

binding material (glue) and moduled in the form of rods. Wire leads

are inserted at the two ends. After this an insulating material seals the

resistor. Resistors are available in power ratings of 1/10, 1/8, 1/4 ,

1/2 , 1.2 watts and values from 1 ohm to 20 ohms.

b. Carbon film resistors are made by deposition carbon film on a ceramic

Page 17: Rf

rod. They are cheaper than carbon composition resistors.

c. Cement film resistors are made of thin carbon coating fired onto a

solid ceramic substrate. The main purpose is to have more precise

resistance values and greater stability with heat. They are made in

small square with leads.

Metal Film Resistors:

They are also called thin film resistors. They are made of a thin metal coating deposited on a

cylindrical insulating support. The high resistance values are not precise in value; however, such

resistors are free of inductance effect that is common in wire wound resistors at high frequency.

Variable Resistors:

Potentiometer is a resistor where values can be set depending on the requirement. Potentiometer

is widely used in electronics systems. Examples are volume control, tons control, brightness and

contrast control of radio or T.V. sets.

Fusible Resistors:

These resistors are wire wound type and are used in T.V. circuits for protection. They have

resistance of less than 15 ohms. Their function is similar to a fuse made to blow off whenever

current in the circuit exceeds the limit.

Resistance of a wire is directly proportional to its length and inversely proportional to its

thickness.

Page 18: Rf

COLOUR CODES

COLOUR NUMBER MULTIPLIER COLOUR TOLERANCE

Black

Brown

Red

Orange

Yellow

Green

Blue

Violet

Grey

White

Gold

Silver

0

1

2

3

4

5

6

7

8

9

100

101

102

103

104

105

106

107

108

109

10-1

10-2

Gold

Silver

No colour

5%

10%

20%

Page 19: Rf

CAPACITORS

A capacitor can store charge, and its capacity to store

charge is called capacitance. Capacitors consist of

two conducting plates, separated by an insulating

material (known as dielectric). The two plates are

joined with two leads. The dielectric could be air,

mica, paper, ceramic, polyester, polystyrene, etc.

This dielectric gives name to the capacitor. Like

paper capacitor, mica capacitor etc.

Types of capacitors:

Capacitors can be broadly classified in two categories, i.e., Electrolytic capacitors and Non-

Electrolytic capacitors as shown if the figure above.

Capacitor

Fixed capacitor Variable capacitor

Electrolytic Non-Electrolytic Gang condenser

Mica Paper

Trimmer

Ceramic

Page 20: Rf

Electrolytic Capacitor:

Electrolytic capacitors have an electrolyte as a dielectric. When such an electrolyte is charged.

chemical changes takes place in the electrolyte. If it‟s one plate is charged positively, same plate

must be charged positively in future. We call such capacitors as polarized. Normally we see

electrolytic capacitor as polarized capacitors and the leads are marked with positive or negative

on the can. Non-electrolyte capacitors have dielectric material such as paper, mica or ceramic.

Therefore, depending upon the dielectric, these capacitors are classified.

Mica Capacitor:

It is sandwich of several thin metal plates separated by thin sheets of mica. Alternate plates are

connected together and leads attached for outside connections. The total assembly is encased in a

plastic capsule or Bakelite case. Such capacitors have small capacitance value (50 to 500pf) and

high working voltage (500V and above). The mica capacitors have excellent characteristics

under stress of temperature variation and high voltage application. These capacitors are now

replaced by ceramic capacitors.

Ceramic Capacitor:

Such capacitors have disc or hollow tabular shaped dielectric made of ceramic material such as

titanium dioxide and barium titan ate. Thin coating of silver compounds is deposited on both

sides of dielectric disc, which acts as capacitor plates. Leads are attached to each sides of the

dielectric disc and whole unit is encapsulated in a moisture proof coating. Disc type capacitors

have very high value up to 0.001uf. Their working voltages range from 3V to 60000V. These

capacitors have very low leakage current. Breakdown voltage is very high.

Page 21: Rf

Paper Capacitor:

It consists of thin foils, which are separated by thin paper or waxed paper. The sandwich of foil

and paper is then rolled into a cylindrical shape and enclosed in a paper tube or encased in a

plastic capsules. The lead at each end of the capacitor is internally attached to the metal foil.

Paper capacitors have capacitance ranging from 0.0001uf to 2.0uf and working voltage rating as

high as 2000V.

DIODE

Diodes are polarized, which means that they must be

inserted into the PCB the correct way round. This is

because an electric current will only flow through them in

one direction (like air will only flow one way through a

tyre valve). Diodes have two connections, an anode and a

cathode. The cathode is always identified by a dot, ring or

some other mark.

The PCB is often marked with a +sign for the cathode end. Diodes come in all shapes and sizes.

They are often marked with a type

number. Detailed characteristics of a

diode can be found by looking up the type

number in a data book. If you know how

to measure resistance with a meter then

test some diodes. A good one has low

resistance in one direction and high in

other. They are specialized types of diode

available such as the zener and light

emitting diode (LED).

Page 22: Rf

Integrated Circuit (IC)

IC (Integrated Circuit) means that all the components of the circuit are fabricated on same chip.

Digital ICs are a collection of resistors, diodes, and transistors fabricated on a single piece of

semiconductor, usually silicon called a substrate, which is commonly referred to as „wafer‟. The

chip is enclosed in a protective plastic or ceramic package from which pins extend out

connecting the IC to other device. Suffix N or P stands for dual-in-line (plastic package (DIP))

while suffix J or I stands for dual-in-lime ceramic package. Also the suffix for W stands for flat

ceramic package.

The pins are numbered counter clockwise when viewed from the top of the package with respect

to an identity notch or dot at one end of the chip.The manufacturer‟s name can usually be

guessed from its logo that is printed on the IC. The IC type number also indicates the

manufacturer‟s code. For e.g. DM 408 N SN 7404 indicates National Semiconductor and Texas

Instruments.

Other examples are:

Fair Child : UA, UAF

National Semiconductor : DM, LM, LH, LF, and TA.

Motorola : MC, MFC.

Sprague : UKN, ULS, ULX.

Signetic : N/s, NE/SE, and SU.

Burr-Brown : BB.

Texas Instruments : SN.

The middle portion i.e. the IC type number tells about the IC function and also the family, which

the particular IC belongs to.IC‟s that belongs to standard TTL series have an identification

number that starts with 74; for e.g. 7402, 74LS04, 74S04 etc. IC‟s that belongs to standard

Page 23: Rf

CMOS family their number starts with 4, like 4000, 451B, 4724B, 1400. The 74C, 74HC, 74AC

& 74ACT series are newer CMOS series.

Various series with TTL logic family are:-

Standard TTL 74.

Schottky TTL 74s.

Low power Schottky 74LS.

Advance Schottky 74AS.

Advanced Low Power Schottky 74ALs.

Also there are various series with CMOS logic family as metal state CMOS 40 or 140.

LCD

An HD44780 Character LCD is a de facto

industry standard liquid crystal display (LCD)

display device designed for interfacing with

embedded systems. These screens come in a

variety of configurations including 8x1, which

is one row of eight characters, 16x2, and 20x4.

The most commonly manufactured

configuration is 40x4 characters, which

requires two individually addressable HD44780 controllers with expansion chips as the

HD44780 can only address up to 80 characters

These LCD screens are limited to text only and are often used in copiers, fax machines, laser

printers, industrial test equipment, networking equipment such as routers and storage devices.

Character LCDs can come with or without backlights, which may be LED, fluorescent, or electro

luminescent.

Page 24: Rf

Character LCDs use a standard 14-pin interface and those with backlights have 16 pins. The pin

outs are as follows:

1. Ground

2. VCC (+3.3 to +5V)

3. Contrast adjustment (VO)

4. Register Select (RS). RS=0: Command, RS=1: Data

5. Read/Write (R/W). R/W=0: Write, R/W=1: Read

6. Clock (Enable). Falling edge triggered

7. Bit 0 (Not used in 4-bit operation)

8. Bit 1 (Not used in 4-bit operation)

9. Bit 2 (Not used in 4-bit operation)

10. Bit 3 (Not used in 4-bit operation)

11. Bit 4

12. Bit 5

13. Bit 6

14. Bit 7

15. Backlight Anode (+)

16. Backlight Cathode (-)

There may also be a single backlight pin, with the other connection via Ground or VCC pin. The

two backlight pins may precede pin 1.

The nominal backlight voltage is around 4.2V at 25˚C using a VDD 5V capable model.

Character LCDs can operate in 4-bit or 8-bit mode. In 4 bit mode, pins 7 through 10 are unused

and the entire byte is sent to the screen using pins 11 through 14 by sending 4-bits (nibble) at a

time.

The character generator ROM contains 208 characters in a 5x8 dot matrix, and 32 characters in a

5x10 dot matrix.

Page 25: Rf

There is a Japanese version of the ROM which includes kana characters, and a European version

which includes Cyrillic and Western European characters.

The 7-bit ASCII subset for the Japanese version is non-standard: it supplies a Yen symbol where

the backslash character is normally found, and left and right arrow symbols in place of tilde and

the rub-out character.

A limited number of custom characters can be programmed into the device in the form of a

bitmap using special commands. These characters have to be written to the device each time it is

switched on, as they are stored in volatile memory.

Page 26: Rf

Liquid crystal display is very important device in embedded system. It offers high flexibility to

user as he can display the required data on it. But due to lack of proper approach to LCD

interfacing many of them fail. Many people consider LCD interfacing a complex job but

according to me LCD interfacing is very easy task, you just need to have a logical approach. This

page is to help the enthusiast who wants to interface LCD with through understanding. Copy and

Paste technique may not work when an embedded system engineer wants to apply LCD

interfacing in real world projects. You will know about the booster rockets on space shuttle.

Without these booster rockets the space shuttle would not launch in geosynchronous orbit.

Page 27: Rf
Page 28: Rf
Page 29: Rf

8051 Microcontroller

Embedded system employs a combination of software & hardware to perform a specific

function. It is a part of a larger system which may not be a “computer”Works in a reactive &

time constrained environment.

Any electronic system that uses a CPU chip, but that is not a general-purpose workstation,

desktop or laptop computer is known as embedded system. Such systems generally use

microprocessors; microcontroller or they may use custom-designed chips or both. They are used

in automobiles, planes, trains, space vehicles, machine tools, cameras, consumer and office

appliances, cell phones, PDAs and other handhelds as well as robots and toys. The uses are

endless, and billions of microprocessors are shipped every year for a myriad of applications.

In embedded systems, the software is permanently set into a read-only memory such as a ROM

or flash memory chip, in contrast to a general-purpose computer that loads its programs into

RAM each time. Sometimes, single board and rack mounted general-purpose computers are

called "embedded computers" if used to cont.

Embedded System Applications:-

Consumer electronics, e.g., cameras, cell phones etc.

Consumer products, e.g. washers, microwave ovens etc.

Automobiles (anti-lock braking, engine control etc.)

Industrial process controller & defense applications.

Computer/Communication products, e.g. printers, FAX machines etc.

Medical Equipments.

ATMs

Aircrafts

DIFFERENCE BETWEEN MICROPROCESSORS

AND MICROCONTROLLERS:

A Microprocessor is a general purpose digital computer central processing

unit(C.P.U) popularly known as CPU on the chip. The Microprocessors contain

no RAM, no ROM, and no I/P O/P ports on the chip itself.

Page 30: Rf

On the other hand a Microcontroller has a C.P.U(microprocessor) in addition to a

fixed amount of RAM, ROM, I/O ports and a timer all on a single chip.

In order to make a Microprocessor functional we must add RAM, ROM, I/O Ports

and timers externally to them,i.e any amount of external memory can be added to

it.

But in controllers there is a fixed amount of memory which makes them ideal for

many applications.

The Microprocessors have many operational codes(opcodes) for moving data

from external memory to the C.P.U

Whereas Microcontrollers may have one or two operational codes.

DISADVANTAGES OF MICROPROCESSORS

OVER MICROCONTROLLERS

System designed using Microprocessors are bulky

They are expensive than Microcontrollers

We need to add some external devices such as PPI chip, Memory, Timer/counter

chip, Interrupt controller chip,etc. to make it functional.

Types of microcontroller architecture

There are two types of Microcontroller architecture designed for embedded system development.

These are:

1)RISC- Reduced instruction set computer

2)CISC- Complex instruction set computer

Difference between CISC and RISC:

CISC stands for Complex Instruction Set Computer. Most PC's use CPU based on this

architecture. For instance Intel and AMD CPU's are based on CISC architectures. Typically

Page 31: Rf

CISC chips have a large amount of different and complex instructions. In common CISC chips

are relatively slow (compared to RISC chips) per instruction, but use little (less than RISC)

instructions. MCS-51 family microcontrollers based on CISC architecture.

RICS stands for Reduced Instruction Set Computer. The philosophy behind it is that almost no

one uses complex assembly language instructions as used by CISC, and people mostly use

compilers which never use complex instructions. Therefore fewer, simpler and faster instructions

would be better, than the large, complex and slower CISC instructions. However, more

instructions are needed to accomplish a task. Atmell‟s AVR microcontroller based on RISC

architecture.

History of 8051

Intel Corporation introduced an 8-bit microcontroller called 8051 in 1981 this controller had 128

bytes of RAM, 4k bytes of on chip ROM, two timers, one serial port, and four ports all are on

single chip. The 8051 is an 8 bit processor, meaning that the CPU can work on only 8 bit data at

a time. Data larger than 8 bits broken into 8 bit pieces to be processed by CPU. It has for I/O 8

bit wide.

Features of the 8051:-

Feature Quantity

ROM 4K bytes

RAM 128 bytes

Timer 2

I/O pins 32

Serial port 1

Interrupt sources 6

8051 Architecture Overview

The 8051 family is one of the most common microcontroller architectures used worldwide. 8051

based microcontrollers are offered in hundreds of variants from many different silicon

manufacturers

Page 32: Rf

The 8051 is based on an 8-bit CISC core with Harvard architecture. It's an 8-bit CPU, optimized

for control applications with extensive Boolean processing (single-bit logic capabilities), 64K

program and data memory address space and various on-chip peripherals.

The 8051 microcontroller family offers developers a wide variety of high-integration and cost-

effective solutions for virtually every basic embedded control application. From traffic control

equipment to input devices and computer networking products, 8051 u.c deliver high

performance together with a choice of configurations and options matched to the special needs of

each application. Whether it's low power operation, higher frequency performance, expanded on-

chip RAM, or an application-specific requirement, there's a version of the 8051 microcontroller

that's right for the job.

When it's time to upgrade product features and functionality, the 8051 architecture puts you on

the first step of a smooth and cost-effective upgrade path - to the enhanced performance of the

151 and 251 microcontrollers.

Page 33: Rf

Block diagram of 8051

Page 34: Rf

Internal Architecture of 8051

Page 35: Rf

Pin configuration of 8051

Page 36: Rf

There are four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports

upon RESET are configured as output, ready to be used as output ports. To use any of these ports

as an input port, it must be programmed.

Port 0:- Port 0 occupies a total of 8 pins (pins 32-39) .It can be used for input or output. To use

the pins of port 0 as both input and output ports, each pin must be connected externally to a 10K

ohm pull-up resistor. This is due to the fact that P0 is an open drain, unlike P1, P2, and P3.Open

drain is a term used for MOS chips in the same way that open collector is used for TTL chips.

With external pull-up resistors connected upon reset, port 0 is configured as an output port. For

example, the following code will continuously send out to port 0 the alternating values 55H and

AAH

Port 0 as input:- With resistors connected to port 0, in order to make it an input, the port must be

programmed by writing 1 to all the bits. In the following code, port 0 is configured first as an

input port by writing 1's to it, and then data is received from the port and sent to P1.

Dual Role of Port 0 :-Port 0 is also designated as AD0-AD7, allowing it to be

used for both address and data. When connecting an 8051/31 to an external memory, port 0

provides both address and data. The 8051 multiplexes address and data through port 0 to save

Page 37: Rf

pins. ALE indicates if P0 has address or data. When ALE = 0, it provides data D0-D7, but when

ALE =1 it has address and data with the help of a 74LS373 latch.

Port 1:- Port 1 occupies a total of 8 pins (pins 1 through 8). It can be used as input or output. In

contrast to port 0, this port does not need any pull-up resistors since it already has pull-up

resistors internally. Upon reset, Port 1 is configured as an output port. For example, the

following code will continuously send out to port1 the alternating values 55h & AAh

Port 1 as input:-To make port1 an input port, it must be programmed as such by writing 1 to all

its bits. In the following code port1 is configured first as an input port by writing 1‟s to it, then

data is received from the port and saved in R7 ,R6 & R5.

Port 2 :-Port 2 occupies a total of 8 pins (pins 21- 28). It can be used as input or output.

Just like P1, P2 does not need any pull-up resistors since it already has pull-up resistors

internally. Upon reset, Port 2 is configured as an output port. For example, the following code

will send out continuously to port 2 the alternating values 55h and AAH. That is all the bits of

port 2 toggle continuously.

Port 2 as input:- To make port 2 an input, it must programmed as such by writing 1 to all its

bits. In the following code, port 2 is configured first as an input port by writing 1‟s to it. Then

data is received from that port and is sent to P1 continuously.

Dual role of port 2:- In systems based on the 8751, 8951, and DS5000, P2 is used as simple I/O.

However, in 8031-based systems, port 2 must be used along with P0 to provide the 16-bit

address for the external memory. As shown in pin configuration 8051, port 2 is also designed as

A8-A15, indicating the dual function. Since an 8031 is capable of accessing 64K bytes of

external memory, it needs a path for the 16 bits of the address. While P0 provides the lower 8

bits via A0-A7, it is the job of P2 to provide bits A8-A15 of the address. In other words, when

8031 is connected to external memory, P2 is used for the upper 8 bits of the 16 bit address, and it

cannot be used for I/O.

Port 3:- port 3 occupies a total of 8 pins, pins 10 through 17. It can be used as input or output.

P3 does not need any pull-up resistors, the same as P1 and P2 did not. Although port 3 is

configured as an output port upon reset. Port 3 has the additional function of providing some

extremely important signals such as interrupts. This information applies both 8051 and 8031

Page 38: Rf

chips. There functions are as follows:-

P3.0 and P3.1 are used for the RxD and TxD serial communications signals. Bits P3.2 and P3.3

are set aside for external interrupts. Bits P3.4 and P3.5 are used for timers 0 and 1. Finally P3.6

and P3.7 are used to provide the WR and RD signals of external memories connected in 8031

based systems.

ALE/PROG

Address Latch Enable is an output pulse for latching the low byte of the address during accesses

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.

PORT 3 Function pin

P3.0 RxD 10

P3.1 TxD 11

P3.2 ___

Int0

12

P3.3 ___

Int1

13

P3.4 T0 14

P3.5 T1 15

P3.6 ___

WR

16

P3.7 ___

RD

17

Page 39: Rf

PSEN

Program Store Enable is the read strobe to external program memory. When the AT89S8252 is

executing code from external program memory, PSEN is activated twice each machine

cycle, except that two PSEN activations are skipped during each access to external data memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device to fetch code

from external program memory locations starting at 0000H up to FFFFH. Note, however, that if

lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC

for internal program executions. This pin also receives the 12-volt programming enable voltage

(VPP) during Flash programming when 12-volt programming is selected.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

AT89s8252

AT89S8252 is an ATMEL controller with the core of intel MCS-51. It has same pin

configuration as give above.

The AT89S8252 is a low-power, high-performance CMOS 8-bit microcomputer with 8K bytes

of Downloadable Flash programmable and erasable read only memory and 2K bytes of

EEPROM. The device is manufactured using Atmel‟s high density nonvolatile memory

technology and is compatible with the industry standard 80C51 instruction set and pinout. The

on-chip Downloadable Flash allows the program memory to be reprogrammed in-system through

an SPI serial interface or by a conventional nonvolatile memory programmer. By combining a

versatile 8-bit CPU with Downloadable Flash on a monolithic chip, the Atmel AT89S8252 is a

powerful microcomputer which provides a highly flexible and cost effective solution to many

Page 40: Rf

embedded control applications. The AT89S8252 provides the following standard features: 8K

bytes of Downloadable Flash, 2K bytes of EEPROM, 256 bytes of RAM, 32 I/O lines,

programmable watchdog timer, two Data Pointers, three 16-bit timer/counters, a six-vector two-

level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In

addition, the AT89S8252 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, timer/counters, serial port, and interrupt system to continue functioning. The

Power Down Mode saves the RAM contents but freezes the oscillator, disabling all other chip

functions until the next interrupt or hardware reset.

The Downloadable Flash can be changed a single byte at a time and is accessible through the SPI

serial interface. Holding RESET active forces the SPI bus into a serial programming interface

and allows the program memory to be written to or read from unless Lock Bit 2 has been

activated.

Features

• Compatible with MCS-51™Products

• 8K bytes of In-System Reprogrammable Downloadable Flash Memory

- SPI Serial Interface for Program Downloading

- Endurance: 1,000 Write/Erase Cycles

• 2K bytes EEPROM

- Endurance: 100,000 Write/Erase Cycles

• 4.0V to 6V Operating Range

• Fully Static Operation: 0 Hz to 24 MHz

• Three-Level Program Memory Lock

• 256 x 8 bit Internal RAM

• 32 Programmable I/O Lines

• Three 16 bit Timer/Counters

• Nine Interrupt Sources

• Programmable UART Serial Channel

• SPI Serial Interface

• Low Power Idle and Power Down Modes

Page 41: Rf

• Interrupt Recovery From Power Down

• Programmable Watchdog Timer

• Dual Data Pointer

• Power Off Flag

Pin Description

Furthermore, P1.4, P1.5, P1.6, and P1.7 can be configured as the SPI slave port select, data

input/output and shift clock input/output pins as shown in the following table.

89S52 Microcontroller

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of

in-system programmable Flash memory. The device is manufactured using Atmel‟s high-density

nonvolatile memory technology and is compatible with the indus-try-standard 80C51 instruction

set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or

by a conventional nonvolatile memory pro-grammer. By combining a versatile 8-bit CPU with

in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful

microcontroller which provides a highly-flexible and cost-effective solution to many embedded

control applications. The AT89S52 provides the following standard features: 8K bytes of Flash,

256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters,

a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and

clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero

Page 42: Rf

frequency and supports two software selectable power saving modes. The Idle Mode stops the

CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue

functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator,

disabling all other chip functions until the next interrupt or hardware reset.

Features

• Compatible with MCS®-51 Products

• 8K Bytes of In-System Programmable (ISP) Flash Memory

• 4.0V to 5.5V Operating Range

• Fully Static Operation: 0 Hz to 33 MHz

• Three-level Program Memory Lock

• 256 x 8-bit Internal RAM

• 32 Programmable I/O Lines

• Three 16-bit Timer/Counters

• Eight Interrupt Sources

• Full Duplex UART Serial Channel

• Low-power Idle and Power-down Modes

• Interrupt Recovery from Power-down Mode

• Watchdog Timer

• Dual Data Pointer

• Power-off Flag

• Fast Programming Time

Page 43: Rf
Page 44: Rf

Pin Description

VCC:- Supply voltage.

GND:- Ground.

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

accesses 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

dur-ing program verification. External pull-

ups are required during program

verification.

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

inter-nal 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/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.

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

inter-nal 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 accesses to external data

memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong

internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit

addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2

Page 45: Rf

also receives the high-order address bits and some control signals during Flash programming and

verification.

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

inter-nal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being

pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals

for Flash programming and verification.

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 98 oscillator periods after the Watchdog times out. The DISRTO

bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit

DISRTO, 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 during

accesses 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 dur-ing 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

AT89S52 is executing code from external program memory, PSEN is activated twice each

machine cycle, except that two PSEN activations are skipped during each access to external data

memory.

EA/VPP

External Access Enable. EA must be strapped to GND in order to enable the device to fetch code

from external program memory locations starting at 0000H up to FFFFH. Note, however, that if

lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC

for internal program executions. This pin also receives the 12-volt programming enable voltage

(VPP) during Flash programming.

XTAL1

Page 46: Rf

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

Decoders(HT12d)

The decoders are a series of CMOS LSIs for

remote control system applications. They are

paired with Holtek‟s series of encoders (refer to

the encoder/decoder cross reference table). For

proper operation, a pair of encoder/decoder with

the same number of addresses and data format

should be chosen. The decoders receive serial

addresses and data from a programmed series of

encoders that are transmitted by a carrier using an

RF or an IR transmission medium. They compare

the serial input data three times continuously with

their local addresses. If no error or unmatched

codes are found, the input data codes are decoded and then transferred to the output pins. The VT

pin also goes high to indicate a valid transmission. The series of decoders are capable of

decoding information‟s that consist of N bits of address and 12_N bits of data. Of this series, the

HT12D is arranged to provide 8 address bits and 4 data bits, and HT12F is used to decode 12 bits

of address information.

Features

_ Operating voltage: 2.4V~12V

_ Low power and high noise immunity CMOS Technology

_ Low standby current

_ Capable of decoding 12 bits of information

_ Binary address setting

_ Received codes are checked 3 times

_ Address/Data number combination

_ HT12D: 8 address bits and 4 data bits

_ HT12F: 12 address bits only

_ Built-in oscillator needs only 5% resistor

_Valid transmission indicator

_ Easy interface with an RF or an infrared transmission medium

_ Minimal external components

Page 47: Rf

Encoder (HT12E)

The 212 encoders are a series of CMOS

LSIs for remote control system

applications. They are capable of

encoding information which consists of

N address bits and 12_N data bits. Each

address/data input can be set to one of

the two logic states. The programmed

addresses/data are transmitted together

with the header bits via an RF or an

infrared transmission medium upon

receipt of a trigger signal. The capability

to select a TE trigger on the HT12E or a

DATA trigger on the HT12A further enhances the application flexibility of the 212 series of

encoders. The HT12A additionally provides a 38kHz carrier for infrared systems.

Features

_ Operating voltage

_ 2.4V~5V for the HT12A

_ 2.4V~12V for the HT12E

_ Low power and high noise immunity CMOS

Technology

_ Low standby current: 0.1_A (typ.) at VDD=5V

_ HT12A with a 38 kHz carrier for infrared transmission

Medium

_ Minimum transmission word

_ Four words for the HT12E

_ One word for the HT12A

_ Built-in oscillator needs only 5% resistor

_ Data code has positive polarity

_ Minimal external components

_ Pair with Holtek_s 212 series of decoders

_ 18-pin DIP, 20-pin SOP package

Applications

_ Burglar alarm system

_ Smoke and fire alarm system

_ Garage door controllers

_ Car door controllers

_ Car alarm system

_ Security system

_ Cordless telephones

_ other remote control systems

Page 48: Rf

Chapter 4: Software Module

SOFTWARE USED

Keil u-Vision 3.0

Keil Software is used provide you with software development tools for 8051 based

microcontrollers. With the Keil tools, you can generate embedded applications for virtually every

8051 derivative. The supported microcontrollers are listed in the µ-vision

KEIL PROGRAMMING STEPS

Open Keil from the Start menu

The Figure below shows the basic names of the windows referred in this document

.

Page 49: Rf

Select New Project from the Project Menu

Name the project „Toggle.a51‟

Click on the Save Button.

The device window will be displayed.

Page 50: Rf

Select the part you will be using to test with. For now we will use the Dallas Semiconductor part

at89s52.

Double Click on the Atmel Semiconductor.

Scroll down and select the at89s52 Part

Click OK

Page 51: Rf

Click File Menu and select New.

A new window will open up in the Keil IDE.

Page 52: Rf

Copy the example to the Right into the new window. This file will

Write the program.

Page 53: Rf

Name the file Toggle.a51

Click the Save Button

Page 54: Rf

Expand Target 1 in the Tree Menu

Click on Project and select Targets, Groups, Files…

Page 55: Rf

Click on Groups/Add Files tab Under Available Groups select Source Group 1 Click Add Files

to Group… button

Page 56: Rf

Change file type to Asm Source file(*.a*;

*.src)

Click on toggle.a51

Click Add button

Click Close Button

Click OK button when you return to Target,

Groups, Files… dialog box

Page 57: Rf

Expand the Source Group 1 in the Tree menu to ensure that the file was added to the project

Click on Target 1 in Tree menu Click on Project Menu and select Options for Target 1

Page 58: Rf

Select Target Tab Change Xtal (Mhz) from 50.0 to 11.0592

Select Output Tab Click on Create Hex File check box Click OK Button

Page 59: Rf

Click on Project Menu and select Rebuild all Target Files In the Build Window it should report

„0 Errors (s), 0 Warnings‟ You are now ready to Program your Part

Comment out line ACALL DELAY by placing a Semicolon at the beginning. This will allow

you to see the port change immediately. Click on the File Menu and select Save

Page 60: Rf

Click on Project Menu and select Rebuild all Target Files In the Build Window it should report

„0 Errors (s), 0 Warnings‟ Click on Debug Menu and Select Start/Stop Debug Session

The Keil Debugger should be now be Running.

Page 61: Rf

Click on Peripherals. Select I/O Ports, Select Port 1

Page 62: Rf

A new window should port will pop up. This represent the Port and

Pins

Step through the code by pressing F11 on the Keyboard. The Parallel Port 1 Box should change

as

you completely step through the code.

To exit out, Click on Debug Menu and Select Start/Stop Debug Session

Page 63: Rf

Program

ORG 00H

AJMP START

ORG 30H

START:

MOV LCD,#00H

MOV A,#38H ;2*16 MATRIX

ACALL COMMAND

MOV A,#02 ;RETURN HOME

ACALL COMMAND

MOV A,#01 ;CLEAR DISPLAY SCREEN

ACALL COMMAND

MOV A,#0CH ;DISPLAY ON CURSOR OFF

ACALL COMMAND

MOV A,#80H ;MOVE CURSOR TO FIRST LINE SECOND COLOUMN

ACALL COMMAND

MOV DPTR,#TABLE1 ;DISPLAY ERP

ACALL DISPLAY

SETB LED

ACALL DELAY

MOV R1,#00

Page 64: Rf

MOV R0,#00

MOV R2,#00

MOV R3,#00

MOV R4,#00

MOV R5,#00

MOV A,#80H ;MOVE CURSOR TO FIRST LINE SECOND COLOUMN

ACALL COMMAND

MOV DPTR,#TABLE1 ;DISPLAY ERP

ACALL DISPLAY

MOV A,#0C0H ;MOVE CURSOR TO FIRST LINE SECOND COLOUMN

ACALL COMMAND

MOV DPTR,#TABLE7 ;DISPLAY ERP

ACALL DISPLAY

MAIN:

mov a,P1

cjne a,#0ffh,jn1

acall READING5

jn1:

mov a,p1

cjne a,#0f0h,kl

acall motoact

acall READING5

kl:

jnb p1.0,READING1

Page 65: Rf

jnb p1.1,READING2

jnb p1.2,READING3

jnb p1.3,READING4

SJMP MAIN

READING5:

ACALL LCDCLR

MOV A,#0C0H

ACALL COMMAND

MOV DPTR,#TABLE6

ACALL DISPLAY

AJMP MAIN

READING1:

ACALL LCDCLR

MOV A,#80H

ACALL COMMAND

MOV DPTR,#TABLE8

ACALL DISPLAY

MOV A,#0C0H

ACALL COMMAND

MOV DPTR,#TABLE2

ACALL DISPLAY

MOV A,#0CAH

ACALL COMMAND

MOV A,R0

ACALL HTD

Page 66: Rf

acall paye

AJMP MAIN

READING2:

ACALL LCDCLR

MOV A,#80H

ACALL COMMAND

MOV DPTR,#TABLE9

ACALL DISPLAY

MOV A,#0C0H

ACALL COMMAND

MOV DPTR,#TABLE3

ACALL DISPLAY

MOV A,#0CAH

ACALL COMMAND

MOV A,R1

ACALL HTD

acall paye

AJMP MAIN

READING3:

ACALL LCDCLR

MOV A,#80H

ACALL COMMAND

MOV DPTR,#TABLE10

ACALL DISPLAY

Page 67: Rf

MOV A,#0C0H

ACALL COMMAND

MOV DPTR,#TABLE4

ACALL DISPLAY

MOV A,#0CAH

ACALL COMMAND

MOV A,R2

acall paye

ACALL HTD

AJMP MAIN

READING4:

ACALL LCDCLR

MOV A,#80H

ACALL COMMAND

MOV DPTR,#TABLE11

ACALL DISPLAY

MOV A,#0C0H

ACALL COMMAND

MOV DPTR,#TABLE5

ACALL DISPLAY

MOV A,#0CAH

ACALL COMMAND

MOV A,R3

Page 68: Rf

ACALL HTD

acall paye

AJMP MAIN

BUZZE:

clr buzz

acall DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

SETB BUZZ

RET

motoact:

clr p2.0

setb p2.1

acall DELAY

acall DELAY

acall DELAY

acall DELAY

setb p2.0

setb p2.1

acall DELAY

acall DELAY

acall DELAY

acall DELAY

Page 69: Rf

acall DELAY

setb p2.0

clr p2.1

acall DELAY

acall DELAY

acall DELAY

acall DELAY

setb p2.0

setb p2.1

ret

paye: ; swicthes to pay

jnb p1.4,jsm1

sjmp paye

jsm1:jb p1.5,paye

acall motoact

acall READING5

ajmp MAIN

HTD:

RET

OUT1:

ACALL WRITE

RET

LCDCLR:

Page 70: Rf

MOV A,#01H ;CLEAR DISPLAY SCREEN

ACALL COMMAND

RET ; DISPLAY DATA ON LCD

DISPLAY:

CLR A

MOVC A,@A+DPTR

JZ NEXT

ACALL WRITE

JMP DISPLAY

NEXT:

RET

WRITE:

ACALL CHKBUSY

MOV LCD,A

SETB RS

CLR RW

SETB E

acall delay1

CLR E

RET

COMMAND:

ACALL CHKBUSY

MOV LCD,A

CLR RS

CLR RW

Page 71: Rf

SETB E

acall delay1

CLR E

RET

CHKBUSY:

SETB FL

SETB RW

CLR RS

CHECK4:

CLR E

SETB E

JB FL,CHECK4

RET

DELAY:

MOV R6,#5

AGAIN: MOV R7,#2

BACK: DJNZ R7,BACK

DJNZ R6,AGAIN

RET

TABLE1: DB 'WIRELESS CDCS',0

TABLE7: DB 'WELCOME ',0

TABLE2: DB 'RC INVALID',0

TABLE3: DB 'DRIVING LIC ERR',0

TABLE4: DB 'POLLUTION NC',0

Page 72: Rf

TABLE5: DB 'INSURANCE INVALID',0

TABLE6: DB 'Eveything Clear',0

TABLE11: DB 'PAY RS.1000',0

TABLE8: DB 'PAY RS.500',0

TABLE9: DB 'PAY RS.600',0

TABLE10: DB 'PAY RS.700',0

end

Page 73: Rf

Title

Size Document Number Rev

Date: Sheet of

<Doc> <Rev Code>

<Title>

Custom

1 1Wednesday , September 26, 2012

Q1BC548

Q2

buzzer

5v

12v

Title

Size Document Number Rev

Date: Sheet of

<Doc> <Rev Code>

<Title>

Custom

1 1Wednesday , September 26, 2012

T1

TRANSFORMER

1 5

6

4 8C11000uf

U1 LM7805

VIN1

GN

D3

VOUT2

C2470uf

D1 IN4007

D2

IN4007

R1470E

D3

LED

220V

12

0

12

U2

AT89S52

RST9

XTAL218

XTAL119

GND20

PSEN29ALE/PROG30

EA

/VP

P31

VC

C40

P1.0/T21

P1.1/T2-EX2

P1.23

P1.34 P1.4/SS

5

P1.5/MOSI6

P1.6/MISO7

P1.7/SCK8

P2.0/A821

P2.1/A922

P2.2/A1023

P2.3/A1124

P2.4/A1225

P2.5/A1326

P2.6/A1427

P2.7/A1528

P3.0/RXD10

P3.1/TXD11

P3.2/INT012

P3.3/INT113

P3.4/T014

P3.5/T115

P3.6/WR16

P3.7/RD17

P0.0/AD039

P0.1/AD138

P0.2/AD237

P0.3/AD336

P0.4/AD435

P0.5/AD534

P0.6/AD633

P0.7/AD732

Y1

12M

Hz

C333pf

C4

33pf

C8CAP

R25RESISTOR

U6

A1

B2

C3

D4

E5

F6

G7

H8

I9

J10K11L12M13N14O15P16Q17R18

R26D4

R27

U7

A1

C3

D4

E5

F6

H8

B2

G7

MODULE

ANTENNA

U5

LCD 16*2

DB

411

DB

07

DB

18

DB

29

DB

512

VSS1

VCC2

VE

E3

RS

4

R/W

5

E6

DB

613

DB

714

DB

310

LED+15

LED-16

R11

POT

12v

R14

470ER154.7K

PC117

OPTO ISOLATOR

12

43

R16

470ER174.7K

PC117

OPTO ISOLATOR

12

43

R18

470ER194.7K

PC117

OPTO ISOLATOR

12

43

R20

470ER214.7K

PC117

OPTO ISOLATOR

12

43

Chapter 5:-Technical Drawings

Schematic Diagram for Receiver

Page 74: Rf

A1

B2

C3

D4

E5

F6

G7

H8

I9

J10K11L12M13N14O15P16Q17R18

ENCODER

4.7K

D1

LED

A1

B2

C3

D4

MODULE

C1CAP

D10

LED

4.7K

RESISTOR

R3

1M

Schematic Diagram for Transmitter

Page 75: Rf

Higer Level Schematic Diagram for Power Supply

Page 76: Rf

Higer Level Schematic Diagram for Receiver

Page 77: Rf

Higer Level Schematic Diagram for Transmitter

Page 78: Rf

Chapter 6:- Conclusion &Application

CONCLUSION

We would like to conclude this project as a very great and enriching experience. During the

project we were familiarized with soldering process. We observed that an automated device can

replace good amount of human working force, moreover human are more prone to errors and in

intensive condition the probability of error increases. An automated can work with diligence,

versatility and with almost zero error.

This project can be used in all the parking area‟s as well as in the toll gate. This project helped us

to gain knowledge of hardware implementation without facing many problems. We also learned

about the engineering responsibility and about their hard work. This project imparted us practical

knowledge.

Thus we would like to conclude our project is very useful for an individual and a very nice and

wonderful experience.

APPLICATIONS

Can be implemented in all the parking areas.

This project will help the person to easily protect their vehicles.

This project can be helpful to stop crime.

This can be implemented on all the Toll gate to check all the necessary document

of the vehicles.

Page 79: Rf

Biblography

www.electronicsforu.com

www.plc.net

www.wikipedia.org

www.encyclopedia.org

www.datasheetcatalog.com

www.answers.com

www.national.com

www.ti.com

www.atmel.com