SlideShare une entreprise Scribd logo
1  sur  78
By: Ritesh Maheshwari
3rd
Yr student of Electronics Instr. & Control Engg.
Spring 2007
“In the name of God”
GIT Student Of EIC Branch Presents:
Seminar On
Embedded Systems
What is an Embedded System?
Where are Embedded Systems used?
Typical Embedded Systems Hardware
Embedded OS and Software
Why study Embedded System?
Microprocessors
Microcontrollers
The 8051 Microcontroller
A simple project using AT89C51
References
Block Diagram of an Embedded System
 A specialized computer system that is part of a larger system or machine.
 Typically, an embedded system is housed on a single microprocessor board
with the programs stored in ROM.
 Virtually all appliances that have a digital interface -- watches, microwaves,
VCRs, cars -- utilize embedded systems.
 Some embedded systems include an operating system, but many are so
specialized that the entire logic can be implemented as a single program.
It is specially designed to perform a few tasks in the most
efficient way.
Interacts with physical elements in our environment viz.,
controlling & driving a motor, sensing temperature etc. i.e.
“ An embedded system can
be defined as those control systems which are
designed either by microprocessor or microcontroller
for a specific tasks. ”
OR
“ An embedded system is
some combination of computer hardware & software,
either fixed in capability or programmable, that is
specifically designed for a particular kind of application
device. ”
Where are Embedded Systems used?
Signal processing systems
 Real-time video, DVD players, Medical equipment.
Distributed control
 Network routers, switches, firewalls, mass transit systems, Elevators
“Small” systems
 Mobile phones, pagers, home appliances, toys, smartcards, MP3 players,
PDAs, digital cameras, sensors, pc keyboard & mouse
Modern cars: Up to 100 or more processors
 Engine control unit
 ABS systems (Anti Lock Brake systems)
 Emissions control
 Diagnostics and Security systems
 Accessories (doors, windows etc)
EMBEDDED SYSTEM IN DAILY LIFE
Washing machine
cell phone
microWave oven
sensor based Washbasin
Traffic lighTdvd player
digiTal clock
moving message display
Typical Embedded Systems Hardware
Commercial off-the-shelf components (COTS)
 e.g. wireless radios, sensors, I/O devices
 Cheap
Application-Specific ICs (ASICs)
 ICs tailored to meet application needs
 Good performance for their intended task(s)
 Original ESs were ASICs only
Domain-specific processors
 DSPs
 Microcontrollers
Microprocessors
 General Purpose Processors
Embedded Operating Systems:
Office-style OSes
 PalmOS
 WindowsCE
RTOSes
 VxWorks
 QNX
Linux
 Linux is already ubiquitous
 Hundreds of different devices are using it
 http://www.linuxdevices.com/articles/AT4936596231.html
 Numerous commercial + open source products
Mobile OS
 Symbian
Others
 TinyOS
Why Study Embedded Systems?
• Embedded systems are playing important roles in our livesEmbedded systems are playing important roles in our lives
every day, even though they might not necessarily be visible.every day, even though they might not necessarily be visible.
• Some of the embedded systems we use every day control theSome of the embedded systems we use every day control the
menu system on television, the timer in a microwave oven, a cellmenu system on television, the timer in a microwave oven, a cell
phone, an MP3 player or any other device with some amount ofphone, an MP3 player or any other device with some amount of
intelligence built-in.intelligence built-in.
• In fact, recent poll data shows that embedded computerIn fact, recent poll data shows that embedded computer
systems currently outnumber humans in the USA.systems currently outnumber humans in the USA.
• Embedded systems is a rapidly growing industry where growthEmbedded systems is a rapidly growing industry where growth
opportunities are numerous.opportunities are numerous.
CPU
General-
Purpose
Micro-
processor
RAM ROM I/O
Port
Timer
Serial
COM
Port
Data Bus
Address Bus
General-Purpose Microprocessor System
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example--Intel’s x86: 8086,8088,80386,80486, Pentium
Motorola’s 680x0: 68000, 68010, 68020,68030,6040
Many chips on mother board
General-purpose microprocessor
Microprocessor
A microprocessor is a programmable digital electronic
component that incorporates the functions of a central
processing unit (CPU) on a single semiconducting integrated
circuit (IC).
The prime use of a microprocessor is to read data, perform
extensive calculations on that data, and store those
calculations in a mass storage device or display the results for
human use.
The programs used by the microprocessors are stored in the
mass storage device & loaded into RAM as the user directs.
RAM ROM
I/O
Port
Timer
Serial
COM
Port
Microcontroller
CPU
A smaller computer.
On-chip RAM, ROM, I/O ports...
Example:- Motorola’s 6811, Intel’s 8051 and PIC 16X
A single chip
Microcontroller
Microcontroller
An embedded microcontroller is a microcomputer that
contains most of its peripherals & required memory inside
a single integrated circuit along with the CPU.
They have a high concentration of on-chip facilities such
as serial ports, parallel input/output ports, timers,
counters, interrupt control, analog-to-digital converters,
random access memory, read only memory, etc.
The prime use of a microcontroller is to control the
operation of a machine using fixed program that is stored
in ROM & that does not change over the lifetime of the
system.
Microcontroller
 Uses:
1. Microcontrollers have become common in many areas, and
can be found in home appliances, computer equipment, and
instrumentation.
2. They are often used in automobiles, and have many industrial
uses as well, and have become a central part of industrial
robotics.
3. Because they are usually used to control a single process and
execute simple instructions, microcontrollers do not require
significant processing power.
 Uses conti…..
4. Microcontrollers are hidden inside a surprising
number of products these days.
5. If your microwave oven has an LED or LCD screen
and a keypad, it contains a microcontroller.
6. All modern automobiles contain at least one
microcontroller. The engine is controlled by a
microcontroller, as are the anti-lock brakes, the cruise
control and so on..
1. Meeting the computing needs of the task efficiently and cost
effectively
• speed, the amount of ROM and RAM, the number of I/O
ports and timers, size, packaging, power consumption
• easy to upgrade
• cost per unit
2. Availability of software development tools
• assemblers, debuggers, C compilers, emulator, simulator,
technical support
3. Wide availability and reliable sources of the microcontrollers.
Three criteria in Choosing a Microcontroller
The necessary tools for a
microprocessor/controller
CPU: Central Processing Unit
I/O: Input /Output
Bus: Address bus & Data bus
Memory: RAM & ROM
Timer
Interrupt
Serial Port
Parallel Port
Why do we need to learn
Microprocessors/controllers?
The microprocessor is the core of computer
systems.
Nowadays many communication, digital
entertainment, portable devices, are
controlled by them.
A designer should know what types of
components he needs, ways to reduce
production costs and product reliable.
Microprocessor
CPU is stand-alone, RAM,
ROM, I/O, timer are
separate
designer can decide on the
amount of ROM, RAM and
I/O ports.
expansive
versatility
general-purpose
Ex. 8085,8086 mp, Motorola
6800, Intel’s 8086, etc.
Microcontroller
• CPU, RAM, ROM, I/O and
timer are all on a single chip
• fix amount of on-chip ROM,
RAM, I/O ports
• for applications in which cost,
power and space are critical
• single-purpose
• Ex. 8051, PIC mc, Motorola
MC’s, Phillips, etc.
Microprocessor v/s Microcontroller
The 8051 Microcontroller:
The 8051 is the first microcontroller of the MCS-51 family
introduced by Intel Corporation at the end of the 1970’s.
The 8051 family characteristics:
4K Bytes ROM
128 Bytes RAM
two timer/counters (16 bit)
A serial port
4 general purpose parallel input/output port
Interrupt controller
The 8051 can address 64K of external data memory and
64K of External program memory.
Microcontroller 8051 internal Architecture
Pin Description of the 8051
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RXD)P3.0
(TXD)P3.1
(T0)P3.4
(T1)P3.5
XTAL2
XTAL1
GND
(INT0)P3.2
(INT1)P3.3
(RD)P3.7
(WR)P3.6
Vcc
P0.0(AD0
)P0.1(AD1)
P0.2(AD2
)P0.3(AD3)
P0.4(AD4)
P0.5(AD5)
P0.6(AD6)
P0.7(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7(A15)
P2.6(A14)
P2.5(A13)
P2.4(A12)
P2.3(A11)
P2.2(A10)
P2.1(A9)
P2.0(A8)
8051
IC
 8051 other family members:
1. 8751 (has EPROM)
2. 8951 (has EEPROM)
Vcc(+5volt)
Pin - 40
Ground(0 volt)
Pin-20
Pin
DescriPtion
Pin Description
Port 0 from
Pin-39 to pin-32
Used to excess
both
data & address
Dual functional
Microcontroller 8051
Pin Description
Port 1 from
Pin-1 to pin-8
Used as I/O port
Pin DescriPtion
Port 2 from
Pin-21 to pin-28
Used to excess
address & as I/O port
Microcontroller 8051
Pin DescriPtion
Port 3 from
Pin-10 to Pin-17
P3.0
RXDP3.1
TXDP3.2 IN T0
P3.3 IN T1
P3.4 T0
P3.5
T1P3.6 WR
P3.7 RD
Pin Description
reset
crystal
EA for
external memory
EA=0
Addressing Modes
Immediate addressing modes
Register addressing modes
Direct addressing modes
Register Indirect addressing modes
Indexed addressing modes
Timers/Counters
A timer is a counter that is increased with every time an
instruction is executed e.g. 8051 with 12MHz increases a
counter every 1.085 µs
General 8051 has 3 timer:
Two 16-bit timer
One 16-bit timer with extra-functionality (introduced with
the 8052)
The counters are divided into two 8-Bit registers called the
timer low (TL0, TL1) and high (TH0, TH1) bytes.
All counters action is controlled by bit states in the timer
mode control register (TMOD), the timer/counter control
register (TCON), and certain program instructions.
Timers/counters
Timer: measures time intervals
To generate timed output events
 e.g., hold traffic light green for 10 s
To measure input events
 e.g., measure a car’s speed
Based on counting clock pulses
 E.g., let Clk period be 10 ns
 And we count 20,000 Clk pulses
 Then 200 microseconds have passed
 16-bit counter would count up to 65,535*10
ns = 655.35 microsecond., resolution = 10 ns
 Top: indicates top count reached, wrap-
around
16-bit up
counter
Clk
Cnt
Basic timer
Top
Reset
16
Counters
Counter: like a timer, but
counts pulses on a general
input signal rather than clock
e.g., count cars passing over a
sensor
Can often configure device as
either a timer or counter
16-bit up
counter
Clk
16
Cnt_in
2x1
mux
Mode
Timer/counter
Top
Reset
Cnt
TMOD Register:
Gate : When set, timer only runs while INT(0,1) is high.
C/T : Counter/Timer select bit.
M1 : Mode bit 1.
M0 : Mode bit 0.
TF1: Timer 1 overflow flag.
TR1: Timer 1 run control bit.
TF0: Timer 0 overflag.
TR0: Timer 0 run control bit.
IE1: External interrupt 1 edge flag.
IT1: External interrupt 1 type flag.
IE0: External interrupt 0 edge flag.
IT0: External interrupt 0 type flag.
Crystal
11.0592
MHZ
/12
Timer
Freq.
TH0 TL0 TF0
TRO
1.085 µS
• In this the delay produced is calculated as:
DELAY= 1.085µSec X (NO. OF COUNTS)
Block Diagram
8051
S
E
N
S
O
R
————►‌‌————►‌‌
40
PIN
DIP
A
D
C
LCD
DISPLAY
D A C
————►‌‌————►‌‌
————►‌‌————►‌‌
————►‌‌————►‌‌
LEDS
4 SWITCHES
REAL TIME
CLOCK
4×4 MATRIX KEYBOARD
 We can Interfaced a number of modules
such as
» LED and 7-segment Display
» LCD
» Keyboard
» Real Time Clock (RTC)
» DAC
» ADC
» Sensors
» EEPROM
» RS-232
Light Emitting diode
It is single light display that include incandescent
and are treated as single binary points to be
switched off and on by program instructions
.
It has two pins, first is connected to port and
second one is grounded (vss).
It requires a high logic to glow from the port pin.
0RG 0000H
HERE: CLR
P1.0
SJMP HERE
END
Seven-segment displays commonly contain LED
segments which arranged as an 8 with a common
lead (cathode or anode) and 7 individual leads for
each segment.
Block Diagram shows a common cathode type of
segment
In common cathode to lit a segment a high input
logic is required.
In common anode to lit a segment a low input logic
is required.
Interfacing of 7-segment with 8051
^^^^^^
^^^^^^
^^^^^^
^^^^^^
^^^^^^
^^^^^^
^^^^^^
^^^^^^
^^^^^^
P0.0
P0.2
P0.1
P0.3
P0.4
P0.5
P0.6
P0.7
8051
^^^^^^
Vcc Vcc
LCD
It is an Intelligent Alphanumeric display which can
be used to display numbers, characters, and graphics.
It has 14 pins as shown in pin diagram.
Display contains 2 internal byte wide registers, one
for command (RS=0) and one for display (RS=1).
There are certain commands to be send to the Lcd
for making some setting such as clear screen, force
the cursor to home position and blink the cursor.
R/W pin is set to 1 for reading and to 0 for writing.
EN pin is set to 1 for enabling display.
DB0-DB7 are pins for 8-bit data bus.
Interfacing LCD with 8051
8051
^^^^^^
4×16 Character LCD Display
E RS R/W VeeGnd Vcc
+5v
10k
D0
D7
P1.0
P1.7
P2.0
P2.1
P2.2
Interrupts
Definition of ‘Interrupt’
“Event that disrupts the normal execution of a
program and causes the execution of special
instructions”
Interrupts
Program
time t
Interrupts
Interrupt
Program
time t
Interrupts
Program
Interrupt Service Routine
Interrupt
Program
time t
Interrupt Handling
Code that deals with
interrupts: Interrupt
Handler or Interrupt
Service Routines (ISRs)
Address space in
code space
Interrupt OverheadsInterrupt arrives
Complete current instruction
Save essential register information
Vector to ISR
Save additional register information
Execute body of ISR
Restore other register information
Return from interrupt and restore essential
registers
Resume task
Interrupt
Latency
Interrupt
Termination
Interrupts
Internal or External
Handling can be
enabled/disabled
Prioritized
General 8051:
3x timer interrupts,
2x external interrupts
1x serial port interrupt
External Interrupts
Pins for
external interrupts
Interrupt FlagsBits that are set if
the interrupt occurs
Summary: InterruptsDefinition of ‘Interrupt’:
Event that disrupts the normal execution
of a program and causes the execution of
special instructions
Handling can be enabled/disabled
Prioritized
Internal or External
External Interrupts:
Level-triggered
Edge-triggered
8051: 3 timer interrupts, 2 external
interrupts & a serial port interrupt
threshold
Level-triggered
Edge-triggered
trigger point
trigger point
t
t
• In this project we try to give the same prototype for this type of trains.
•The train is designed for three stations, named as Jaipur railway station,
Sitapura & GIT College.
• The stoppage time is of 3 sec & time between two consecutive stations is 6
sec.
• There are indicators, which are used to show the train direction i.e. UP path &
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.
• The coding of the metro train prototype is given in the assembly language.
Why we choose this project ?
Our approach is to gain knowledge of Interfacing different
devices with Microcontroller for useful applications and to
fulfill the Hardware Module requirement of college
authorities.
This is such a project which can be used to perform any
kind of application depend on the modules which are
interfaced.
These leads us to Microcontroller Based Embedded
System.
Applications
By interfacing STEPPER MOTOR with Microcontroller, we
can make the trainer kit which controls the motion of
train.
We can also generate various types of waves such as
square, triangular and saw tooth in accordance with the
programme fed in 8051, 89c51, etc. chip.
Initially we interfaced LED, 7-segment and Keyboard and
check programme which is the purpose of trainer Kit.
In these way we go step by step for each module interface
and accomplish the goal of making a well-functioning
Trainer Kit.
Finally we will add some features by interfacing Sensors
Smart card
ATM
Health card
Robotics
Touch sensitive stairs
Automatic gates
Accelerator
Conclusion
Future aspect of embedded
technologies
Experience during training
Importance of this training
program
References
www.wikipedia.com
www.webcomtechnologiesusa.com
www.worldbook.com
www.usahem.com
www.quasarelectronics.com
www.electronicsforu.com
www.nationalsemiconductor.com
www.embeddedforu.com
www.google.com
At the End …
Thanks for your Attention ……. ;)
Ritesh Maheshwari
Amardeep Pandey
Pankaj Chaudhary
Akhilesh Pandey
Monsoon 2007

Contenu connexe

Tendances

Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtechsangeetha rakhi
 
Embedded systems ppt
Embedded systems pptEmbedded systems ppt
Embedded systems pptShreya Thakur
 
Embedded system.pptx
Embedded system.pptxEmbedded system.pptx
Embedded system.pptxSaransh Garg
 
Introduction to Advanced embedded systems course
Introduction to Advanced embedded systems courseIntroduction to Advanced embedded systems course
Introduction to Advanced embedded systems courseanishgoel
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduinoSantosh Verma
 
Embedded Systems (18EC62) – Embedded System Components (Module 3)
Embedded Systems (18EC62) – Embedded System Components (Module 3)Embedded Systems (18EC62) – Embedded System Components (Module 3)
Embedded Systems (18EC62) – Embedded System Components (Module 3)Shrishail Bhat
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systemshariiyuvii
 
Project report on embedded system using 8051 microcontroller
Project  report on embedded system using 8051 microcontrollerProject  report on embedded system using 8051 microcontroller
Project report on embedded system using 8051 microcontrollerVandna Sambyal
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systemsjattatt
 
1 introducing embedded systems and the microcontrollers
1 introducing embedded systems and the microcontrollers1 introducing embedded systems and the microcontrollers
1 introducing embedded systems and the microcontrollersBidhu Deka
 

Tendances (20)

Embedded system
Embedded systemEmbedded system
Embedded system
 
Embedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - MtechEmbedded systems - UNIT-1 - Mtech
Embedded systems - UNIT-1 - Mtech
 
Embedded systems ppt
Embedded systems pptEmbedded systems ppt
Embedded systems ppt
 
Embedded system.pptx
Embedded system.pptxEmbedded system.pptx
Embedded system.pptx
 
Introduction to Advanced embedded systems course
Introduction to Advanced embedded systems courseIntroduction to Advanced embedded systems course
Introduction to Advanced embedded systems course
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
Embedded Systems (18EC62) – Embedded System Components (Module 3)
Embedded Systems (18EC62) – Embedded System Components (Module 3)Embedded Systems (18EC62) – Embedded System Components (Module 3)
Embedded Systems (18EC62) – Embedded System Components (Module 3)
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Project report on embedded system using 8051 microcontroller
Project  report on embedded system using 8051 microcontrollerProject  report on embedded system using 8051 microcontroller
Project report on embedded system using 8051 microcontroller
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
819 data sheet
819 data sheet819 data sheet
819 data sheet
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Ppt on embedded systems
Ppt on embedded systemsPpt on embedded systems
Ppt on embedded systems
 
1 introducing embedded systems and the microcontrollers
1 introducing embedded systems and the microcontrollers1 introducing embedded systems and the microcontrollers
1 introducing embedded systems and the microcontrollers
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
Embedded Systems
Embedded Systems Embedded Systems
Embedded Systems
 

Similaire à ritesh (3)

Solution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsSolution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsmanishpatel_79
 
BRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptxBRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptxSKTAHMEDSALIMRAFID
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes Dr.YNM
 
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdfIntroduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdfaienterpresses
 
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdfIntroduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdfaienterpresses
 
18CS44-MES-Module3-ppt.pdf
18CS44-MES-Module3-ppt.pdf18CS44-MES-Module3-ppt.pdf
18CS44-MES-Module3-ppt.pdfMohd Saifudeen
 
Introduction to microcontroller
Introduction to microcontrollerIntroduction to microcontroller
Introduction to microcontrollerRajib Roy
 
microprocessor
microprocessormicroprocessor
microprocessorillpa
 
Difference Between Microprocessors and Microcontrollers
Difference Between Microprocessors and MicrocontrollersDifference Between Microprocessors and Microcontrollers
Difference Between Microprocessors and Microcontrollerselprocus
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsmanishpatel_79
 
embededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptembededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptkimavathmukeshnaik
 
Trainingreport on embedded system
Trainingreport on embedded systemTrainingreport on embedded system
Trainingreport on embedded systemMukul Mohal
 
What is a microcontroller
What is a microcontrollerWhat is a microcontroller
What is a microcontrollerparassini
 

Similaire à ritesh (3) (20)

Embedded system
Embedded systemEmbedded system
Embedded system
 
Embeddedsystem
EmbeddedsystemEmbeddedsystem
Embeddedsystem
 
Embedded
EmbeddedEmbedded
Embedded
 
Embedded
EmbeddedEmbedded
Embedded
 
Tutorial Embedded System
Tutorial Embedded System Tutorial Embedded System
Tutorial Embedded System
 
Solution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systemsSolution manual the 8051 microcontroller based embedded systems
Solution manual the 8051 microcontroller based embedded systems
 
BRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptxBRACU_SPRING24_EEE373_L1_Introduction.pptx
BRACU_SPRING24_EEE373_L1_Introduction.pptx
 
Embedded systems class notes
Embedded systems  class notes Embedded systems  class notes
Embedded systems class notes
 
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdfIntroduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
Introduction to embedded systems using the msp430 6. 1 Enumerate the.pdf
 
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdfIntroduction to embedded systems using the msp430 6.1 Enumerate the .pdf
Introduction to embedded systems using the msp430 6.1 Enumerate the .pdf
 
8051 basics
8051 basics8051 basics
8051 basics
 
18CS44-MES-Module3-ppt.pdf
18CS44-MES-Module3-ppt.pdf18CS44-MES-Module3-ppt.pdf
18CS44-MES-Module3-ppt.pdf
 
Introduction to microcontroller
Introduction to microcontrollerIntroduction to microcontroller
Introduction to microcontroller
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
microprocessor
microprocessormicroprocessor
microprocessor
 
Difference Between Microprocessors and Microcontrollers
Difference Between Microprocessors and MicrocontrollersDifference Between Microprocessors and Microcontrollers
Difference Between Microprocessors and Microcontrollers
 
The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
 
embededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).pptembededsystemfinal1-170130182030 (1).ppt
embededsystemfinal1-170130182030 (1).ppt
 
Trainingreport on embedded system
Trainingreport on embedded systemTrainingreport on embedded system
Trainingreport on embedded system
 
What is a microcontroller
What is a microcontrollerWhat is a microcontroller
What is a microcontroller
 

ritesh (3)

  • 1. By: Ritesh Maheshwari 3rd Yr student of Electronics Instr. & Control Engg. Spring 2007 “In the name of God” GIT Student Of EIC Branch Presents: Seminar On
  • 2. Embedded Systems What is an Embedded System? Where are Embedded Systems used? Typical Embedded Systems Hardware Embedded OS and Software Why study Embedded System? Microprocessors Microcontrollers The 8051 Microcontroller A simple project using AT89C51 References
  • 3. Block Diagram of an Embedded System
  • 4.  A specialized computer system that is part of a larger system or machine.  Typically, an embedded system is housed on a single microprocessor board with the programs stored in ROM.  Virtually all appliances that have a digital interface -- watches, microwaves, VCRs, cars -- utilize embedded systems.  Some embedded systems include an operating system, but many are so specialized that the entire logic can be implemented as a single program.
  • 5. It is specially designed to perform a few tasks in the most efficient way. Interacts with physical elements in our environment viz., controlling & driving a motor, sensing temperature etc. i.e. “ An embedded system can be defined as those control systems which are designed either by microprocessor or microcontroller for a specific tasks. ” OR “ An embedded system is some combination of computer hardware & software, either fixed in capability or programmable, that is specifically designed for a particular kind of application device. ”
  • 6. Where are Embedded Systems used? Signal processing systems  Real-time video, DVD players, Medical equipment. Distributed control  Network routers, switches, firewalls, mass transit systems, Elevators “Small” systems  Mobile phones, pagers, home appliances, toys, smartcards, MP3 players, PDAs, digital cameras, sensors, pc keyboard & mouse Modern cars: Up to 100 or more processors  Engine control unit  ABS systems (Anti Lock Brake systems)  Emissions control  Diagnostics and Security systems  Accessories (doors, windows etc)
  • 7. EMBEDDED SYSTEM IN DAILY LIFE Washing machine cell phone microWave oven sensor based Washbasin
  • 8. Traffic lighTdvd player digiTal clock moving message display
  • 9. Typical Embedded Systems Hardware Commercial off-the-shelf components (COTS)  e.g. wireless radios, sensors, I/O devices  Cheap Application-Specific ICs (ASICs)  ICs tailored to meet application needs  Good performance for their intended task(s)  Original ESs were ASICs only Domain-specific processors  DSPs  Microcontrollers Microprocessors  General Purpose Processors
  • 10. Embedded Operating Systems: Office-style OSes  PalmOS  WindowsCE RTOSes  VxWorks  QNX Linux  Linux is already ubiquitous  Hundreds of different devices are using it  http://www.linuxdevices.com/articles/AT4936596231.html  Numerous commercial + open source products Mobile OS  Symbian Others  TinyOS
  • 11. Why Study Embedded Systems? • Embedded systems are playing important roles in our livesEmbedded systems are playing important roles in our lives every day, even though they might not necessarily be visible.every day, even though they might not necessarily be visible. • Some of the embedded systems we use every day control theSome of the embedded systems we use every day control the menu system on television, the timer in a microwave oven, a cellmenu system on television, the timer in a microwave oven, a cell phone, an MP3 player or any other device with some amount ofphone, an MP3 player or any other device with some amount of intelligence built-in.intelligence built-in. • In fact, recent poll data shows that embedded computerIn fact, recent poll data shows that embedded computer systems currently outnumber humans in the USA.systems currently outnumber humans in the USA. • Embedded systems is a rapidly growing industry where growthEmbedded systems is a rapidly growing industry where growth opportunities are numerous.opportunities are numerous.
  • 12. CPU General- Purpose Micro- processor RAM ROM I/O Port Timer Serial COM Port Data Bus Address Bus General-Purpose Microprocessor System CPU for Computers No RAM, ROM, I/O on CPU chip itself Example--Intel’s x86: 8086,8088,80386,80486, Pentium Motorola’s 680x0: 68000, 68010, 68020,68030,6040 Many chips on mother board General-purpose microprocessor
  • 13. Microprocessor A microprocessor is a programmable digital electronic component that incorporates the functions of a central processing unit (CPU) on a single semiconducting integrated circuit (IC). The prime use of a microprocessor is to read data, perform extensive calculations on that data, and store those calculations in a mass storage device or display the results for human use. The programs used by the microprocessors are stored in the mass storage device & loaded into RAM as the user directs.
  • 14. RAM ROM I/O Port Timer Serial COM Port Microcontroller CPU A smaller computer. On-chip RAM, ROM, I/O ports... Example:- Motorola’s 6811, Intel’s 8051 and PIC 16X A single chip Microcontroller
  • 15. Microcontroller An embedded microcontroller is a microcomputer that contains most of its peripherals & required memory inside a single integrated circuit along with the CPU. They have a high concentration of on-chip facilities such as serial ports, parallel input/output ports, timers, counters, interrupt control, analog-to-digital converters, random access memory, read only memory, etc. The prime use of a microcontroller is to control the operation of a machine using fixed program that is stored in ROM & that does not change over the lifetime of the system.
  • 16. Microcontroller  Uses: 1. Microcontrollers have become common in many areas, and can be found in home appliances, computer equipment, and instrumentation. 2. They are often used in automobiles, and have many industrial uses as well, and have become a central part of industrial robotics. 3. Because they are usually used to control a single process and execute simple instructions, microcontrollers do not require significant processing power.
  • 17.  Uses conti….. 4. Microcontrollers are hidden inside a surprising number of products these days. 5. If your microwave oven has an LED or LCD screen and a keypad, it contains a microcontroller. 6. All modern automobiles contain at least one microcontroller. The engine is controlled by a microcontroller, as are the anti-lock brakes, the cruise control and so on..
  • 18. 1. Meeting the computing needs of the task efficiently and cost effectively • speed, the amount of ROM and RAM, the number of I/O ports and timers, size, packaging, power consumption • easy to upgrade • cost per unit 2. Availability of software development tools • assemblers, debuggers, C compilers, emulator, simulator, technical support 3. Wide availability and reliable sources of the microcontrollers. Three criteria in Choosing a Microcontroller
  • 19. The necessary tools for a microprocessor/controller CPU: Central Processing Unit I/O: Input /Output Bus: Address bus & Data bus Memory: RAM & ROM Timer Interrupt Serial Port Parallel Port
  • 20. Why do we need to learn Microprocessors/controllers? The microprocessor is the core of computer systems. Nowadays many communication, digital entertainment, portable devices, are controlled by them. A designer should know what types of components he needs, ways to reduce production costs and product reliable.
  • 21. Microprocessor CPU is stand-alone, RAM, ROM, I/O, timer are separate designer can decide on the amount of ROM, RAM and I/O ports. expansive versatility general-purpose Ex. 8085,8086 mp, Motorola 6800, Intel’s 8086, etc. Microcontroller • CPU, RAM, ROM, I/O and timer are all on a single chip • fix amount of on-chip ROM, RAM, I/O ports • for applications in which cost, power and space are critical • single-purpose • Ex. 8051, PIC mc, Motorola MC’s, Phillips, etc. Microprocessor v/s Microcontroller
  • 22.
  • 23. The 8051 Microcontroller: The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at the end of the 1970’s. The 8051 family characteristics: 4K Bytes ROM 128 Bytes RAM two timer/counters (16 bit) A serial port 4 general purpose parallel input/output port Interrupt controller The 8051 can address 64K of external data memory and 64K of External program memory.
  • 25. Pin Description of the 8051 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST (RXD)P3.0 (TXD)P3.1 (T0)P3.4 (T1)P3.5 XTAL2 XTAL1 GND (INT0)P3.2 (INT1)P3.3 (RD)P3.7 (WR)P3.6 Vcc P0.0(AD0 )P0.1(AD1) P0.2(AD2 )P0.3(AD3) P0.4(AD4) P0.5(AD5) P0.6(AD6) P0.7(AD7) EA/VPP ALE/PROG PSEN P2.7(A15) P2.6(A14) P2.5(A13) P2.4(A12) P2.3(A11) P2.2(A10) P2.1(A9) P2.0(A8) 8051 IC  8051 other family members: 1. 8751 (has EPROM) 2. 8951 (has EEPROM)
  • 26. Vcc(+5volt) Pin - 40 Ground(0 volt) Pin-20 Pin DescriPtion
  • 27. Pin Description Port 0 from Pin-39 to pin-32 Used to excess both data & address Dual functional
  • 28. Microcontroller 8051 Pin Description Port 1 from Pin-1 to pin-8 Used as I/O port
  • 29. Pin DescriPtion Port 2 from Pin-21 to pin-28 Used to excess address & as I/O port
  • 30. Microcontroller 8051 Pin DescriPtion Port 3 from Pin-10 to Pin-17 P3.0 RXDP3.1 TXDP3.2 IN T0 P3.3 IN T1 P3.4 T0 P3.5 T1P3.6 WR P3.7 RD
  • 32.
  • 33. Addressing Modes Immediate addressing modes Register addressing modes Direct addressing modes Register Indirect addressing modes Indexed addressing modes
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. Timers/Counters A timer is a counter that is increased with every time an instruction is executed e.g. 8051 with 12MHz increases a counter every 1.085 µs General 8051 has 3 timer: Two 16-bit timer One 16-bit timer with extra-functionality (introduced with the 8052) The counters are divided into two 8-Bit registers called the timer low (TL0, TL1) and high (TH0, TH1) bytes. All counters action is controlled by bit states in the timer mode control register (TMOD), the timer/counter control register (TCON), and certain program instructions.
  • 40. Timers/counters Timer: measures time intervals To generate timed output events  e.g., hold traffic light green for 10 s To measure input events  e.g., measure a car’s speed Based on counting clock pulses  E.g., let Clk period be 10 ns  And we count 20,000 Clk pulses  Then 200 microseconds have passed  16-bit counter would count up to 65,535*10 ns = 655.35 microsecond., resolution = 10 ns  Top: indicates top count reached, wrap- around 16-bit up counter Clk Cnt Basic timer Top Reset 16
  • 41. Counters Counter: like a timer, but counts pulses on a general input signal rather than clock e.g., count cars passing over a sensor Can often configure device as either a timer or counter 16-bit up counter Clk 16 Cnt_in 2x1 mux Mode Timer/counter Top Reset Cnt
  • 42.
  • 43. TMOD Register: Gate : When set, timer only runs while INT(0,1) is high. C/T : Counter/Timer select bit. M1 : Mode bit 1. M0 : Mode bit 0.
  • 44. TF1: Timer 1 overflow flag. TR1: Timer 1 run control bit. TF0: Timer 0 overflag. TR0: Timer 0 run control bit. IE1: External interrupt 1 edge flag. IT1: External interrupt 1 type flag. IE0: External interrupt 0 edge flag. IT0: External interrupt 0 type flag.
  • 45.
  • 46. Crystal 11.0592 MHZ /12 Timer Freq. TH0 TL0 TF0 TRO 1.085 µS • In this the delay produced is calculated as: DELAY= 1.085µSec X (NO. OF COUNTS)
  • 47.
  • 48.
  • 49.
  • 50. Block Diagram 8051 S E N S O R ————►‌‌————►‌‌ 40 PIN DIP A D C LCD DISPLAY D A C ————►‌‌————►‌‌ ————►‌‌————►‌‌ ————►‌‌————►‌‌ LEDS 4 SWITCHES REAL TIME CLOCK 4×4 MATRIX KEYBOARD
  • 51.  We can Interfaced a number of modules such as » LED and 7-segment Display » LCD » Keyboard » Real Time Clock (RTC) » DAC » ADC » Sensors » EEPROM » RS-232
  • 52. Light Emitting diode It is single light display that include incandescent and are treated as single binary points to be switched off and on by program instructions . It has two pins, first is connected to port and second one is grounded (vss). It requires a high logic to glow from the port pin.
  • 54. Seven-segment displays commonly contain LED segments which arranged as an 8 with a common lead (cathode or anode) and 7 individual leads for each segment. Block Diagram shows a common cathode type of segment In common cathode to lit a segment a high input logic is required. In common anode to lit a segment a low input logic is required.
  • 55. Interfacing of 7-segment with 8051 ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ P0.0 P0.2 P0.1 P0.3 P0.4 P0.5 P0.6 P0.7 8051 ^^^^^^ Vcc Vcc
  • 56. LCD It is an Intelligent Alphanumeric display which can be used to display numbers, characters, and graphics. It has 14 pins as shown in pin diagram. Display contains 2 internal byte wide registers, one for command (RS=0) and one for display (RS=1). There are certain commands to be send to the Lcd for making some setting such as clear screen, force the cursor to home position and blink the cursor. R/W pin is set to 1 for reading and to 0 for writing. EN pin is set to 1 for enabling display. DB0-DB7 are pins for 8-bit data bus.
  • 57. Interfacing LCD with 8051 8051 ^^^^^^ 4×16 Character LCD Display E RS R/W VeeGnd Vcc +5v 10k D0 D7 P1.0 P1.7 P2.0 P2.1 P2.2
  • 58.
  • 59. Interrupts Definition of ‘Interrupt’ “Event that disrupts the normal execution of a program and causes the execution of special instructions”
  • 63. Interrupt Handling Code that deals with interrupts: Interrupt Handler or Interrupt Service Routines (ISRs) Address space in code space
  • 64. Interrupt OverheadsInterrupt arrives Complete current instruction Save essential register information Vector to ISR Save additional register information Execute body of ISR Restore other register information Return from interrupt and restore essential registers Resume task Interrupt Latency Interrupt Termination
  • 65. Interrupts Internal or External Handling can be enabled/disabled Prioritized General 8051: 3x timer interrupts, 2x external interrupts 1x serial port interrupt
  • 67. Interrupt FlagsBits that are set if the interrupt occurs
  • 68. Summary: InterruptsDefinition of ‘Interrupt’: Event that disrupts the normal execution of a program and causes the execution of special instructions Handling can be enabled/disabled Prioritized Internal or External External Interrupts: Level-triggered Edge-triggered 8051: 3 timer interrupts, 2 external interrupts & a serial port interrupt threshold Level-triggered Edge-triggered trigger point trigger point t t
  • 69.
  • 70.
  • 71. • In this project we try to give the same prototype for this type of trains. •The train is designed for three stations, named as Jaipur railway station, Sitapura & GIT College. • The stoppage time is of 3 sec & time between two consecutive stations is 6 sec. • There are indicators, which are used to show the train direction i.e. UP path & 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. • The coding of the metro train prototype is given in the assembly language.
  • 72. Why we choose this project ? Our approach is to gain knowledge of Interfacing different devices with Microcontroller for useful applications and to fulfill the Hardware Module requirement of college authorities. This is such a project which can be used to perform any kind of application depend on the modules which are interfaced. These leads us to Microcontroller Based Embedded System.
  • 73. Applications By interfacing STEPPER MOTOR with Microcontroller, we can make the trainer kit which controls the motion of train. We can also generate various types of waves such as square, triangular and saw tooth in accordance with the programme fed in 8051, 89c51, etc. chip. Initially we interfaced LED, 7-segment and Keyboard and check programme which is the purpose of trainer Kit. In these way we go step by step for each module interface and accomplish the goal of making a well-functioning Trainer Kit. Finally we will add some features by interfacing Sensors
  • 75. Touch sensitive stairs Automatic gates Accelerator
  • 76. Conclusion Future aspect of embedded technologies Experience during training Importance of this training program
  • 78. At the End … Thanks for your Attention ……. ;) Ritesh Maheshwari Amardeep Pandey Pankaj Chaudhary Akhilesh Pandey Monsoon 2007

Notes de l'éditeur

  1. Intel’s x86: 8086,8088,80386,80486, Pentium Motorola’s 680x0: 68000, 68010, 68020,68030,6040
  2. versatility 多用途的: any number of applications for PC