Professional Documents
Culture Documents
Programmi
ng
Embed
ded
&
Real
Time
System
s
Logical/Dig
ital
Design
Computer
Systems
Organization
Embedded
Systems
DSP
Advance
d
Digital
Design
(Synthesi
s)
VLSI/ASI
C
&
SoC
Design
Control
System
s
1998-1999
1999-2000
70.0%
60.0%
50.0%
40.0%
30.0%
20.0%
10.0%
0.0%
Assembly
C++
Java
Other
100.0%
80.0%
60.0%
40.0%
20.0%
0.0%
4-bit
8-bit
16-bit
32-bit
64-bit Special
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
automobilesjust 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
A microcontroller is similar to the microprocessor inside a personal computer.
Examples of microprocessors include Intels 8086, Motorolas 68000, and Zilogs
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 Intels 8052 (including the
8052-BASIC, which is the focus of this book), Motorolas 68HC11, and Zilogs
Z8.
Microcontroller History
To understand how microcontrollers fit into the always-expanding world
of computers, we need to look back to the roots of microcomputing.
In its January 1975 issue, Popular Electronics magazine featured an
article describing the Altair 8800 computer, which was the first
microcomputer that hobbyists could build and program themselves. The
basic Altair included no keyboard, video display, disk drives, or other
elements we now think of as essential elements of a personal computer.
Its 8080 microprocessor was programmed by flipping toggle switches on
the front panel. Standard RAM was 256 bytes and a kit version cost
$397 ($498 assembled). A breakthrough in the Altairs usability occurred
when a small company called Microsoft offered a version of the BASIC
programming language for it. Of course, the computer world has
changed a lot since the introduction of the Altair. Microsoft has become
an enormous software publisher, and a typical personal computer now
includes a keyboard, video display, disk drives, and Megabytes of RAM.
Whats more, theres no longer any need to build a 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 Apples Macintosh or IBMs PC is a
general-purpose machine, since you can use it for many applications
word processing, spreadsheets, computer-aided design, and morejust
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-phoneline interface. In addition to their use in mass-produced products like
these, its also become feasible to design computer power into one-of-akind projects, such as an environmental controller for a scientific study
or an intelligent test fixture that ensures that a product meets its
specifications before its shipped to a customer. At the core of many of
these specialized computers is a microcontroller. The computers
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 singleboard computers, or SBCs. The term can be misleading, however, since
the computer doesnt 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.
Compile C Code
Assemble the assembly source files.
Link & Locate the object modules & the libraries.
Create the HEX files.
Debug the Target Program.
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 driver less metro train which is used in most of the developed
countries like Germany, France, and Japan etc. These trains are equipped
with the CPU, which controls the train. The train is programmed for the
specific path. Every station on the path is defined; stoppage timing of the
train and distance between the two stations is predefined.
In this project
In this project we try to give the same prototype for this type of trains.
We are using microcontroller 89c51 as CPU. The motion of the train is
controlled by the stepper motor, for displaying message in the train we
are using intelligent LCD display of two lines. The train is designed for
three stations, named as Bodhgaya, Rajgir, Nalanda .the stoppage time is
of 3 sec and time between two consecutive stations is 6sec.there is a
LCD display for showing various messages in the train for passengers.
There are indicators, which are used to show the train direction i.e. UP
path and DOWN path. Before stopping at station the train blows the
buzzer. It also includes an emergency brake system due to which the
train stops as soon as the brakes are applied and resumes journey when
the emergency situation is over.
System Specification
1. CPU: Phillips 879C61X2/ microchip PIC16F877/ Motorola 68HC11
2. 16 x 2 LCD Module (HY1602F4)
3. Six seven segment display
4. Stepper motor controller interface
5. 8 x 8 LED Matrix Display
6. ADC/DAC interface
7. Four data switches
8. Switch array
9. AT 24C16 Serial EEPROM
LCD Operation:
Our project chose LCD over Seven Segment Displays due to
the following reasons:
1)Ease of program of charcters.
2)Ascii Values could be directly sent to the LCD.
3)In built command words to control Display.
Symbol
V
V
I/O
---
--
RS
5
6
7
8
9
10
11
12
13
14
R/W
E
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
I
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
I/O
Description
Ground
+5V Power
supply
Power supply
for contrast
control
0 :Command
Reg.
1 : Data Reg.
0: Write1: Read
Enable
8-bit Data Bus
8-bit Data Bus
8-bit Data Bus
8-bit Data Bus
8-bit Data Bus
8-bit Data Bus
8-bit Data Bus
8-bit Data Bus
RS ( Register Select )
RS pin is used to select between the two different registers :
DATA register & the
COMMAND register .
RS=0 => Select the command register
RS=1 => Select the data register
R/W ( Read / Write )
R/W input allows the user to write information to the LCD or
read information from it.
R/W =1 => when reading
R/W =0 => when writing
E ( Enable)
The Enable pin is used by the LCD to latch information
presented to its data pins . When data is supplied to data pins ,
a HIGH to LOW pulse must be applied to this pin in order for
the LCD to latch in the data present in the data pins. This pulse
must be a minimum of 450 ns wide.
D0 D7
The 8 bit data pins ( d0 D7) are used to send information
to the LCD or read the content of the LCD internal Register.
To display letters and numbers , we send ASCII codes for
the letter A-Z , a-z & 0-9 to these pins while makin RS = 1.
There are also Instruction Command Codes that can be sent
to the LCD to clear the display or force the cursor to the home
position or blink the cursor.
CIRCUIT DIAGRAM
BIBILOGRAPHY
Books:
Title: The 8051 Microcontroller and Embedded System.
Author: Muhammad Ali Mazidi & Janice Gillispie
Mazidi.
Publication: Pearson Education.
Title: Embedded Systems: Architecture, Programming &
Design.
Author: Raj Kamal
Publication: Tata McGraw Hill
Title: Programming & Customizing the 8051 Microcontroller
Author: Myke Predko
Publication: Tata McGraw Hill
Title: The 8051 Microcontroller
Author: J. H. Ayala
Publication: Eastern Economy Edition
Magazines:
ELECTRONICS FOR YOU, APRIL 2005.
Websites:
SOFTWARE: www.keil.com
Down loader: www.easacademy.com
Reference: www.efymag.com
Datasheets: www.datasheetarchive.com