Top Banner
IMPLEMENTATION OF MODAL RADAR TARGET DIRECTION IDENTIFIER WITH REMOTE STATION ALERT SYSTEM
122
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: wkc7 doc

IMPLEMENTATION OF MODAL RADAR TARGET DIRECTION IDENTIFIER WITH REMOTE STATION ALERT SYSTEM

Page 2: wkc7 doc

INDEX

Technical Specifications

Project Abstract

Project Block Diagram

Introduction To Radar

Explanation of each block

Regulated Power Supply

AT89S52 Microcontroller

IR Tx-Rx

Software Tools

Keil Compiler

Proload Flash

Source Code

Advantages

Applications

Conclusion

Reference

Page 3: wkc7 doc

Technical Specifications

Page 4: wkc7 doc

Technical Specifications:

Title of the project : Implementation of modal radar target

Direction identifier with remote station alert system

Domain : Embedded Systems Design

Software : Embedded C, Keil, Proload

Microcontroller : AT89S52

Power Supply : +5V, 500mA Regulated Power Supply

Display : LED 5mm, 16 X 2 LCD

Crystal : 11.0592MHz

Communication Device : IR pair (Tx,Rx) Module

Applications : Aircraft, ships, spacecraft, guided missiles, motor

Vehicles, weather formations, and terrain.

Page 5: wkc7 doc

ABSTRACT

Page 6: wkc7 doc

ABSTRACT:

Radar is an object detection system which uses electromagnetic waves specifically radio

waves — to determine the range, altitude, direction, or speed of both moving and fixed

objects .The radar dish, or antenna, transmits pulses of radio waves or microwaves which bounce

off any object in their path. The object returns a tiny part of the wave's energy to a dish or

antenna which is usually located at the same site as the transmitter. The project is used to identify

the target in which direction it is coming and position of object.

Radar signal containing selected target simulations modulates an optical, infrared signal,

in accordance with the selected target simulations. Radar target system is provided with

selectively direct the modulated IR radiation onto selected areas of an RF (Radar Frequency)

array. Radar target identifier is selected with areas of the RF array function to add target angular

simulations and target space position and scintillations to the other simulations contained in the

radar signal. The IR radiation is converted to a radar frequency signal in the RF array and is

transmitted to the radar test system.

This project uses AT89S52 Microcontroller which is interfaced with Radar Target

Identifier system has an array of IR sensor pairs. These IR sensors are keeping track with the

target in all the directions. If the target is found to be moved in any direction and then it gives a

control signal to the microcontroller and the status is displayed on the LCD for user

identification.

This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage

regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac

out put of secondary of 230/12V step down transformer.

Page 7: wkc7 doc

BLOCK DIAGRAM

Page 8: wkc7 doc

AT89S52MCU

16X2 LCD

IR SENSORARRAY

RESET

CRYSTAL

POWER SUPPLY

1St IR pair 2nd IR pair

Buzzer

BLOCK DIAGRAM:

RADAR TARGET IDENTIFIER

Page 9: wkc7 doc

INTRODUCTION

Page 10: wkc7 doc

INTRODUCTION

An embedded system is a combination of software and hardware to perform a dedicated

task.

Some of the main devices used in embedded products are Microprocessors and

Microcontrollers. Microprocessors are commonly referred to as general purpose processors as

they simply accept the inputs, process it and give the output.

In contrast, a microcontroller not only accepts the data as inputs but also manipulates it,

interfaces the data with various devices, controls the data and thus finally gives the result. As

everyone in this competitive world prefers to make the things easy and simple to handle, this

project sets an example to some extent.

Radar is an object-detection system which uses electromagnetic waves —

specifically radio waves — to determine the range, altitude, direction, or speed of both moving

and fixed objects such as aircraft, ships, spacecraft, guided missiles, motor vehicles, weather

formations, and terrain. The radar dish, or antenna, transmits pulses of radio waves or

microwaves which bounce off any object in their path. The object returns a tiny part of the

wave's energy to a dish or antenna which is usually located at the same site as the transmitter.

Page 11: wkc7 doc

A radar system has a transmitter that emits radio waves called radar signals in

predetermined directions. When these come into contact with an object they are

usually reflected and/or scattered in many directions. Radar signals are reflected especially well

by materials of considerable electrical conductivity—especially by most metals, by seawater, by

wet land, and by wetlands. Some of these make the use of radar altimeters possible. The radar

signals that are reflected back towards the transmitter are the desirable ones that make radar

work. If the object is moving either closer or farther away, there is a slight change in

the frequency of the radio waves, due to the Doppler effect.

Radar receivers are usually, but not always, in the same location as the transmitter.

Although the reflected radar signals captured by the receiving antenna are usually very weak,

these signals can be strengthened by the electronic amplifiers that all radar sets contain. More

sophisticated methods of signal processing are also nearly always used in order to recover useful

radar signals.

The weak absorption of radio waves by the medium through which it passes is what

enables radar sets to detect objects at relatively-long ranges—ranges at which other

electromagnetic wavelengths, such as visible light, infrared light, and ultraviolet light, are too

Page 12: wkc7 doc

strongly attenuated. In particular, there are weather conditions under which radar works well

regardless of the weather. Such things as fog, clouds, rain, falling snow, and sleet that block

visible light are usually transparent to radio waves. Certain, specific radio frequencies that are

absorbed or scattered by water vapor, raindrops, or atmospheric gases (especially oxygen) are

avoided in designing radars except when detection of these is intended.

Finally, radar relies on its own transmissions, rather than light from the Sun or the Moon,

or from electromagnetic waves emitted by the objects themselves, such as infrared wavelengths

(heat). This process of directing artificial radio waves towards objects is called illumination,

regardless of the fact that radio waves are completely invisible to the human eye or cameras.

Radar equation:

The power Pr returning to the receiving antenna is given by the radar equation:

where

Pt = transmitter power

Gt = gain of the transmitting antenna

Ar = effective aperture (area) of the receiving antenna

σ = radar cross section, or scattering coefficient, of the target

F = pattern propagation factor

Rt = distance from the transmitter to the target

Rr = distance from the target to the receiver.

Page 13: wkc7 doc

In the common case where the transmitter and the receiver are at the same

location, Rt = Rr and the term Rt² Rr² can be replaced by R4, where R is the range. This

yields:

This shows that the received power declines as the fourth power of the range, which

means that the reflected power from distant targets is very, very small.

The equation above with F = 1 is a simplification for vacuum without interference. The

propagation factor accounts for the effects of multipath and shadowing and depends on

the details of the environment. In a real-world situation, pathloss effects should also be

considered.

Page 14: wkc7 doc

Introduction of Embedded System:

An Embedded System is a combination of computer hardware and software, and

perhaps additional mechanical or other parts, designed to perform a specific function. A good

example is the microwave oven. Almost every household has one, and tens of millions of them

are used every day, but very few people realize that a processor and software are involved in the

preparation of their lunch or dinner.

This is in direct contrast to the personal computer in the family room. It too is

comprised of computer hardware and software and mechanical components (disk drives, for

example). However, a personal computer is not designed to perform a specific function rather; it

is able to do many different things. Many people use the term general-purpose computer to make

this distinction clear. As shipped, a general-purpose computer is a blank slate; the manufacturer

does not know what the customer will do wish it. One customer may use it for a network file

server another may use it exclusively for playing games, and a third may use it to write the next

great American novel.

Frequently, an embedded system is a component within some larger system. For

example, modern cars and trucks contain many embedded systems. One embedded system

controls the anti-lock brakes, other monitors and controls the vehicle's emissions, and a third

displays information on the dashboard. In some cases, these embedded systems are connected by

some sort of a communication network, but that is certainly not a requirement.

At the possible risk of confusing you, it is important to point out that a general-purpose

computer is itself made up of numerous embedded systems. For example, my computer consists

of a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of

Page 15: wkc7 doc

which is an embedded system. Each of these devices contains a processor and software and is

designed to perform a specific function. For example, the modem is designed to send and receive

digital data over analog telephone line. That's it and all of the other devices can be summarized

in a single sentence as well.

If an embedded system is designed well, the existence of the processor and software

could be completely unnoticed by the user of the device. Such is the case for a microwave oven,

VCR, or alarm clock. In some cases, it would even be possible to build an equivalent device that

does not contain the processor and software. This could be done by replacing the combination

with a custom integrated circuit that performs the same functions in hardware. However, a lot of

flexibility is lost when a design is hard-cooled in this way. It is mush easier, and cheaper, to

change a few lines of software than to redesign a piece of custom hardware.

History and Future:

Given the definition of embedded systems earlier is this chapter; the first such systems

could not possibly have appeared before 1971. That was the year Intel introduced the world's

first microprocessor. This chip, the 4004, was designed for use in a line of business calculators

produced by the Japanese Company Busicom. In 1969, Busicom asked Intel to design a set of

custom integrated circuits-one for each of their new calculator models. The 4004 was Intel's

response rather than design custom hardware for each calculator, Intel proposed a general-

purpose circuit that could be used throughout the entire line of calculators. Intel's idea was that

the software would give each calculator its unique set of features.

The microcontroller was an overnight success, and its use increased steadily over the

next decade. Early embedded applications included unmanned space probes, computerized traffic

lights, and aircraft flight control systems. In the 1980s, embedded systems quietly rode the

Page 16: wkc7 doc

waves of the microcomputer age and brought microprocessors into every part of our kitchens

(bread machines, food processors, and microwave ovens), living rooms (televisions, stereos, and

remote controls), and workplaces (fax machines, pagers, laser printers, cash registers, and credit

card readers).

It seems inevitable hat the number of embedded systems will continue to increase

rapidly. Already there are promising new embedded devices that have enormous market

potential; light switches and thermostats that can be central computer, intelligent air-bag systems

that don't inflate when children or small adults are present, pal-sized electronic organizers and

personal digital assistants (PDAs), digital cameras, and dashboard navigation systems. Clearly,

individuals who possess the skills and desire to design the next generation of embedded systems

will be in demand for quite some time.

Real Time Systems:

One subclass of embedded is worthy of an introduction at this point. As commonly

defined, a real-time system is a computer system that has timing constraints. In other words, a

real-time system is partly specified in terms of its ability to make certain calculations or

decisions in a timely manner. These important calculations are said to have deadlines for

completion. And, for all practical purposes, a missed deadline is just as bad as a wrong answer.

The issue of what if a deadline is missed is a crucial one. For example, if the real-time

system is part of an airplane's flight control system, it is possible for the lives of the passengers

and crew to be endangered by a single missed deadline. However, if instead the system is

involved in satellite communication, the damage could be limited to a single corrupt data packet.

The more severe the consequences, the more likely it will be said that the deadline is "hard" and

Page 17: wkc7 doc

thus, the system is a hard real-time system. Real-time systems at the other end of this discussion

are said to have "soft" deadlines.

All of the topics and examples presented in this book are applicable to the designers of real-time

system who is more delight in his work. He must guarantee reliable operation of the software and

hardware under all the possible conditions and to the degree that human lives depend upon three

system's proper execution, engineering calculations and descriptive paperwork.

Application Areas

Nearly 99 per cent of the processors manufactured end up in embedded systems. The embedded

system market is one of the highest growth areas as these systems are used in very market

segment- consumer electronics, office automation, industrial automation, biomedical

engineering, wireless communication,

data communication, telecommunications, transportation, military and so on.

Consumer appliances: At home we use a number of embedded systems which include digital

camera, digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and

air-conditioner, VCO player, video game consoles, video recorders etc. Today’s high-tech car

has about 20 embedded systems for transmission control, engine spark control, air-conditioning,

navigation etc. Even wristwatches are now

becoming embedded systems. The palmtops are powerful embedded systems using which we can

carry out many general-purpose tasks such as playing games and word processing.

Office automation: The office automation products using em embedded systems are copying

machine, fax machine, key telephone, modem, printer, scanner etc.

Page 18: wkc7 doc

Industrial automation: Today a lot of industries use embedded systems for process control.

These include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity

generation and transmission. The embedded systems for industrial use are designed to carry out

specific tasks such as monitoring the temperature, pressure, humidity, voltage, current etc., and

then take appropriate action based on the monitored levels to control other devices or to send

information to a centralized monitoring station. In hazardous industrial environment, where

human presence has to be avoided, robots are used, which are programmed to do specific jobs.

The robots are now becoming very powerful and carry out many interesting and complicated

tasks such as hardware assembly.

Medical electronics: Almost every medical equipment in the hospital is an embedded system.

These equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices,

X-ray scanners; equipment used in blood analysis, radiation, colonscopy, endoscopy etc.

Developments in medical electronics have paved way for more accurate diagnosis of diseases.

Computer networking: Computer networking products such as bridges, routers, Integrated

Services Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay

switches are embedded systems which implement the necessary data communication protocols.

For example, a router interconnects two networks. The two networks may be running different

protocol stacks. The router’s function is to obtain the data packets from incoming pores, analyze

the packets and send them towards the destination after doing necessary protocol conversion.

Most networking equipments, other than the end systems (desktop computers) we use to access

the networks, are embedded systems

.

Telecommunications: In the field of telecommunications, the embedded systems can be

categorized as subscriber terminals and network equipment. The subscriber terminals such as key

telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The network

equipment includes multiplexers, multiple access systems, Packet Assemblers Dissemblers

Page 19: wkc7 doc

(PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded

systems that provide very low-cost voice communication over the Internet.

Wireless technologies: Advances in mobile communications are paving way for many

interesting applications using embedded systems. The mobile phone is one of the marvels of the

last decade of the 20’h century. It is a very powerful embedded system that provides voice

communication while we are on the move. The Personal Digital Assistants and the palmtops can

now be used to access multimedia services over the Internet. Mobile communication

infrastructure such as base station controllers, mobile switching centers are also powerful

embedded systems.

Insemination: Testing and measurement are the fundamental requirements in all scientific and

engineering activities. The measuring equipment we use in laboratories to measure parameters

such as weight, temperature, pressure, humidity, voltage, current etc. are all embedded systems.

Test equipment such as oscilloscope, spectrum analyzer, logic analyzer, protocol analyzer, radio

communication test set etc. are embedded systems built around powerful processors. Thank to

miniaturization, the test and measuring equipment are now becoming portable facilitating easy

testing and measurement in the field by field-personnel.

Security: Security of persons and information has always been a major issue. We need to protect

our homes and offices; and also the information we transmit and store. Developing embedded

systems for security applications is one of the most lucrative businesses nowadays. Security

devices at homes, offices, airports etc. for authentication and verification are embedded systems.

Encryption devices are nearly 99 per cent of

the processors that are manufactured end up in~ embedded systems. Embedded systems find

applications in . every industrial segment- consumer electronics, transportation, avionics,

biomedical engineering, manufacturing, process control and industrial automation, data

communication, telecommunication, defense, security etc. Used to encrypt the data/voice being

transmitted on communication links such as telephone lines. Biometric systems using fingerprint

Page 20: wkc7 doc

and face recognition are now being extensively used for user authentication in banking

applications as well as for access control in high security buildings.

Finance: Financial dealing through cash and cheques are now slowly paving way for

transactions using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time

Money) machines. Smart card, of the size of a credit card, has a small micro-controller and

memory; and it interacts with the smart card reader! ATM machine and acts as an electronic

wallet. Smart card technology has the capability of ushering in a cashless society. Well, the list

goes on. It is no exaggeration to say that eyes wherever you go, you can see, or at least feel, the

work of an embedded system!

Overview of Embedded System Architecture

Every embedded system consists of custom-built hardware built around a Central Processing

Unit (CPU). This hardware also contains memory chips onto which the software is loaded. The

software residing on the memory chip is also called the ‘firmware’. The embedded system

architecture can be represented as a layered architecture as shown in Fig.

The operating system runs above the hardware, and the application software runs above the

operating system. The same architecture is applicable to any computer including a desktop

computer. However, there are significant differences. It is not compulsory to have an operating

system in every embedded system. For small appliances such as remote control units, air

Page 21: wkc7 doc

conditioners, toys etc., there is no need for an operating system and you can write only the

software specific to that application. For applications involving complex processing, it is

advisable to have an operating system. In such a case, you need to integrate the application

software with the operating system and then transfer the entire software on to the memory chip.

Once the software is transferred to the memory chip, the software will continue to run for a long

time you don’t need to reload new software.

Now, let us see the details of the various building blocks of the hardware of an embedded

system. As shown in Fig. the building blocks are;

· Central Processing Unit (CPU)

· Memory (Read-only Memory and Random Access Memory)

· Input Devices

· Output devices

· Communication interfaces

· Application-specific circuitry

Page 22: wkc7 doc

Central Processing Unit (CPU):

The Central Processing Unit (processor, in short) can be any of the following: microcontroller,

microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-cost processor. Its

main attraction is that on the chip itself, there will be many other components such as memory,

serial communication interface, analog-to digital converter etc. So, for small applications, a

micro-controller is the best choice as the number of external components required will be very

less. On the other hand, microprocessors are more powerful, but you need to use many external

components with them. D5P is used mainly for applications in which signal processing is

involved such as audio and video processing.

Memory:

The memory is categorized as Random Access 11emory (RAM) and Read Only Memory

(ROM). The contents of the RAM will be erased if power is switched off to the chip, whereas

ROM retains the contents even if the power is switched off. So, the firmware is stored in the

ROM. When power is switched on, the processor reads the ROM; the program is program is

executed.

Input devices:

Unlike the desktops, the input devices to an embedded system have very limited capability.

There will be no keyboard or a mouse, and hence interacting with the embedded system is no

easy task. Many embedded systems will have a small keypad-you press one key to give a

specific command. A keypad may be used to input only the digits. Many embedded systems used

in process control do not have any input device for user interaction; they take inputs from sensors

or transducers 1’fnd produce electrical signals that are in turn fed to other systems.

Page 23: wkc7 doc

Output devices:

The output devices of the embedded systems also have very limited capability. Some embedded

systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of the system

modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD) may also be

used to display some important parameters.

Communication interfaces:

The embedded systems may need to, interact with other embedded systems at they may have to

transmit data to a desktop. To facilitate this, the embedded systems are provided with one or a

few communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB), IEEE

1394, Ethernet etc.

Application-specific circuitry:

Sensors, transducers, special processing and control circuitry may be required fat an embedded

system, depending on its application. This circuitry interacts with the processor to carry out the

necessary work. The entire hardware has to be given power supply either through the 230 volts

main supply or through a battery. The hardware has to design in such a way that the power

consumption is minimized.

CONCLUSION:

Embedded Systems plays a vital role in our day today life. They are used for household

appliances like microwave oven to the satellite applications. They provide good man to machine

interface.

Automation is the further step in the world of Embedded Systems, which includes the

elimination of the human being in the mundane applications. They are cost effective, accurate

and can work in any conditions and round the clock.

Page 24: wkc7 doc
Page 25: wkc7 doc

EXPLANATION OF EACH BLOCK

Page 26: wkc7 doc

BLOCK DESCRIPTION

POWER SUPPLY:

The input to the circuit is applied from the regulated power supply. The a.c. input i.e.,

230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The

output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage,

the output voltage from the rectifier is fed to a filter to remove any a.c components present even

after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc

voltage.

Fig: Power supply

RegulatorFilter

Bridge Rectifier

Step down transformer

230V AC

50Hz

D.C Output

Page 27: wkc7 doc

Transformer:

Usually, DC voltages are required to operate various electronic equipment and these

voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input

available at the mains supply i.e., 230V is to be brought down to the required voltage level. This

is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a

required level.

Fig: Transformer

Rectifier:

The output from the transformer is fed to the rectifier. It converts A.C. into pulsating

D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is

used because of its merits like good stability and full wave rectification.

The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both

half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit

has four diodes connected to form a bridge. The ac input voltage is applied to the diagonally

Page 28: wkc7 doc

opposite ends of the bridge. The load resistance is connected between the other two ends of the

bridge.

Fig: Rectifier Circuit

For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas

diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load

resistance RL and hence the load current flows through RL.

For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas,

D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load

resistance RL and hence the current flows through RL in the same direction as in the previous half

cycle. Thus a bi-directional wave is converted into a unidirectional wave.

Page 29: wkc7 doc

Fig: Rectifier output Waveforms

Page 30: wkc7 doc

Filter:

Capacitive filter is used in this project. It removes the ripples from the output of rectifier

and smoothens the D.C. Output received from this filter is constant until the mains voltage and

load is maintained constant. However, if either of the two is varied, D.C. voltage received at this

point changes. Therefore a regulator is applied at the output stage.

Voltage regulator:

As the name itself implies, it regulates the input applied to it. A voltage regulator

is an electrical regulator designed to automatically maintain a constant voltage level. In this

project, power supply of 5V and 12V are

required. In order to obtain these

voltage levels, 7805 and 7812

voltage regulators are to be used. The

first number 78 represents positive

supply and the numbers 05, 12

represent the required output voltage

levels. The L78xx series of three-terminal positive regulators is available in TO-220, TO-220FP,

TO-3, D2PAK and DPAK packages and several fixed output voltages, making it useful in a wide

range of applications. These regulators can provide local on-card regulation, eliminating the

distribution problems associated with single point regulation. Each type

employs internal current limiting, thermal shut-down and safe area protection,

making it essentially indestructible. If adequate heat sinking is provided, they

can deliver over 1 A output current. Although designed primarily as fixed

voltage regulators, these devices can be used with external components to

obtain adjustable voltage and currents.

Page 31: wkc7 doc

AT89S52 MICROCONTROLLER

Page 32: wkc7 doc

MICROCONTROLLERS:

Microprocessors and microcontrollers are widely used in embedded systems

products. Microcontroller is a programmable device. A microcontroller has a CPU in addition to

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

amount of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal

for many applications in which cost and space are critical.

The Intel 8052 is Harvard architecture, single chip microcontroller (µC) which was

developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and early

1990s, but today it has largely been superseded by a vast range of enhanced devices with 8052-

compatible processor cores that are manufactured by more than 20 independent manufacturers

including Atmel, Infineon Technologies and Maxim Integrated Products.

8052 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a

time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. 8052

is available in different memory types such as UV-EPROM, Flash and NV-RAM.

The present project is implemented on Keil Uvision. In order to program the device,

proload tool has been used to burn the program onto the microcontroller.

The features, pin description of the microcontroller and the software tools used are

discussed in the following sections.

Page 33: wkc7 doc

FEATURES

• Compatible with MCS-51® Products

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

– Endurance: 1000 Write/Erase Cycles

• 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

Page 34: wkc7 doc

DESCRIPTION

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 industry- 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 programmer. 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 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.

Page 35: wkc7 doc

PIN CONFIGURATIONS

Page 36: wkc7 doc
Page 37: wkc7 doc

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 pullups. Port 0 also receives the

code bytes during Flash programming and outputs the code bytes during program verification.

External pullups are required during program verification.

Port 1

Port 1 is an 8-bit bidirectional I/O port with internal pullups. 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 pullups 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 pullups. 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.

Page 38: wkc7 doc

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pullups. 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 pullups 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 pullups. 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 use 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.

Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pullups. 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 pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled

low will source current (IIL) because of the pullups. Port 3 also serves the functions of various

special features of the AT89S52, as shown in the following table. Port 3 also receives some

control signals for Flash programming and verification.

Page 39: wkc7 doc

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 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 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.

Page 40: wkc7 doc

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

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

XTAL2

Output from the inverting oscillator amplifier.

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be

configured for use as an on-chip oscillator, as shown in Figure. 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, as shown in the below figure. 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-by-two flip-flop, but minimum and maximum voltage high and low time

specifications must be observed.

Page 41: wkc7 doc

Fig: Oscillator Connections

C1, C2 = 30 pF ± 10 pF for Crystals = 40 pF ± 10 pF for Ceramic Resonators

Fig: External Clock Drive Configuration

Page 42: wkc7 doc

8052 Microcontroller Memory Organization

The microcontroller memory is divided into Program Memory and Data Memory. Program

Memory (ROM) is used for permanent saving program being executed, while Data Memory

(RAM) is used for temporarily storing and keeping intermediate results and variables. Depending

on the model in use (still referring to the whole 8052 microcontroller family) at most a few Kb of

ROM and 128 or 256 bytes of RAM can be used. However…

All 8052 microcontrollers have 16-bit addressing bus and can address 64 kb memory. It is

neither a mistake nor a big ambition of engineers who were working on basic core development.

It is a matter of very clever memory organization which makes these controllers a real

“programmers’ tidbit“.

Program Memory

The oldest models of the 8052 microcontroller family did not have any internal program

memory. It was added from outside as a separate chip. These models are recognizable by their

label beginning with 803 (for ex. 8031 or 8032). All later models have a few Kbytes ROM

embedded, Even though it is enough for writing most of the programs, there are situations when

additional memory is necessary. A typical example of it is the use of so called lookup tables.

They are used in cases when something is too complicated or when there is no time for solving

equations describing some process. The example of it can be totally exotic (an estimate of self-

guided rockets’ meeting point) or totally common (measuring of temperature using non-linear

thermo element or asynchronous motor speed control). In those cases all needed estimates and

approximates are executed in advance and the final results are put in the tables (similar to

logarithmic tables).

Page 43: wkc7 doc

How does the microcontroller handle external memory depend on the pin EA logic state?

Page 44: wkc7 doc

EA=0 In this case, internal program memory is completely ignored, only a program stored in

external memory is to be executed.

EA=1 In this case, a program from built-in ROM is to be executed first (to the last location).

Afterwards, the execution is continued by reading additional memory.

in both cases, P0 and P2 are not available to the user because they are used for data and address

transmission. Besides, the pins ALE and PSEN are used too.

Page 45: wkc7 doc

Data Memory

As already mentioned, Data Memory is used for temporarily storing and keeping data and

intermediate results created and used during microcontroller’s operating. Besides, this

microcontroller family includes many other registers such as: hardware counters and timers,

input/output ports, serial data buffers etc. The previous versions have the total memory size of

256 locations, while for later models this number is incremented by additional 128 available

registers. In both cases, these first 256 memory locations (addresses 0-FFh) are the base of the

memory. Common to all types of the 8052 microcontrollers. Locations available to the user

occupy memory space with addresses from 0 to 7Fh. First 128 registers and this part of RAM is

divided in several blocks.

The first block consists of 4 banks each including 8 registers designated as R0 to R7. Prior to

access them, a bank containing that register must be selected. Next memory block (in the range

of 20h to 2Fh) is bit- addressable, which means that each bit being there has its own address

from 0 to 7Fh. Since there are 16 such registers, this block contains in total of 128 bits with

separate addresses (The 0th bit of the 20h byte has the bit address 0 and the 7th bit of the 2Fh

byte has the bit address 7Fh). The third groups of registers occupy addresses 2Fh-7Fh (in total of

80 locations) and does not have any special purpose or feature.

Additional Memory Block of Data Memory

In order to satisfy the programmers’ permanent hunger for Data Memory, producers have

embedded an additional memory block of 128 locations into the latest versions of the 8052

microcontrollers. Naturally, it’s not so simple…The problem is that electronics performing

addressing has 1 byte (8 bits) on disposal and due to that it can reach only the first 256 locations.

In order to keep already existing 8-bit architecture and compatibility with other existing models a

little trick has been used.

Using trick in this case means that additional memory block shares the same addresses with

existing locations intended for the SFRs (80h- FFh). In order to differentiate between these two

physically separated memory spaces, different ways of addressing are used. A direct addressing

Page 46: wkc7 doc

is used for all locations in the SFRs, while the locations from additional RAM are accessible

using indirect addressing.

Fig: Microcontroller internal structure

Page 47: wkc7 doc
Page 48: wkc7 doc

How to extend memory?

In case on-chip memory is not enough, it is possible to add two external memory chips with

capacity of 64Kb each. I/O ports P2 and P3 are used for their addressing and data transmission.

From the users’ perspective, everything functions quite simple if properly connected because the

most operations are performed by the microcontroller itself. The 8052 microcontroller has two

separate reading signals RD#(P3.7) and PSEN#. The first one is activated byte from external data

memory (RAM) should be read, while another one is activated to read byte from external

program memory (ROM). These both signals are active at logical zero (0) level. A typical

Page 49: wkc7 doc

example of such memory extension using special chips for RAM and ROM is shown on the

previous picture. It is called Hardward architecture.

Even though the additional memory is rarely used with the latest versions of the

microcontrollers, it will be described here in short what happens when memory chips are

connected according to the previous scheme. It is important to know that the whole process is

performed automatically, i.e. with no intervention in the program.

When the program during execution encounters the instruction which resides in external memory

(ROM), the microcontroller will activate its control output ALE and set the first 8 bits of address

(A0-A7) on P0. In this way, IC circuit 74HCT573 which "lets in" the first 8 bits to memory

address pins is activated.

A signal on the pin ALE closes the IC circuit 74HCT573 and immediately afterwards 8 higher

bits of address (A8-A15) appear on the port. In this way, a desired location in additional program

memory is completely addressed. The only thing left over is to read its content.

Pins on P0 are configured as inputs, the pin PSEN is activated and the microcon troller reads

content from memory chip. The same connections are used both for data and lower address byte.

Similar occurs when it is a needed to read some location from external Data Memory. Now,

addressing is performed in the same way, while reading or writing is performed via signals

which appear on the control outputs RD or WR.

Addressing

While operating, processor processes data according to the program instructions. Each

instruction consists of two parts. One part describes what should be done and another part

indicates what to use to do it. This later part can be data (binary number) or address where the

data is stored. All 8052 microcontrollers use two ways of addressing depending on which part of

memory should be accessed:

Page 50: wkc7 doc

Direct Addressing

On direct addressing, a value is obtained from a memory location while the address of that

location is specified in instruction. Only after that, the instruction can process data (how depends

on the type of instruction: addition, subtraction, copy…). Obviously, a number being changed

during operating a variable can reside at that specified address. For example:

Since the address is only one byte in size ( the greatest number is 255), this is how only the first

255 locations in RAM can be accessed in this case the first half of the basic RAM is intended to

be used freely, while another half is reserved for the SFRs.

Indirect Addressing

On indirect addressing, a register which contains address of another register is specified in the

instruction. A value used in operating process resides in that another register. For example:

Only RAM locations available for use are accessed by indirect addressing (never in the SFRs).

For all latest versions of the microcontrollers with additional memory block (those 128 locations

in Data Memory), this is the only way of accessing them. Simply, when during operating, the

instruction including “@” sign is encountered and if the specified address is higher than 128 (7F

hex.), the processor knows that indirect addressing is used and jumps over memory space

reserved for the SFRs.

On indirect addressing, the registers R0, R1 or Stack Pointer are used for specifying 8-bit

addresses. Since only 8 bits are available, it is possible to access only registers of internal RAM

in this way (128 locations in former or 256 locations in latest versions of the microcontrollers). If

memory extension in form of additional memory chip is used then the 16-bit DPTR Register

(consisting of the registers DPTRL and DPTRH) is used for specifying addresses. In this way it

is possible to access any location in the range of 64K.

Page 51: wkc7 doc

SFRs (Special Function Registers)

SFRs are a kind of control table used for running and monitoring microcontroller’s operating.

Each of these registers, even each bit they include, has its name, address in the scope of RAM

and clearly defined purpose ( for example: timer control, interrupt, serial connection etc.). Even

though there are 128 free memory locations intended for their storage, the basic core, shared by

all types of 8052 controllers, has only 21 such registers. Rest of locations are intensionally left

free in order to enable the producers to further improved models keeping at the same time

compatibility with the previous versions. It also enables the use of programs written a long time

ago for the microcontrollers which are out of production now.

Page 52: wkc7 doc

A Register (Accumulator)

This is a general-purpose register which serves for storing intermediate results during operating.

A number (an operand) should be added to the accumulator prior to execute an instruction upon

it. Once an arithmetical operation is preformed by the ALU, the result is placed into the

accumulator. If a data should be transferred from one register to another, it must go through

accumulator. For such universal purpose, this is the most commonly used register that none

microcontroller can be imagined without (more than a half 8052 microcontroller's instructions

used use the accumulator in some way).

B Register

B register is used during multiply and divide operations which can be performed only upon

numbers stored in the A and B registers. All other instructions in the program can use this

register as a spare accumulator (A).

During programming, each of registers is called by name so that their exact address is not so important for

the user. During compiling into machine code (series of hexadecimal numbers recognized as instructions

by the microcontroller), PC will automatically, instead of registers’ name, write necessary addresses into

the microcontroller.

Page 53: wkc7 doc

R Registers (R0-R7)

This is a common name for the total 8 general purpose registers (R0, R1, R2 ...R7). Even they

are not true SFRs, they deserve to be discussed here because of their purpose. The bank is active

when the R registers it includes are in use. Similar to the accumulator, they are used for

temporary storing variables and intermediate results. Which of the banks will be active depends

on two bits included in the PSW Register. These registers are stored in four banks in the scope of

RAM.

Description:

The AT89S52 is a low-voltage, high-performance CMOS 8-bit microcomputer with 4K

bytes of Flash programmable memory. The device is manufactured using Atmel’s high-density

nonvolatile memory technology and is compatible with the industry-standard MCS-51

Page 54: wkc7 doc

instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel

AT89S52 is a powerful microcomputer, which provides a highly flexible and cost-effective

solution to many embedded control applications.

In addition, the AT89S52 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 hardware reset.

Machine cycle for the 8052

The CPU takes a certain number of clock cycles to execute an instruction. In the 8052 family,

these clock cycles are referred to as machine cycles. The length of the machine cycle depends on

the frequency of the crystal oscillator. The crystal oscillator, along with on-chip circuitry,

provides the clock source for the 8052 CPU.

The frequency can vary from 4 MHz to 30 MHz, depending upon the chip rating and

manufacturer. But the exact frequency of 11.0592 MHz crystal oscillator is used to make the

8052 based system compatible with the serial port of the IBM PC.

In the original version of 8052, one machine cycle lasts 12 oscillator periods. Therefore, to

calculate the machine cycle for the 8052, the calculation is made as 1/12 of the crystal frequency

and its inverse is taken.

Page 55: wkc7 doc

Radar Communication

Page 56: wkc7 doc

Radar Working:

Antenna Propagation

Page 57: wkc7 doc
Page 58: wkc7 doc

TRANSMITTER:

The IR LED emitting infrared light is put on in the transmitting unit. To generate IR signal, 555

IC based astable multivibrator is used. Infrared LED is driven through transistor BC 548.

IC 555 is used to construct an astable multivibrator which has two quasi-stable states. It generates

a square wave of frequency 38 kHz and amplitude 5Volts. It is required to switch ‘ON’ the IR LED. The

IR transmitter circuit is as shown below:

TargetCross

Section

Page 59: wkc7 doc

555 TIMER:

The 555 is an integrated circuit (chip) implementing a variety of timer and multivibrator

applications. It was designed in 1970 and introduced in 1971 by Signetics (later acquired by

Philips). The original name was the SE555/NE555 and was called "The IC Time Machine". It

is still in wide use, thanks to its ease of use, low price and good stability. As of 2003, 1 billion

units are manufactured every year.

The 555 timer is one of the most popular and versatile integrated circuits ever produced.

It includes 23 transistors, 2 diodes and 16 resistors on a silicon chip installed in an 8-pin mini

dual-in-line package (DIP-8). The 556 is a 14-pin DIP that combines two 555s on a single chip.

Page 60: wkc7 doc

Fig: 555 timer

Pin Functions - 8 pin package

Ground (Pin 1)

  This pin is connected directly to ground.

Trigger (Pin 2)

   This pin is the input to the lower comparator and is used to set the latch, which in turn causes the output

to go high.

Output (Pin 3)

  Output high is about 1.7V less than supply. Output high is capable of sourcing up to 200mA while

output low is capable of sinking up to 200mA.

Page 61: wkc7 doc

Reset (Pin 4)

This is used to reset the latch and return the output to a low state. The reset is an overriding function.

When not used connect to V+.

Control (Pin 5)

Allows access to the 2/3V+ voltage divider point when the 555 timer is used in voltage control mode.

When not used connect to ground through a 0.01 uF capacitor.

Threshold (Pin 6)

 This is an input to the upper comparator.

Discharge (Pin 7)

This is the open collector to Q14.

V+ (Pin 8)

 This connects to Vcc and the Philips data book states the ICM7555 CMOS version operates 3V - 16V

DC while the NE555 version is 3V - 16V DC.

The 555 has three operating modes:

Monostable mode: in this mode, the 555 functions as a "one-shot". Applications include timers,

missing pulse detection, bounce free switches, touch switches, Frequency Divider, Capacitance

Measurement, Pulse Width Modulation (PWM) etc

Astable mode: Free Running mode: the 555 can operate as an oscillator. Uses include LED and

lamp flashers, pulse generation, logic clocks, tone generation, security alarms, pulse position

modulation, etc.

Page 62: wkc7 doc

Bistable mode: The 555 can operate as a flip-flop, if the DIS pin is not connected and no

capacitor is used. Uses include bounce free latched switches, etc.

How to generate frequency with astable multi based on 555 timer?

This circuit diagram shows how a 555 timer IC is configured to function as an astable

multivibrator.  An astable multivibrator is a timing circuit whose 'low' and 'high' states are

both unstable.  As such, the output of an astable multivibrator toggles between 'low' and 'high'

continuously, in effect generating a train of pulses. This circuit is therefore also known as a

'pulse generator' circuit.

   

In this circuit, capacitor C1 charges through R1 and R2, eventually building up

enough voltage to trigger an internal comparator to toggle the output flip-flop.  Once toggled,

the flip-flop discharges C1 through R2 into pin 7, which is the discharge pin.  When C1's

voltage becomes low enough, another internal comparator is triggered to toggle the output

flip-flop. This once again allows C1 to charge up through R1 and R2 and the cycle starts all

over again.

     

C1's charge-up time t1 is given by: t1 = 0.693(R1+R2) C1. C1's discharge time t2 is

given by: t2 = 0.693(R2) C1.  Thus, the total period of one cycle is t1+t2 = 0.693 C1

(R1+2R2).  The frequency f of the output wave is the reciprocal of this period, and is

therefore given by:

f = 1.44/ (C1 (R1+2R2))

where f is in Hz if R1 and R2 are in megaohms and C1 is in microfarads.  

Page 63: wkc7 doc

       

RECEIVER

Description

The TSOP17 – Series are miniaturized receivers for infrared remote control systems. PIN

diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter.

The demodulated output signal can directly be decoded by a microprocessor. TSOP17.. is

the standard IR remote control receiver series, supporting all major transmission codes.

Features

Photo detector and preamplifier in one package

Internal filter for PCM frequency

Page 64: wkc7 doc

Improved shielding against electrical field disturbance

TTL and CMOS compatibility

Output active low

Low power consumption

High immunity against ambient light

Continuous data transmission possible (up to 2400 bps)

Suitable burst length .10 cycles/burst

Page 65: wkc7 doc

Suitable Data Format

The circuit of the TSOP17 is designed in that way that unexpected output pulses due to

noise or disturbance signals are avoided. A bandpass filter, an integrator stage and an automatic

gain control are used to suppress such disturbances. The distinguishing mark between data signal

and disturbance signal are carrier frequency, burst length and duty cycle. The data signal should

fulfil the following condition:

• Carrier frequency should be close to center frequency of the bandpass (e.g. 38 KHz).

• Burst length should be 10 cycles/burst or longer.

• After each burst which is between 10 cycles and 70 cycles a gap time of at least 14 cycles is

necessary.

• For each burst which is longer than 1.8ms a corresponding gap time is necessary at some time

in the data stream. This gap time should have at least same length as the burst.

• Up to 1400 short bursts per second can be received continuously.

Some examples for suitable data format are: NEC Code, Toshiba Micom Format, Sharp

Code, RC5 Code, RC6 Code, R–2000 Code and Sony Format (SIRCS). When a disturbance

signal is applied to the TSOP17.. It can still receive the data signal. However the sensitivity is

reduced to that level that no unexpected pulses will occur. Some examples for such disturbance

signals which are suppressed by the TSOP17 are:

• DC light (e.g. from tungsten bulb or sunlight)

• Continuous signal at 38 kHz or at any other frequency

• Signals from fluorescent lamps with electronic ballast (an example of the signal modulation is

in the figure below).

Page 66: wkc7 doc
Page 67: wkc7 doc
Page 68: wkc7 doc

SOFTWARE TOOLS

Page 69: wkc7 doc

KEIL SOFTWARE:

Keil compiler is a software used where the machine language code is

written and compiled. After compilation, the machine source code is

converted into hex code which is to be dumped into the microcontroller for

further processing. Keil compiler also supports C language code.

STEPS TO WRITE AN ASSEMBLY / C LANGUAGE PROGRAM IN KEIL

AND HOW TO COMPILE IT:

1. Install the Keil Software in the PC in any of the drives.

2. After installation, an icon will be created with the name “Keil uVision3”.

Just drag this icon onto the desktop so that it becomes easy whenever

you try to write programs in keil.

3. Double click on this icon to start the keil compiler.

4. A page opens with different options in it showing the project workspace

at the leftmost corner side, output window in the bottom and an ash

coloured space for the program to be written.

5. Now to start using the keil, click on the option “project”.

6. A small window opens showing the options like new project, import

project, open project etc. Click on “New project”.

7. A small window with the title bar “Create new project” opens. The

window asks the user to give the project name with which it should be

created and the destination location. The project can be created in any

of the drives available. You can create a new folder and then a new file

or can create directly a new file.

8. After the file is saved in the given destination location, a window opens

where a list of vendors will be displayed and you have to select the

device for the target you have created.

Page 70: wkc7 doc

9. The most widely used vendor is Atmel. So click on Atmel and now the

family of microcontrollers manufactured by Atmel opens. You can

select any one of the microcontrollers according to the requirement.

10. When you click on any one of the microcontrollers, the features

of that particular microcontroller will be displayed on the right side of

the page. The most appropriate microcontroller with which most of the

projects can be implemented is the AT89S52. Click on this

microcontroller and have a look at its features. Now click on “OK” to

select this microcontroller.

11. A small window opens asking whether to copy the startup code

into the file you have created just now. Just click on “No” to proceed

further.

12. Now you can see the TARGET and SOURCE GROUP created in the

project workspace.

13. Now click on “File” and in that “New”. A new page opens and you

can start writing program in it.

14. After the program is completed, save it with any name but with

the .asm or .c extension. Save the program in the file you have created

earlier.

15. You can notice that after you save the program, the predefined

keywords will be highlighted in bold letters.

16. Now add this file to the target by giving a right click on the

source group. A list of options open and in that select “Add files to the

source group”. Check for this file where you have saved and add it.

17. Right click on the target and select the first option “Options for

target”. A window opens with different options like device, target,

output etc. First click on “target”.

18. Since the set frequency of the microcontroller is 11.0592 MHz to

interface with the PC, just enter this frequency value in the Xtal (MHz)

text area and put a tick on the Use on-chip ROM. This is because the

program what we write here in the keil will later be dumped into the

Page 71: wkc7 doc

microcontroller and will be stored in the inbuilt ROM in the

microcontroller.

19. Now click the option “Output” and give any name to the hex file

to be created in the “Name of executable” text area and put a tick to

the “Create HEX file” option present in the same window. The hex file

can be created in any of the drives. You can change the folder by

clicking on “Select folder for Objects”.

20. Now to check whether the program you have written is errorless

or not, click on the icon exactly below the “Open file” icon which is

nothing but Build Target icon. You can even use the shortcut key F7 to

compile the program written.

21. To check for the output, there are several windows like serial

window, memory window, project window etc. Depending on the

program you have written, select the appropriate window to see the

output by entering into debug mode.

22. The icon with the letter “d” indicates the debug mode.

23. Click on this icon and now click on the option “View” and select

the appropriate window to check for the output.

24. After this is done, click the icon “debug” again to come out of the

debug mode.

25. The hex file created as shown earlier will be dumped into the

microcontroller with the help of another software called Proload.

Page 72: wkc7 doc

Working With Keil

Page 73: wkc7 doc

Working WITH KEIL SOFTWARE

1. Click on the Keil u Vision Icon on Desktop

2. The following fig will appear

Page 74: wkc7 doc

3. Click on the Project menu from the title bar

4. Then Click on New Project

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

Page 75: wkc7 doc

6. Then Click on Save button above.

7. Select the component for u r project. i.e. Atmel……

8. Click on the + Symbol beside of Atmel

Page 76: wkc7 doc

9. Select AT89C51 as shown below

Page 77: wkc7 doc

10. Then Click on “OK”

11. The Following fig will appear

Page 78: wkc7 doc

12. Then Click either YES or NO………mostly “NO”

13. Now your project is ready to USE

14. Now double click on the Target1, you would get another option “Source group 1” as

shown in next page.

Page 79: wkc7 doc

15. Click on the file option from menu bar and select “new”

Page 80: wkc7 doc

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

its blue boarder.

Page 81: wkc7 doc

17. Now start writing program in either in “C” or “ASM”

18. For a program written in Assembly, then save it with extension “. asm” and for “C”

based program save it with extension “ .C”

Page 82: wkc7 doc

19. Now right click on Source group 1 and click on “Add files to Group Source”

Page 83: wkc7 doc

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

20. Now select as per your file extension given while saving the file

Page 84: wkc7 doc

21. Click only one time on option “ADD”

22. Now Press function key F7 to compile. Any error will appear if so happen.

23. If the file contains no error, then press Control+F5 simultaneously.

24. The new window is as follows

Page 85: wkc7 doc

25. Then Click “OK”

26. Now Click on the Peripherals from menu bar, and check your required port as shown in

fig below

Page 86: wkc7 doc

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

Page 87: wkc7 doc

28. Now keep Pressing function key “F11” slowly and observe.

29. You are running your program successfully

Page 88: wkc7 doc

PROLOAD:

Proload is a software which accepts only hex files. Once the machine

code is converted into hex code, that hex code has to be dumped into the

microcontroller placed in the programmer kit and this is done by the Proload.

Programmer kit contains a microcontroller on it other than the one which is

to be programmed. This microcontroller has a program in it written in such a

way that it accepts the hex file from the keil compiler and dumps this hex file

into the microcontroller which is to be programmed. As this programmer kit

requires power supply to be operated, this power supply is given from the

power supply circuit designed above. It should be noted that this

programmer kit contains a power supply section in the board itself but in

order to switch on that power supply, a source is required. Thus this is

accomplished from the power supply board with an output of 12volts or from

an adapter connected to 230 V AC.

1. Install the Proload Software in the PC.

2. Now connect the Programmer kit to the PC (CPU) through serial cable.

3. Power up the programmer kit from the ac supply through adapter.

4. Now place the microcontroller in the GIF socket provided in the

programmer kit.

5. Click on the Proload icon in the PC. A window appears providing the

information like Hardware model, com port, device type, Flash size etc.

Click on browse option to select the hex file to be dumped into the

microcontroller and then click on “Auto program” to program the

microcontroller with that particular hex file.

6. The status of the microcontroller can be seen in the small status

window in the bottom of the page.After this process is completed,

remove the microcontroller from the programmer kit and place it in

your system board. Now the system board behaves according to the

program written in the microcontroller.

Page 89: wkc7 doc
Page 90: wkc7 doc

SOURCE CODESOURCE CODE

Page 91: wkc7 doc

ADVANTAGES AND APPLICATIONS

Page 92: wkc7 doc

Advantages:

1) Very flexible - can be used in a number of ways

Stationary mode

Moving mode

Two Directional mode

2) Beam spread can incorporate many targets

3)Can often select fastest target, or best reflection

4)Still very reliable

5)High Penetration capability.

6)No need of medium .

7)Long Range

Applications:

• Mapping radar scans a large regions for remote sensing and geography applications

• Wearable radar which is used to help the visually impaired

• Air traffic control uses radar to reflect echoes off of aircraft

• Weather radar uses radar to reflect echoes off of clouds

• Weather radars use radio waves with horizontal, dual (horizontal and vertical), or circular

polarization

• Some weather radars use the Doppler effect to measure wind speeds

• Missile Tracking System

Page 93: wkc7 doc

CCONCLUSIONONCLUSION

Page 94: wkc7 doc

CONCLUSION:

Radar target system is provided with selectively direct the modulated IR radiation. Radar

target identifier is selected with areas to add target angular simulations and target space position

and scintillations to the other simulations contained in the radar signal. This project presents

Radar modal target Direction identifier with remote station alert system is been designed and

implemented with Atmel 89S52 MCU in embedded system domain. Experimental work has been

carried out carefully. The result shows that higher efficiency is indeed achieved using the

embedded system according to requirement of the user.

Page 95: wkc7 doc
Page 96: wkc7 doc

REFERENCESREFERENCES

REFERENCES:

1. WWW. howstuffworks.com

Page 97: wkc7 doc

2. EMBEDDED SYSTEM BY RAJ KAMAL

3. 8052 MICROCONTROLLER AND EMBEDDED SYSTEMS BY MAZZIDI

4. Magazines

5. Electronics for you

6. Electrikindia

7. WWW.google.com

8. WWW.Electronic projects.com