Documente Academic
Documente Profesional
Documente Cultură
USING 8051
SUBMITTED BY:
CERTIFICATE
To whom it May concern
Certificate is awaited
CERTIFIED BY:
2
Mr. Amit Chandra Mr.Sachin Kr. Kanodia
(Project Guide) (Center Head)
A CKNOWLEDGEMENT
3
-RICHA SINGH
-NIKITA VERMA
PREFACE
"Any sufficiently advanced technology is indistinguishable from
magic,"wrote ARTHUR C. CLARKE. Today, we can drive in a voice
activated car, get our clothes washed and dried in a washing machine
with in minutes, and read the temperature and air pressure from our wrist
watch .A musical greeting card has more computing power than NASA'S
lunar Lander had in 1969. Thousand of people have embedded
processors beneath their skin, as pacemaker or hearing aids.
4
developer or software engineer for writing a code that is not robust. It's
imperative for embedded application to be much more reliable than their
desktop counterparts.
INDEX
7. Circuit Diagram 26
5
8. Program Code 28
10. Bibliography 65
S EMICONDUCTOR T ECHNOLOGIES -
VEDANT
AN ISO 9001:2000 C ERTIFIED I NSTITUTION
Semiconductor Technologies has always been in sync with the future. It
has understood and appreciated the needs of India, its people and its ever-
growing industry. Over the last six 20 years tell the saga of VEDANT
contribution in leading the national effort in the vital areas of
microelectronics.
6
Design & Embedded System Design through ‘state-of-the-art’ lab facilities,
equipped with the Industry Standard tools. VLSI Design / Embedded
Systems Design Engineer design such Silicon chips…making a career in
VLSI Design / ESD is highly respected & rewarding one. Furthermore we
would like to bring in your notice that VEDANT is a member of “Indian
Semiconductor Association” as well. Semiconductor Technologies-
VEDANT (Now an ISO 9001: 2000 Certified Institution) is center for the
training crafted in VLSI/ESD education module followed with VLSI Design
software along with the FPGA programming & 8051 Microcontroller kit.
Vedant
VEDANT (VLSI design and training) is one of the prestigious projects
of SCL, a pioneer with vertically integrated facility in the country.
7
FPGA Kit
8051 Development Kit
Keil Software
Flash Magic (Rom burning)
The real Time Systems can be further divided into two types:
Soft Real-Time System
8
Compute output response as fast as possible, but no specific
deadlines that must be met.
Hard Real-Time System
Output response must be computed by specified deadline or system
fails.
9
Logical/Dig Computer
Programmin
ital Systems
g
Design Organization
Embedded
Embed Systems
ded
& DSP
Real
Advance
Time
d Control
System VLSI/ASI
Digital System
s C
Design s
&
(Synthesi
SoC
s)
Design
10
Programming Languages Used in New Embedded
Designs
90.0%
80.0%
70.0%
1998-1999
60.0%
1999-2000
50.0%
40.0%
30.0%
20.0%
10.0%
0.0%
Assembly C C++ Java Other
11
Micro Controllers Trend in the Embedded Systems
100.0%
80.0%
60.0%
40.0%
20.0%
0.0%
4-bit 8-bit 16-bit 32-bit 64-bit Special
12
Application of embedded systems in
sphere of life
Consumer electronics
Telecommunication
Automobile
Medical instrumentation
Defense
Communication satellite
Data communication
Internet appliances
13
Introduction to microcontroller
A microcontroller is a computer-on-a-chip, or, if you prefer, a single-
chip computer. Micro suggests that the device is small, and controller
tells you that the device might be used to control objects, processes, or
events. Another term to describe a microcontroller is embedded
controller, because the microcontroller and its support circuits are often
built into, or embedded in, the devices they control.
You can find microcontrollers in all kinds of things these days. Any
device that measures, stores, controls, calculates, or displays information
is a candidate for putting a microcontroller inside. The largest single use
for microcontrollers is in automobiles—just about every car
manufactured today includes at least one microcontroller for engine
control, and often more to control additional systems in the car. In
desktop computers, you can find microcontrollers inside keyboards,
modems, printers, and other peripherals. In test equipment,
microcontrollers make it easy to add features such as the ability to store
measurements, to create and store user routines, and to display messages
and waveforms. Consumer products that use microcontrollers include
cameras, video recorders, compact-disk players, and ovens. And these
are just a few examples.
Microcontroller Basics
14
A microcontroller is similar to the microprocessor inside a personal
computer. Examples of microprocessors include Intel’s 8086, Motorola’s
68000, and Zilog’s Z80. Both microprocessors and microcontrollers
contain a central processing unit, or CPU. The CPU executes
instructions that perform the basic logic, math, and data-moving
functions of a computer. To make a complete computer, a
microprocessor requires memory for storing data and programs, and
input/output (I/O) interfaces for connecting external devices like
keyboards and displays. In contrast, a microcontroller is a single-chip
computer because it contains memory and I/O interfaces in addition to
the CPU. Because the amount of memory and interfaces that can fit on a
single chip is limited, microcontrollers tend to be used in smaller
systems that require little more than the microcontroller and a few
support components. Examples of popular microcontrollers are Intel’s
8052 (including the 8052-BASIC, which is the focus of this book),
Motorola’s 68HC11, and Zilog’s Z8.
Microcontroller History
15
personal computer from scratch, since mass production has drastically
lowered the price of assembled systems. At most, building a personal
computer now involves only installing assembled boards and other major
components in an enclosure. A personal computer like Apple’s
Macintosh or IBM’s PC is a general-purpose machine, since you can use
it for many applications—word processing, spreadsheets, computer-
aided design, and more—just by loading the appropriate software from
disk into memory. Interfaces to personal computers are for the most part
standard ones like those to video displays, keyboards, and printers.
But along with cheap, powerful, and versatile personal computers has
developed a new interest in small, customized computers for specific
uses. Each of these small computers is dedicated to one task, or a set of
closely related tasks. Adding computer power to a device can enable it to
do more, or do it faster, better, or more cheaply. For example,
automobile engine controllers have helped to reduce harmful exhaust
emissions. And microcontrollers inside computer modems have made it
easy to add features and abilities beyond the basic computer-to-phone-
line interface. In addition to their use in mass-produced products like
these, it’s also become feasible to design computer power into one-of-a-
kind projects, such as an environmental controller for a scientific study
or an intelligent test fixture that ensures that a product meets its
specifications before it’s shipped to a customer. At the core of many of
these specialized computers is a microcontroller. The computer’s
program is typically stored permanently in semiconductor memory such
as ROM or EPROM. The interfaces between the microcontroller and the
outside world vary with the application, and may include a small display,
a keypad or switches, sensors, relays, motors, and so on.
These small, special-purpose computers are sometimes called single-
board computers, or SBCs. The term can be misleading, however, since
the computer doesn’t have to be on a single circuit board, and many
types of computer systems, such as laptop and notebook computers, are
now manufactured on a single board.
16
Block diagram of the 80C51
Microcontroller
17
Pin Diagram of the 40 Pin DIP package of the 80C51
18
8051 architecture contains the following:
19
8 bit CPU with registers A and B
20
INTRODUCTION TO THE KEIL SOFTWARE
The Keil Software 8051 development tools are listed below. These are
the programs that will perform the following:
Compile C Code
Assemble the assembly source files.
Link & Locate the object modules & the libraries.
Create the HEX files.
Debug the Target Program.
The LIB51 library manager combines object modules into libraries that
may be used by the linker.
The OH51 Object HEX converter creates Intel Hex files fro0m the
absolute object module.
21
The RTX51 real time operating system simpifies the design of the
complex, time critical software projects.
INTRODUCTION TO THE
PROJECT
This project is designed to demonstrate the technology used in the now a
days automatic traffic controller at the noisy junctions which is used in
almost all of the countries like India, Germany, France, and Japan etc.
These Traffic systems are equipped with the CPU, which controls the
Lights. The Traffic lights are programmed for the specific time delay.
Time delay between different lights is defined which can be changed by
means of software only i.e. this particular hardware will work exactly the
same at different place with different time period.
In this project
In this project we try to give the same prototype for this type of systems.
We are using microcontroller 89c51 as CPU and for displaying message
for the System we are using intelligent LCD display of two lines and
Twelve LEDs. The traffic light system is designed for Four Directions ,
named as East, West, South & North. There is a LCD display for
showing messages like Stop, Ready and Go for each direction. Status of
the messages are depends on the indicators, which are used to show the
Status of direction i.e. STOP , READY & GO if Red, Green, Yellow
LED at corresponding station is high. Before stopping of the traffic at
particular direction the ready signal for the next direction will be high .
22
It may also includes an emergency brake system due to which one can
start the traffic for one direction and stop for other direction if there is
any emergency i.e. may be for An AMULENCE , for any Police activity
or for Any V.I.P. Fleet. As soon as the brakes are applied and resumes
journey when the emergency situation is over.
So this project gives an illustration of actual modern Traffic control
System through embedded electronics control system.
23
6. ADC/DAC interface
8. Switch array
LCD Operation:
Our project chose LCD over Seven Segment Displays due to
the following reasons:
24
1)Ease of program of charcters.
2)Ascii Values could be directly sent to the LCD.
3)In built command words to control Display.
25
VCC , VSS , VEE
RS ( Register Select )
E ( Enable)
26
the LCD to latch in the data present in the data pins. This pulse
must be a minimum of 450 ns wide.
D0 – D7
27
80 Force cursor to beginning of 1st line
C0 Force cursor to beginning of 2nd line
38 2 Lines and 5x7 matrix
CIRCUIT DIAGRAM
28
Port 0 pins
connected to LCD
data lines
LEDs
8
0
displaying 5
message)
DISPLAY
1
LCD
(For
the
Project Code
29
BIBILOGRAPHY
Books:
• Title: The 8051 Microcontroller and Embedded System.
Author: Muhammad Ali Mazidi & Janice Gillispie
Mazidi.
Publication: Pearson Education.
Magazines:
Websites:
30
• SOFTWARE: www.keil.com
• Down loader: www.easacademy.com
• Reference: www.efymag.com
• Datasheets: www.datasheetarchive.com
31