SlideShare a Scribd company logo
1 of 35
Download to read offline
A presentation
      on
INTRODUCTION

We are living in the Embedded World. We are
 surrounded with many embedded products and our
 daily life largely depends on the proper functioning
 of these gadgets.
Television, Radio, CD player, Washing
 Machine or Microwave Oven in our kitchen,
 Card readers, Palm devices of our work space
 enable us to do many of our tasks very effectively.
All kinds of magazines and journals regularly dish
 out details about latest technologies, new devices;
 fast applications which make us believe that our
 basic survival is controlled by these
 embedded products.
 Now we can agree to the fact that these embedded
 products have successfully invaded into our
 world
What is an EMBEDDED SYSTEM?
EMBEDDED SYSTEM

Theoretically, an embedded System is a combination
 of piece of microprocessor based hardware and the
 suitable software to undertake a specific task.
An embedded system is designed to perform a
 dedicated function.
An embedded system is a computer system with
 higher quality and reliability requirements than
 other types of computer systems.
Examples of Embedded Systems and their markets


             Market          Embedded Device
Industrial Control      Robotics and Control Systems
                        (Manufacturing)
Networking              Routers
                        Hubs
                        Gateways
Office Automation       Fax Machine
                        Photocopier
                        Printers
                        Monitors
                        Scanners
Medical                 Infusion Pumps
                        Dialysis Machines
                        Prosthetic Devices
                        Cardiac Monitors
Microcontrollers
Microcontroller, as the name suggests, are
 small controllers.

Basically, a microcontroller is a device
 which integrates a number of the
 components of a microprocessor system
 onto a single microchip.
Most microcontrollers
will also combine other
devices such as:

A Timer module to
allow the
microcontroller to
perform tasks for
certain time periods.

A serial I/O port to
allow data to flow
between the
microcontroller and
other devices such as a
PC or another
microcontroller.

An ADC to allow the
microcontroller to
accept analog input
data for processing.
8051 Architecture
Main features of the 8051 family

FEATURE        8051    8052        8031

   ROM          4K          8K            0K
RAM(bytes)      128        256            128
  Timers         2            3           2
 I/O pins       32          32            32
Serial Ports     1            1           1
 Interrupt       6            8           6
  Sources
The 8051 Microcontroller
The pins of the micro controller are explained below.

 Reset: It resets total 8051 micro controller.
 RXD:     It receives data in serial communication.
   TXD: It transmits data in serial communication.
   INT0: External interrupt for timer 0.
   INT1: External interrupt for timer1
   T0:   Timer0.
   T1:   Timer1.
   RD:    To read into external memory.
   WR:    To write into external memory.
   XTAL1 & XTAL2: To connect the crystal oscillator.
   ALE: Address latch enable which is used to access the address locations
         from external memory.
   PSEN: Program store enable which is used for storing programming
          code into the external memory.
   EA:    External Access: 64 KB of ROM is the limit for external memory.
Capacitor is storing
charge permanently
until we use it. Crystal
Oscillator is used to
generate a carrier
signal with stable
frequency. With the
help of this oscillator
we will deduce the
execution speed in
terms of bytes/ sec. It
generates 12 clock
pulses /machine cycle.
Capacitors provide
charge for crystal
oscillator. If we are not
connecting any
external memory to
micro controller, EA is
connected to Vcc in
case of 8051.               Reset circuit
Central Processing Unit

                                    Its primary elements are :
                                     An 8 bit Arithmetic Logic Uni
                                     Accumulator (Acc)
                                     B register
                                     Stack Pointer (SP)
                                     Program Status Word (PSW)
                                     Program Counter (PC)
The CPU is the brain of the
                                     Data Pointer Register (DPTR)
microcontrollers reading user’s
programs and executing the
expected task as per instructions
stored there in.
Input / Output Ports
Input / Output Ports

The I/O ports are the means by which the
 microcontroller interfaces to the environment
 The 8051 has 32 I/O pins configured as four eight
 bit parallel ports (P0, P1, P2 and P3).
Each pin can be used as an input or as an output
 under the software control.
Different pins can be configured as input or outputs
 independent of each other or the same pin can be
 used as an input or as output at different times.
Timers / Counters

The 8051 has 2 Timers/Counters (16 bits).
They can be used as Timers to generate a time delay
 or as Counters to count external events.
Both Timer 0 and Timer 1 consist of a ‘High’ byte
 and a ‘Low’ byte.
There is a mode control register and a control
 register to configure these timers/counters in
 number of ways.
TH0                                              TL0
D15   D14   D13   D12    D11   D10   D9   D8   D7   D6    D5   D4   D3     D2   D1   D0

                                      Timer 0 registers
                        TH1                                          TL1
D15   D14   D13   D12    D11   D10   D9   D8   D7   D6    D5   D4    D3    D2   D1   D0

                                      Timer 1 registers
Serial Port




 Each 8051 contains a high speed full duplex (means you
  can simultaneously use the same port for both transmitting
  and receiving purposes) serial port .
 For the standard serial communication facility, 8051 can be
  programmed for UART operations and can be connected
  with personal computers, teletype writers, modem.
Memory Organization

Program Memory
 The AT89C Microcontroller has separate address spaces for program
  memory and data memory. The program memory can be up to 64K
  bytes long.



Data Memory
 The AT89C51 has 128 bytes of on-chip RAM (256 bytes in the
  AT89C52) plus a number of Special Function Registers (SFRs).
 The lower 128 bytes of RAM can be accessed either by direct addressing
  (MOV data addr) or by indirect addressing (MOV @Ri).
AT89C51
CY PSW.7 Carry flag.
AC PSW.6 Auxiliary carry flag.
F0 PSW.5 Flag 0 available to the user for general purpose.
RS1 PSW.4 Register Bank selector bit 1.(1)
RS0 PSW.3 Register Bank selector bit 0. (1)
OV PSW.2 Overflow flag.
— PSW.1 User definable flag.
P PSW.0 Parity flag. Set/cleared by hardware each instruction cycle to
indicate an odd/even number of 1 bits
in the accumulator.
8051 INTERRUPTS
The 8051 has six interrupt sources
When an interrupt is activated, then the program flow completes the execution of the
  current instruction and jumps to a particular program location where it finds the
  interrupt service routine.
After finishing the interrupt service routine, the program flows return to back to the
  original place.


Interrupt                 ROM                 Pin                    Flag Clearing
                          Location(Hex)
Reset                     0000                9                      Auto
External hardware         0003                P3.2 (12)              Auto
Interrupt 0(INT0)
Timer 0 interrupt (TF0)   000B                                       Auto
External hardware         0013                P3.3 (13)              Auto
interrupt 1 (INT1)
Timer 1 interrupt (TF!)   001B                                       Auto
Serial COM interrupt      0023                                       Programmer clears it
(RI & TI)
Addressing Modes


The 8051 supports 5 types of addressing modes:


Register Addressing (MOV A, R0; ADD A, R5)
Direct Addressing (MOV R0, 40H; MOV 56H, A)
Register Indirect Addressing
 (MOV A,@R0; MOV @R1,B)
Immediate Addressing (MOV A, #25H; MOV R4,#6)
Indexed Addressing (MOVC A, @A+DPTR)
LCD & Keyboard Interfacing
DC Motor Interfacing
Prototype of Metro Train

 The basic objective of this project is to include the common
 features of metro train such as:
LCD display,
Opening and closing of doors with a buzzer,
Driving of dc motors
 with the help of interfacing all of them with AT89C51
 microcontroller.
A toy car is used in this project which has two DC
 motors. One is used for opening and closing the door
 and other is used for moving the car forward.
Circuit Diagram
PROJECT METHODOLOGY
  Components:
1. Power Supply Section                    2. Microcontroller Section
plug with wire                             µController IC (AT89C51) with base (1)
Step down transformer (230v/12v ac)(1)     Crystal Oscillator (11.0592 MHz)      (1)
1N4007 diodes                        (4)   Capacitor (30pF)                      (2)
LM7809 & LM7805                      (1)   Capacitor (10µF)                      (1)
100 μF capacitor                     (1)   Resistor (8.2K)                       (1)
ON/OFF switch                        (1)   LCD Connector                         (1)
1K Resistor & Red LED                (1)   Reset Switch (Push-on)                (1)

3. Buzzer (1)                              4. LCD(16x2)      (1)
5. Load Driver- L293D with base(1)         6. A Car (toy-driven by a DC motor)
7. General Purpose Card    (3)             8. Single Core Connecting Wires
9. Old and Rough CD drive for making Door System (1)
General Working

 When the power is turned on lcd display is switched on and a message
  (“welcome to metro”) is displayed on LCD.
 Then a message “Current station is Kishan Ganj” is displayed and door
  is opened also.
 A buzzer is also turned on when door opens.

 After some delay the door is closed and car is started to move forward.
 A message “current station is Kishan Ganj” is displayed also on LCD.
 After some delay a message “next station is Pratap nagar” is displayed.
• After some time the train stops and a message “ current station is
  Pratap nagar” is displayed.
 This process is continued for five stations.
 In the end a message “End of line” is displayed on LCD
 This whole process is repeated until we turned off the power supply.
SoftwareDesign
Softwares used:
 Keil µVision3.
  μVision3 provides full integration of the C51 compiler and debugger.
  μVision3 offers both: a simulator that seamless simulates the complete
  peripherals of countless 8051 derivatives, and a target debugger that
  allows software testing in real hardware with a target monitor or
  emulator.
 Top-View Simulator.
  Top-view Simulator gives an excellent simulation environment for the
  Industry’s most popular 8 bit microcontroller family, MCS 51.
  The features of the simulator are briefly tabulated here.
  Device Selection                       Simulation Facilities
  Program Editing                        Code Generation Facilities
  Clear View GUI Environment             Program Execution
The new cars would feature
the following:

Stainless steel exteriors
instead of an aluminium car
body.

Thinner, stronger stainless
steel seats that offer more
leg room. Each car would
have 64 cloth-padded, taller
seats with seat-back grab
handles. A total end to
carpeting. Floors would be
rubberized.

Interactive maps on LCD
screens that would also
likely display
advertisements

Automated station
announcements. So no more
"Judishuwary Square".
Security cameras on all rail   Future of Metro Train
cars.
8449972 embedded-systems-and-model-of-metro-train

More Related Content

What's hot

Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"surabhii007
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Technogroovy India
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHARSOHIL LUHAR
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
Microcontroller 8051 training
Microcontroller 8051 trainingMicrocontroller 8051 training
Microcontroller 8051 trainingPradip Bhandari
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti VenkatraoRamisetti
 
8051 microcontroller introduction
8051 microcontroller introduction8051 microcontroller introduction
8051 microcontroller introductionANJUSHA R
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )Tarun Khaneja
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt ianishgoel
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollerchirag patil
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollerJhemi22
 
Applications of 8051 microcontrollers
Applications of 8051 microcontrollersApplications of 8051 microcontrollers
Applications of 8051 microcontrollersDr.YNM
 
8051 microcontroller training (sahil gupta 9068557926)
8051 microcontroller training  (sahil gupta   9068557926)8051 microcontroller training  (sahil gupta   9068557926)
8051 microcontroller training (sahil gupta 9068557926)Sahil Gupta
 

What's hot (20)

Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"Presentation On: "Micro-controller 8051 & Embedded System"
Presentation On: "Micro-controller 8051 & Embedded System"
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy
 
8051 basics
8051 basics8051 basics
8051 basics
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHAR
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
8051
80518051
8051
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Microcontroller 8051 training
Microcontroller 8051 trainingMicrocontroller 8051 training
Microcontroller 8051 training
 
8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti 8051 Microcontroller Overview by Venkatrao Ramisetti
8051 Microcontroller Overview by Venkatrao Ramisetti
 
1 8051 microcontroller intr
1 8051 microcontroller intr1 8051 microcontroller intr
1 8051 microcontroller intr
 
8051 microcontroller introduction
8051 microcontroller introduction8051 microcontroller introduction
8051 microcontroller introduction
 
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
8051 microcontroller lecture ppt by Tarun Khaneja ( 9034406598 )
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt i
 
89s52 2
89s52 289s52 2
89s52 2
 
Timers and counters of microcontroller 8051
Timers and counters of microcontroller 8051Timers and counters of microcontroller 8051
Timers and counters of microcontroller 8051
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
Applications of 8051 microcontrollers
Applications of 8051 microcontrollersApplications of 8051 microcontrollers
Applications of 8051 microcontrollers
 
8051 microcontroller training (sahil gupta 9068557926)
8051 microcontroller training  (sahil gupta   9068557926)8051 microcontroller training  (sahil gupta   9068557926)
8051 microcontroller training (sahil gupta 9068557926)
 
AT89 S52
AT89 S52AT89 S52
AT89 S52
 

Similar to 8449972 embedded-systems-and-model-of-metro-train

8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training  (2) (sahil gupta   9068557926)8051 microcontroller training  (2) (sahil gupta   9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)Sahil Gupta
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerAmandeep Alag
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentseceprinter6
 
Introduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light systemIntroduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light systemRani Loganathan
 
Introduction to 8085 Microprocessors
Introduction to 8085 MicroprocessorsIntroduction to 8085 Microprocessors
Introduction to 8085 MicroprocessorsVeerakumar S
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Vishalya Dulam
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf818Farida
 
Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontrollerankitsharmaj
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerRup Chowdhury
 

Similar to 8449972 embedded-systems-and-model-of-metro-train (20)

Embedded System
Embedded SystemEmbedded System
Embedded System
 
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller training  (2) (sahil gupta   9068557926)8051 microcontroller training  (2) (sahil gupta   9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Badal sharma
Badal sharmaBadal sharma
Badal sharma
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
Introduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light systemIntroduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light system
 
Ppt embedded
Ppt embeddedPpt embedded
Ppt embedded
 
embedded system bye Sj
embedded system bye Sjembedded system bye Sj
embedded system bye Sj
 
Introduction to 8085 Microprocessors
Introduction to 8085 MicroprocessorsIntroduction to 8085 Microprocessors
Introduction to 8085 Microprocessors
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
Embedded system 8051 Microcontroller
Embedded system 8051 MicrocontrollerEmbedded system 8051 Microcontroller
Embedded system 8051 Microcontroller
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware8051 Microcontroller By Er. Swapnil Kaware
8051 Microcontroller By Er. Swapnil Kaware
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
 
Microcontroller 8051 gs
Microcontroller 8051 gsMicrocontroller 8051 gs
Microcontroller 8051 gs
 

8449972 embedded-systems-and-model-of-metro-train

  • 2. INTRODUCTION We are living in the Embedded World. We are surrounded with many embedded products and our daily life largely depends on the proper functioning of these gadgets. Television, Radio, CD player, Washing Machine or Microwave Oven in our kitchen, Card readers, Palm devices of our work space enable us to do many of our tasks very effectively.
  • 3. All kinds of magazines and journals regularly dish out details about latest technologies, new devices; fast applications which make us believe that our basic survival is controlled by these embedded products.  Now we can agree to the fact that these embedded products have successfully invaded into our world
  • 4. What is an EMBEDDED SYSTEM?
  • 5. EMBEDDED SYSTEM Theoretically, an embedded System is a combination of piece of microprocessor based hardware and the suitable software to undertake a specific task. An embedded system is designed to perform a dedicated function. An embedded system is a computer system with higher quality and reliability requirements than other types of computer systems.
  • 6. Examples of Embedded Systems and their markets Market Embedded Device Industrial Control Robotics and Control Systems (Manufacturing) Networking Routers Hubs Gateways Office Automation Fax Machine Photocopier Printers Monitors Scanners Medical Infusion Pumps Dialysis Machines Prosthetic Devices Cardiac Monitors
  • 8. Microcontroller, as the name suggests, are small controllers. Basically, a microcontroller is a device which integrates a number of the components of a microprocessor system onto a single microchip.
  • 9. Most microcontrollers will also combine other devices such as: A Timer module to allow the microcontroller to perform tasks for certain time periods. A serial I/O port to allow data to flow between the microcontroller and other devices such as a PC or another microcontroller. An ADC to allow the microcontroller to accept analog input data for processing.
  • 11. Main features of the 8051 family FEATURE 8051 8052 8031 ROM 4K 8K 0K RAM(bytes) 128 256 128 Timers 2 3 2 I/O pins 32 32 32 Serial Ports 1 1 1 Interrupt 6 8 6 Sources
  • 13. The pins of the micro controller are explained below.  Reset: It resets total 8051 micro controller.  RXD: It receives data in serial communication.  TXD: It transmits data in serial communication.  INT0: External interrupt for timer 0.  INT1: External interrupt for timer1  T0: Timer0.  T1: Timer1.  RD: To read into external memory.  WR: To write into external memory.  XTAL1 & XTAL2: To connect the crystal oscillator.  ALE: Address latch enable which is used to access the address locations  from external memory.  PSEN: Program store enable which is used for storing programming  code into the external memory.  EA: External Access: 64 KB of ROM is the limit for external memory.
  • 14. Capacitor is storing charge permanently until we use it. Crystal Oscillator is used to generate a carrier signal with stable frequency. With the help of this oscillator we will deduce the execution speed in terms of bytes/ sec. It generates 12 clock pulses /machine cycle. Capacitors provide charge for crystal oscillator. If we are not connecting any external memory to micro controller, EA is connected to Vcc in case of 8051. Reset circuit
  • 15. Central Processing Unit Its primary elements are :  An 8 bit Arithmetic Logic Uni  Accumulator (Acc)  B register  Stack Pointer (SP)  Program Status Word (PSW)  Program Counter (PC) The CPU is the brain of the  Data Pointer Register (DPTR) microcontrollers reading user’s programs and executing the expected task as per instructions stored there in.
  • 16. Input / Output Ports
  • 17. Input / Output Ports The I/O ports are the means by which the microcontroller interfaces to the environment  The 8051 has 32 I/O pins configured as four eight bit parallel ports (P0, P1, P2 and P3). Each pin can be used as an input or as an output under the software control. Different pins can be configured as input or outputs independent of each other or the same pin can be used as an input or as output at different times.
  • 18. Timers / Counters The 8051 has 2 Timers/Counters (16 bits). They can be used as Timers to generate a time delay or as Counters to count external events. Both Timer 0 and Timer 1 consist of a ‘High’ byte and a ‘Low’ byte. There is a mode control register and a control register to configure these timers/counters in number of ways.
  • 19. TH0 TL0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 Timer 0 registers TH1 TL1 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 Timer 1 registers
  • 20. Serial Port  Each 8051 contains a high speed full duplex (means you can simultaneously use the same port for both transmitting and receiving purposes) serial port .  For the standard serial communication facility, 8051 can be programmed for UART operations and can be connected with personal computers, teletype writers, modem.
  • 21. Memory Organization Program Memory  The AT89C Microcontroller has separate address spaces for program memory and data memory. The program memory can be up to 64K bytes long. Data Memory  The AT89C51 has 128 bytes of on-chip RAM (256 bytes in the AT89C52) plus a number of Special Function Registers (SFRs).  The lower 128 bytes of RAM can be accessed either by direct addressing (MOV data addr) or by indirect addressing (MOV @Ri).
  • 23.
  • 24. CY PSW.7 Carry flag. AC PSW.6 Auxiliary carry flag. F0 PSW.5 Flag 0 available to the user for general purpose. RS1 PSW.4 Register Bank selector bit 1.(1) RS0 PSW.3 Register Bank selector bit 0. (1) OV PSW.2 Overflow flag. — PSW.1 User definable flag. P PSW.0 Parity flag. Set/cleared by hardware each instruction cycle to indicate an odd/even number of 1 bits in the accumulator.
  • 25. 8051 INTERRUPTS The 8051 has six interrupt sources When an interrupt is activated, then the program flow completes the execution of the current instruction and jumps to a particular program location where it finds the interrupt service routine. After finishing the interrupt service routine, the program flows return to back to the original place. Interrupt ROM Pin Flag Clearing Location(Hex) Reset 0000 9 Auto External hardware 0003 P3.2 (12) Auto Interrupt 0(INT0) Timer 0 interrupt (TF0) 000B Auto External hardware 0013 P3.3 (13) Auto interrupt 1 (INT1) Timer 1 interrupt (TF!) 001B Auto Serial COM interrupt 0023 Programmer clears it (RI & TI)
  • 26. Addressing Modes The 8051 supports 5 types of addressing modes: Register Addressing (MOV A, R0; ADD A, R5) Direct Addressing (MOV R0, 40H; MOV 56H, A) Register Indirect Addressing (MOV A,@R0; MOV @R1,B) Immediate Addressing (MOV A, #25H; MOV R4,#6) Indexed Addressing (MOVC A, @A+DPTR)
  • 27. LCD & Keyboard Interfacing
  • 29. Prototype of Metro Train The basic objective of this project is to include the common features of metro train such as: LCD display, Opening and closing of doors with a buzzer, Driving of dc motors with the help of interfacing all of them with AT89C51 microcontroller. A toy car is used in this project which has two DC motors. One is used for opening and closing the door and other is used for moving the car forward.
  • 31. PROJECT METHODOLOGY Components: 1. Power Supply Section 2. Microcontroller Section plug with wire µController IC (AT89C51) with base (1) Step down transformer (230v/12v ac)(1) Crystal Oscillator (11.0592 MHz) (1) 1N4007 diodes (4) Capacitor (30pF) (2) LM7809 & LM7805 (1) Capacitor (10µF) (1) 100 μF capacitor (1) Resistor (8.2K) (1) ON/OFF switch (1) LCD Connector (1) 1K Resistor & Red LED (1) Reset Switch (Push-on) (1) 3. Buzzer (1) 4. LCD(16x2) (1) 5. Load Driver- L293D with base(1) 6. A Car (toy-driven by a DC motor) 7. General Purpose Card (3) 8. Single Core Connecting Wires 9. Old and Rough CD drive for making Door System (1)
  • 32. General Working  When the power is turned on lcd display is switched on and a message (“welcome to metro”) is displayed on LCD.  Then a message “Current station is Kishan Ganj” is displayed and door is opened also.  A buzzer is also turned on when door opens.  After some delay the door is closed and car is started to move forward.  A message “current station is Kishan Ganj” is displayed also on LCD.  After some delay a message “next station is Pratap nagar” is displayed. • After some time the train stops and a message “ current station is Pratap nagar” is displayed.  This process is continued for five stations.  In the end a message “End of line” is displayed on LCD  This whole process is repeated until we turned off the power supply.
  • 33. SoftwareDesign Softwares used:  Keil µVision3. μVision3 provides full integration of the C51 compiler and debugger. μVision3 offers both: a simulator that seamless simulates the complete peripherals of countless 8051 derivatives, and a target debugger that allows software testing in real hardware with a target monitor or emulator.  Top-View Simulator. Top-view Simulator gives an excellent simulation environment for the Industry’s most popular 8 bit microcontroller family, MCS 51. The features of the simulator are briefly tabulated here. Device Selection Simulation Facilities Program Editing Code Generation Facilities Clear View GUI Environment Program Execution
  • 34. The new cars would feature the following: Stainless steel exteriors instead of an aluminium car body. Thinner, stronger stainless steel seats that offer more leg room. Each car would have 64 cloth-padded, taller seats with seat-back grab handles. A total end to carpeting. Floors would be rubberized. Interactive maps on LCD screens that would also likely display advertisements Automated station announcements. So no more "Judishuwary Square". Security cameras on all rail Future of Metro Train cars.