Embedded Systems and Model of Metro Train
Embedded Systems and Model of Metro Train
Embedded Systems and Model of Metro Train
on
INTRODUCTION
A Timer module to
allow the
microcontroller to
perform tasks for
certain time periods.
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.
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
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.
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:
Automated station
announcements. So no more
"Judishuwary Square".
Security cameras on all rail Future of Metro Train
cars.