Sunteți pe pagina 1din 67

METRO TRAIN PROTOTYPE USING 8051

SUBMITTED BY: VISHWANATH SARKAR MAYANK GUPTA 3RD Yr., E&C, MANIT- BHOPAL

Semiconductor Technologies
EDUCATION AND TRAINING

VEDANT

CERTIFICATE
To whom it May concern This is to certified that Mr. VISHWANATH SARKAR &
(MANIT, BHOPAL) MAYANK GUPTA

Has successfully completed their project on:

Metro train prototype using 8051


with all its functionalities during the summer training course from Semiconductor Technologies, Vedant his work was authentic and conduct was diligent & sincere. The project satisfies the norms of the company and was developed under the guidance of Mr. AMIT CHANDRA & Ms. Anupam Maurya Certificate is awaited

CERTIFIED BY:

Mr. Amit Chandra

Mr.Sachin Kr. Kanodia

(Project Guide)

(Center Head)

A CKNOWLEDGEMENT
No academic endeavor can be single handedly accomplished. This work is no exception. At the outset, we would like to record our gratitude to Mr. Sachin Kr. Kanodia for initiating us into this training. We sincerely acknowledge our thanks to our project guide Mr. Amit Chandra and Ms. Anupam Maurya for their valuable suggestions and time to time consultation. Last, but not the least, we would like to thank all the staff of Design Department, Semiconductor Technologies, Vedant, Lucknow especially Ms. Charu Agrawal for their kind cooperation and assistance during our training period.

-VISHWANATH SARKAR -MAYANK GUPTA

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. It is the embedded technology that makes all this possible. Embedded system not only sit in our microwave ovens but also help drive our cars, giving us directions to follow entertainment through our journey, keeping us connected with anyone across the globe and even warning us of potential danger. And is not far off when you'll have a car similar to what JAMES BOND drives! Embedded technology plays a key role not only in consumer electronics but also in much safety critical application like avionics, space, railways and transport, process control and medicine. But complexity creates problems too. A faulty microprocessor or software may prove to be a costly affair. Your

favorite song on the MP3 player may sing a different tune. A car can go up in flames if spark plugs misfire. Even the Boeing aircraft may go off course. Fingers are then pointed at the system 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
S.No. 1. 2. 3. 4. 5. 6. 7. 8. 9. Title Introduction To Semiconductor technologies - Vedant. Introduction to Embedded Systems Introduction to the Microcontroller Block Diagram of the System Introduction to the Keil Software Introduction To The Project Circuit Diagram Program Code Program List File Page 6 8 13 16 19 20 26 28 46

10.

Bibliography

65

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 evergrowing industry. Over the last six 20 years tell the saga of VEDANT contribution in leading the national effort in the vital areas of microelectronics.

S EMICONDUCTOR T ECHNOLOGIES VEDANT

M/s Semiconductor Technologies-VEDANT is Indias premier VLSI Design & Embedded System Design organization since 2002. While VEDANT is Indias pioneer in the field of VLSI Design & Embedded System Design and Testing. VEDANT is providing Education & Training on VLSI 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 chipsmaking 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 TechnologiesVEDANT (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. SCL VEDANT program covers the complete spectrum of VLSI design inclusive of front end, back end and provides of exposure to the IC fabrication process. Industry standard CAD tools are used for the purpose of training backed up by project work under the guidance of experts. VEDANT (LUCKNOW CENTER) is the institute, which provides training in VLSI design to students. The working environment is concentrated on front-end design process. It runs two programs PG diploma in VLSI designing of four months and certificate course of two months. It also provides Summer & Winter Training in VLSI Design or Embedded System. It has an advanced lab which is equipped with latest industry standard Electronic Design Automation (EDA) and FPGA tools and 8051 Development Kits inclusive of Model Sim 6.0a Xilinx tools FPGA Kit 8051 Development Kit

Keil Software Flash Magic (Rom burning)

Introduction to Embedded Systems


The embedded system is a combination of computer hardware, software additional electrical & mechanical parts. A computer is used in such devices primarily as a means to simplify the system design and to provide flexibility. Often the user of the device is not even aware that a computer is present. Electronic devices that incorporate a computer (usually a microprocessor) within their implementation These are Real-time systems process events.These events occur on external inputs cause other events to occur as outputs.Minimizing response time is usually a primary objective, or otherwise the entire system may fail to operate properly. Therefore Embedded systems employ the use of a RTOS (Real-Time Operating System) It is an Operating Systems with the necessary features to support a RealTime System Real-Time System A system where correctness depends not only on the correctness of the logical result of the computation, but also on the result delivery time. It responds in a timely, predictable way to unpredictable external stimuli arrivals. The real Time Systems can be further divided into two types: Soft Real-Time System 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.

Programmin g

Logical/Digi tal Design Embedded Systems

Computer Systems Organization

Embed ded & Real Time System s

DSP Advanced Digital Design (Synthesi s) VLSI/ASI C & SoC Design Control System s

10

Programming Languages Used in New Embedded Designs

90.0% 80.0% 70.0% 60.0% 50.0% 40.0% 30.0% 20.0% 10.0% 0.0% Assembly C C++ Java Other

1998-1999 1999-2000

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 Industrial control equipment 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 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

14

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

15

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-phone-line interface. In addition to their use in mass-produced products like these, its 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 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 single-board 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.

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 16 bit program counter(PC) and data pointer(DPTR) 8 bit program status word(PSW) 8 bit stack pointer Internal ROM of 0(8031) to 4K(8051) Internal RAM of 128 Bytes 4 register banks 00-1f 16 bytes(bit addressable) 20-2f 80 bytes of general purpose data memory 30-7f 32 I/O pins arranged as four 8 bit ports (P0 P3) 2 16-bit timer/counters: T0 and T1 Full duplex serial data receiver/transmitter: SBUF Control registers: TCON, TMOD, SCON, PCON, IPand IE 2 external and 3 internal interrupt sources Oscillator and clock circuits

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.

Micro Vision 2 is an interegated development Environment that Combines Project management Source Code Editing Program debugging. CSI ANSI: It is an optyimizing c Cross compiler that creates relocatable object modules from the C code. ASI Macro Assembler : It assembles the assembly language program from the source code. The BL51 linker/locator: It combines relocatable object modules that are created by the relocatable object6 modules created by the c51 compiler and the A51 assembler into absolute object module. 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. The RTX51 real time operating system simpifies the design of the complex, time critical software projects.

21

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.

22

So this project gives an illustration of actual modern metro train controlled through embedded electronics control system. Implementation: This project is implemented using the following kit VPL-ET: VPL-ET Embedded trainer has been design by using Phillips 879C61X2/ microchip PIC16F877/ Motorola 68HC11 Micro controller. This controller provide in system as well as in application programming so that one may be able to write program and download directly in the controller through serial port without removing it from the system

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

23

Interfacing an LCD to the 8051

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.

24

PIN DESCRIPTION OF LCD PIN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Symbol V V V RS R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 I/O ---I 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

VCC , VSS , VEE VCC- provides +5 volt

25

VSS provides gnd VEE is used to control LCD contrast

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

26

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.

The following table lists the instruction command codes: Code ( HEX) 1 2 4 6 5 7 8 A C E F 10 14 18 1C 80 C0 38 Command to LCD instuction Register Clear display screen Return Home Decrement Cursor ( shift cursor to Left) Increment cursor (shift cursor to right ) Shift display right Shift display left Display off , Cursor off Display off , Cursor on Display on , Cursor off Display on , Cursor blinking Display on , Cursor Blinking Shift cursor position to left Shift cursor position to right Shift the entire display to the left Shift the entire display to the right Force cursor to beginning of 1st line Force cursor to beginning of 2nd line 2 Lines and 5x7 matrix

27

CIRCUIT DIAGRAM

28

Port 0 pins connected to LCD data lines

LEDs

/*PROGRAM FOR METRO RAILWAY PROTOTYPE */

LCD DISPLAY (For displaying the message)

8 0 5 1

Port 2 pins connected to LCD control lines (p2.0RW/p2.1- RS/p2.2-EN)

Project Code

29

ajmp main lcd_cmd: mov p0,a clr p2.0 clr p2.1 setb p2.2 acall delaya clr p2.2 ret lcd_write: mov p0,a setb p2.1 clr p2.0 setb p2.2 acall delaya clr p2.2 ret varanasi: mov a,r0 acall lcd_cmd mov a,#'V' acall lcd_write mov a,#'N' acall lcd_write

;varanasi

30

mov a,#'S' acall lcd_write ret delaya: mov r4,#250d a1:mov r3,#50 againa: djnz r3,againa djnz r4,a1 ret bhadohi: i mov a,r0 acall lcd_cmd mov a,#'B' acall lcd_write mov a,#'D' acall lcd_write mov a,#'H' acall lcd_write ret allahabad: ad mov a,r0 acall lcd_cmd mov a,#'A' acall lcd_write mov a,#'L' acall lcd_write

;bhadoh

;allahab

31

mov a,#'D' acall lcd_write ret upjourney: ;upjourneytext mov a,r0 acall lcd_cmd mov a,#'U' acall lcd_write mov a,#'P' acall lcd_write mov a,#' ' acall lcd_write mov a,#'J' acall lcd_write mov a,#'O' acall lcd_write mov a,#'U' acall lcd_write mov a,#'R' acall lcd_write mov a,#'N' acall lcd_write mov a,#'E' acall lcd_write mov a,#'Y' acall lcd_write ret

32

downjourney: ;downjourneytext mov a,r0 acall lcd_cmd mov a,#'D' acall lcd_write mov a,#'O' acall lcd_write mov a,#'W' acall lcd_write mov a,#'N' acall lcd_write mov a,#' ' acall lcd_write mov a,#'J' acall lcd_write mov a,#'O' acall lcd_write mov a,#'U' acall lcd_write mov a,#'R' acall lcd_write mov a,#'N' acall lcd_write mov a,#'E' acall lcd_write mov a,#'Y' acall lcd_write

33

ret cs: ;current station mov a,r0 acall lcd_cmd mov a,#'C' acall lcd_write mov a,#'U' acall lcd_write mov a,#'R' acall lcd_write mov a,#'R' acall lcd_write mov a,#'E' acall lcd_write mov a,#'N' acall lcd_write mov a,#'T' acall lcd_write mov a,#' ' acall lcd_write mov a,#'S' acall lcd_write mov a,#'T' acall lcd_write mov a,#'A' acall lcd_write mov a,#'T'

34

acall lcd_write mov a,#'I' acall lcd_write mov a,#'O' acall lcd_write mov a,#'N' acall lcd_write ret pn: ;previous next mov a,r0 acall lcd_cmd mov a,#'P' acall lcd_write mov a,#'R' acall lcd_write mov a,#'E' acall lcd_write mov a,#'V' acall lcd_write mov a,#'I' acall lcd_write mov a,#'O' acall lcd_write mov a,#'U' acall lcd_write mov a,#'S' acall lcd_write

35

mov a,#' ' acall lcd_write mov a,#'N' acall lcd_write mov a,#'E' acall lcd_write mov a,#'X' acall lcd_write mov a,#'T' acall lcd_write ret led1: 1 pattern for upjourney mov p3,#20h acall delaya mov p1,#01h acall delaya mov p1,#03h acall delaya mov p1,#07h acall delaya mov p1,#0fh acall delaya mov p1,#1fh acall delaya mov p1,#3fh acall delaya mov p1,#7fh

;led

36

acall delaya mov p1,#0ffh acall delaya ret ;led3 pattern for downjourney led3: mov p3,#20h acall delaya mov p1,#80h acall delaya mov p1,#0c0h acall delaya mov p1,#0e0h acall delaya mov p1,#0f0h acall delaya mov p1,#0f8h acall delaya mov p1,#0fch acall delaya mov p1,#0feh acall delaya mov p1,#0ffh acall delaya ret delay1: ;mov r2,#00h ;ackb: inc r2

37

;acall led1 ;cjne r2,#0ah,backb ;ret ;delay1 mov tmod,#01h mov r5,#00h backe: mov th0,#00h mov tl0,#00h setb tr0 back1: jnb tf0,backb sjmp out1 backb: acall led1 sjmp back1 out1: clr tr0 clr tf0 inc r5 cjne r5,#03h,backe ret delay3: ;delay3 mov tmod,#01h mov r6,#00h backf: mov th0,#00h mov tl0,#00h setb tr0 back3: jnb tf0,backa sjmp out backa: acall led3

38

sjmp back3 out: clr tr0 clr tf0 inc r6 cjne r6,#03h,backf ret delay: ;delay mov tmod,#01h mov r4,#00h backd: mov th0,#00h mov tl0,#00h setb tr0 backc: jnb tf0,backc clr tr0 clr tf0 inc r4 cjne r4,#03h,backd ret u: mov p1,#00h mov p3,#00h mov a,#38h acall lcd_cmd mov a,#01h acall lcd_cmd mov a,#0eh acall lcd_cmd

;turn off all leds

39

mov r0,#80h ;acall lcd_cmd acall upjourney mov r1,#00h again:inc r1 acall delay cjne r1,#03h,again mov a,#01h acall lcd_cmd acall cs first line mov r0,#0c0h second line acall varanasi mov p1,#00h mov p3,#08h mov r1,#00h again1:inc r1 acall delay cjne r1,#03h,again1 mov p1,#00h mov p3,#10h mov r1,#00h again2:inc r1 acall delay cjne r1,#03h,again2 mov a,#01h acall lcd_cmd

;print upjourney ;delay of 5sec

;clear screen ;print current station on ;print varanasi on

;turn on red led ;delay of 5sec

;turn on yellow led ;delay of 5sec

;clear screen

40

mov r0,#80h acall pn first line mov r0,#0c0h second line acall varanasi mov r0,#0cch acall bhadohi second line mov r1,#00h leds blinking again3:inc r1 acall delay1 cjne r1,#03h,again3 mov a,#01h acall lcd_cmd mov r0,#80h acall cs first line mov r0,#0c0h second line acall bhadohi mov p1,#00h mov p3,#08h mov r1,#00h again4:inc r1 acall delay cjne r1,#03h,again4

;print previous next on ;print varanasi on

;print bhadohi on ;delay of 5sec with

;clear screen

;print current station on ;print bhadohi on

;turn on red led ;delay of 5sec

41

mov p1,#00h mov p3,#10h mov r1,#00h again5:inc r1 acall delay cjne r1,#03h,again5 mov a,#01h acall lcd_cmd mov r0,#80h acall pn first line mov r0,#0c0h second line acall bhadohi mov r0,#0cch acall allahabad on second line mov r1,#00h leds blinking again6:inc r1 acall delay1 cjne r1,#03h,again6 mov a,#01h acall lcd_cmd mov r0,#80h acall cs first line

;turn on yellow led ;delay of 5sec

;clear screen

;print previous next on ;print bhadohi on

;print allahabad ;delay of 5sec with

;clear screen

;print current station on

42

mov r0,#0c0h second line acall allahabad mov p1,#00h mov p3,#08h mov r1,#00h again7:inc r1 acall delay cjne r1,#03h,again7 mov p1,#00h mov p3,#10h mov r1,#00h again8:inc r1 acall delay cjne r1,#03h,again8 ret d: mov p1,#00h mov p3,#00h mov a,#38h acall lcd_cmd mov a,#01h acall lcd_cmd mov a,#0eh acall lcd_cmd mov r0,#80h acall downjourney mov r1,#00h

;print

allahabad

on

;turn on red led ;delay of 5sec

;turn on yellow led ;delay of 5sec

;turn off all leds

;print downjourney ;delay of 5sec

43

again9:inc r1 acall delay cjne r1,#03h,again9 mov a,#01h acall lcd_cmd acall cs first line mov r0,#0c0h second line acall allahabad mov p1,#00h mov p3,#08h mov r1,#00h again10:inc r1 acall delay cjne r1,#03h,again10 mov p1,#00h mov p3,#10h mov r1,#00h again11:inc r1 acall delay cjne r1,#03h,again11 mov a,#01h acall lcd_cmd mov r0,#80h acall pn first line

;clear screen ;print current station on ;print allahabad on

;turn on red led ;delay of 5sec

;turn on yellow led ;delay of 5sec

;clear screen

;print previous next on

44

mov r0,#0c0h ;print allahabad on second line acall allahabad mov r0,#0cch acall bhadohi ;print bhadohi on second line mov r1,#00h ;delay of 5sec with leds blinking in opposite direction again12:inc r1 acall delay3 cjne r1,#03h,again12 mov a,#01h ;clear screen acall lcd_cmd mov r0,#80h acall cs ;print current station on first line mov r0,#0c0h ;print bhadohi on second line acall bhadohi mov p1,#00h ;turn on red led mov p3,#08h mov r1,#00h ;delay of 5sec again13:inc r1 acall delay cjne r1,#03h,again13 mov p1,#00h ;turn on yellow led mov p3,#10h mov r1,#00h ;delay of 5sec

45

again14:inc r1 acall delay cjne r1,#03h,again14 mov a,#01h ;clear screen acall lcd_cmd mov r0,#80h acall pn ;print previous next on first line mov r0,#0c0h ;print bhadohi on second line acall bhadohi mov r0,#0cch acall varanasi ;print allahabad on second line mov r1,#00h ;delay of 5sec with leds blinking in opposite direction again15:inc r1 acall delay3 cjne r1,#03h,again15 mov a,#01h ;clear screen acall lcd_cmd mov r0,#80h acall cs ;print current station on first line mov r0,#0c0h ;print varanasi on second line acall varanasi mov p1,#00h ;turn on red led

46

mov p3,#08h mov r1,#00h again16:inc r1 acall delay cjne r1,#03h,again16 mov p1,#00h mov p3,#10h mov r1,#00h again17:inc r1 acall delay cjne r1,#03h,again17 ret main: acall u acall d end

;delay of 5sec

;turn on yellow led ;delay of 5sec

Program List File

47

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 1

MACRO ASSEMBLER A51 V8.00 OBJECT MODULE PLACED IN metro1.OBJ ASSEMBLER INVOKED BY: C:\Keil\C51\BIN\A51.EXE metro1.asm SET(SMALL) DEBUG EP LOC OBJ LINE SOURCE

0000 616A 1 ajmp main 0002 2 lcd_cmd: 0002 F580 3 mov p0,a 0004 C2A0 4 clr p2.0 0006 C2A1 5 clr p2.1 0008 D2A2 6 setb p2.2 000A 112C 7 acall delaya 000C C2A2 8 clr p2.2 000E 22 9 ret 000F 10 lcd_write: 000F F580 11 mov p0,a 0011 D2A1 12 setb p2.1 0013 C2A0 13 clr p2.0 0015 D2A2 14 setb p2.2 0017 112C 15 acall delaya 0019 C2A2 16 clr p2.2 001B 22 17 ret 001C 18 varanasi: ;varanasi 001C E8 19 mov a,r0 001D 1102 20 acall lcd_cmd 001F 7456 21 mov a,#'V' 0021 110F 22 acall lcd_write 0023 744E 23 mov a,#'N' 0025 110F 24 acall lcd_write 0027 7453 25 mov a,#'S' 0029 110F 26 acall lcd_write 002B 22 27 ret 002C 28 delaya: 002C 7CFA 29 mov r4,#250d 002E 7B32 30 a1:mov r3,#50

48

0030 DBFE 31 againa: djnz r3,againa 0032 DCFA 32 djnz r4,a1 0034 22 33 ret 0035 34 bhadohi: ;bhadohi 0035 E8 35 mov a,r0 0036 1102 36 acall lcd_cmd 0038 7442 37 mov a,#'B' 003A 110F 38 acall lcd_write 003C 7444 39 mov a,#'D' 003E 110F 40 acall lcd_write 0040 7448 41 mov a,#'H' 0042 110F 42 acall lcd_write 0044 22 43 ret 0045 44 allahabad: ;allahabad 0045 E8 45 mov a,r0 0046 1102 46 acall lcd_cmd 0048 7441 47 mov a,#'A' 004A 110F 48 acall lcd_write 004C 744C 49 mov a,#'L' 004E 110F 50 acall lcd_write 0050 7444 51 mov a,#'D' 0052 110F 52 acall lcd_write 0054 22 53 ret 0055 54 upjourney: ;upjourne ytext 0055 E8 55 mov a,r0 0056 1102 56 acall lcd_cmd 0058 7455 57 mov a,#'U'

49

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 2 005A 110F 58 acall lcd_write 005C 7450 59 mov a,#'P' 005E 110F 60 acall lcd_write 0060 7420 61 mov a,#' ' 0062 110F 62 acall lcd_write 0064 744A 63 mov a,#'J' 0066 110F 64 acall lcd_write 0068 744F 65 mov a,#'O' 006A 110F 66 acall lcd_write 006C 7455 67 mov a,#'U' 006E 110F 68 acall lcd_write 0070 7452 69 mov a,#'R' 0072 110F 70 acall lcd_write 0074 744E 71 mov a,#'N' 0076 110F 72 acall lcd_write 0078 7445 73 mov a,#'E' 007A 110F 74 acall lcd_write 007C 7459 75 mov a,#'Y' 007E 110F 76 acall lcd_write 0080 22 77 ret 0081 78 downjourney: ;downjourneytext 0081 E8 79 mov a,r0 0082 1102 80 acall lcd_cmd 0084 7444 81 mov a,#'D' 0086 110F 82 acall lcd_write 0088 744F 83 mov a,#'O' 008A 110F 84 acall lcd_write 008C 7457 85 mov a,#'W' 008E 110F 86 acall lcd_write 0090 744E 87 mov a,#'N' 0092 110F 88 acall lcd_write 0094 7420 89 mov a,#' ' 0096 110F 90 acall lcd_write 0098 744A 91 mov a,#'J' 009A 110F 92 acall lcd_write 009C 744F 93 mov a,#'O' 009E 110F 94 acall lcd_write 00A0 7455 95 mov a,#'U'

50

00A2 110F 00A4 7452 00A6 110F 00A8 744E 00AA 110F 00AC 7445 00AE 110F 00B0 7459 00B2 110F 00B4 22 00B5 00B5 E8 00B6 1102 00B8 7443 00BA 110F 00BC 7455 00BE 110F 00C0 7452 00C2 110F 00C4 7452 00C6 110F 00C8 7445 00CA 110F 00CC 744E 00CE 110F 00D0 7454 00D2 110F

96 acall lcd_write 97 mov a,#'R' 98 acall lcd_write 99 mov a,#'N' 100 acall lcd_write 101 mov a,#'E' 102 acall lcd_write 103 mov a,#'Y' 104 acall lcd_write 105 ret 106 cs: ;current station 107 mov a,r0 108 acall lcd_cmd 109 mov a,#'C' 110 acall lcd_write 111 mov a,#'U' 112 acall lcd_write 113 mov a,#'R' 114 acall lcd_write 115 mov a,#'R' 116 acall lcd_write 117 mov a,#'E' 118 acall lcd_write 119 mov a,#'N' 120 acall lcd_write 121 mov a,#'T' 122 acall lcd_write

51

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 3 00D4 7420 00D6 110F 00D8 7453 00DA 110F 00DC 7454 00DE 110F 00E0 7441 00E2 110F 00E4 7454 00E6 110F 00E8 7449 00EA 110F 00EC 744F 00EE 110F 00F0 744E 00F2 110F 00F4 22 00F5 00F5 E8 00F6 1102 00F8 7450 00FA 110F 00FC 7452 00FE 110F 0100 7445 0102 110F 0104 7456 0106 110F 0108 7449 010A 110F 010C 744F 010E 110F 0110 7455 0112 110F 0114 7453 0116 110F 0118 7420 011A 110F 123 mov a,#' ' 124 acall lcd_write 125 mov a,#'S' 126 acall lcd_write 127 mov a,#'T' 128 acall lcd_write 129 mov a,#'A' 130 acall lcd_write 131 mov a,#'T' 132 acall lcd_write 133 mov a,#'I' 134 acall lcd_write 135 mov a,#'O' 136 acall lcd_write 137 mov a,#'N' 138 acall lcd_write 139 ret 140 pn: ;previous next 141 mov a,r0 142 acall lcd_cmd 143 mov a,#'P' 144 acall lcd_write 145 mov a,#'R' 146 acall lcd_write 147 mov a,#'E' 148 acall lcd_write 149 mov a,#'V' 150 acall lcd_write 151 mov a,#'I' 152 acall lcd_write 153 mov a,#'O' 154 acall lcd_write 155 mov a,#'U' 156 acall lcd_write 157 mov a,#'S' 158 acall lcd_write 159 mov a,#' ' 160 acall lcd_write

52

011C 744E 011E 110F 0120 7445 0122 110F 0124 7458 0126 110F 0128 7454 012A 110F 012C 22 012D led1: 012D 75B020 0130 112C 0132 759001 0135 112C 0137 759003 013A 112C 013C 759007 013F 112C 0141 75900F 0144 112C 0146 75901F 0149 112C 014B 75903F 014E 112C 0150 75907F

161 mov a,#'N' 162 acall lcd_write 163 mov a,#'E' 164 acall lcd_write 165 mov a,#'X' 166 acall lcd_write 167 mov a,#'T' 168 acall lcd_write 169 ret 170 ;le d1 pattern for upjourney 171 mov p3,#20h 172 acall delaya 173 mov p1,#01h 174 acall delaya 175 mov p1,#03h 176 acall delaya 177 mov p1,#07h 178 acall delaya 179 mov p1,#0fh 180 acall delaya 181 mov p1,#1fh 182 acall delaya 183 mov p1,#3fh 184 acall delaya 185 mov p1,#7fh

53

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 4 acall delaya mov p1,#0ffh acall delaya 189 ret ;led3 pattern for downjourney 015B 190 led3: 015B 75B020 191 mov p3,#20h 015E 112C 192 acall delaya 0160 759080 193 mov p1,#80h 0163 112C 194 acall delaya 0165 7590C0 195 mov p1,#0c0h 0168 112C 196 acall delaya 016A 7590E0 197 mov p1,#0e0h 016D 112C 198 acall delaya 016F 7590F0 199 mov p1,#0f0h 0172 112C 200 acall delaya 0174 7590F8 201 mov p1,#0f8h 0177 112C 202 acall delaya 0179 7590FC 203 mov p1,#0fch 017C 112C 204 acall delaya 017E 7590FE 205 mov p1,#0feh 0181 112C 206 acall delaya 0183 7590FF 207 mov p1,#0ffh 0186 112C 208 acall delaya 0188 22 209 ret 0189 210 delay1: 211 ;mov r2,#00h 212 ;ackb: inc r2 213 ;acall led1 214 ;cjne r2,#0ah,backb 215 ;ret ;delay1 0189 758901 216 mov tmod,#01h 018C 7D00 217 mov r5,#00h 018E 758C00 218 backe: mov th0,#00h 0191 758A00 219 mov tl0,#00h 0194 D28C 220 setb tr0 0196 308D02 221 back1: jnb tf0,backb 0199 8004 222 sjmp out1 0153 112C 0155 7590FF 0158 112C 015A 22 186 187 188

54

019B 312D 223 backb: acall led1 019D 80F7 224 sjmp back1 019F C28C 225 out1: clr tr0 01A1 C28D 226 clr tf0 01A3 0D 227 inc r5 01A4 BD03E7 228 cjne r5,#03h,backe 01A7 22 229 ret 01A8 230 delay3: ;delay3 01A8 758901 231 mov tmod,#01h 01AB 7E00 232 mov r6,#00h 01AD 758C00 233 backf: mov th0,#00h 01B0 758A00 234 mov tl0,#00h 01B3 D28C 235 setb tr0 01B5 308D02 236 back3: jnb tf0,backa 01B8 8004 237 sjmp out 01BA 315B 238 backa: acall led3 01BC 80F7 239 sjmp back3 01BE C28C 240 out: clr tr0 01C0 C28D 241 clr tf0 01C2 0E 242 inc r6 01C3 BE03E7 243 cjne r6,#03h,backf 01C6 22 244 ret 01C7 245 delay: ;delay 01C7 758901 246 mov tmod,#01h 01CA 7C00 247 mov r4,#00h

55

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 5 01CC 758C00 248 backd: mov th0,#00h 01CF 758A00 249 mov tl0,#00h 01D2 D28C 250 setb tr0 01D4 308DFD 251 backc: jnb tf0,backc 01D7 C28C 252 clr tr0 01D9 C28D 253 clr tf0 01DB 0C 254 inc r4 01DC BC03ED 255 cjne r4,#03h,backd 01DF 22 256 ret 01E0 257 u: 01E0 759000 258 mov p1,#00h ;turn off all leds 01E3 75B000 259 mov p3,#00h 01E6 7438 260 mov a,#38h 01E8 1102 261 acall lcd_cmd 01EA 7401 262 mov a,#01h 01EC 1102 263 acall lcd_cmd 01EE 740E 264 mov a,#0eh 01F0 1102 265 acall lcd_cmd 01F2 7880 266 mov r0,#80h 267 ;acall lcd_cmd 01F4 1155 268 acall upjourney ;print upjourney 01F6 7900 269 mov r1,#00h ;delay of 5sec 01F8 09 270 again:inc r1 01F9 31C7 271 acall delay 01FB B903FA 272 cjne r1,#03h,again 01FE 7401 273 mov a,#01h ;clear screen 0200 1102 274 acall lcd_cmd 0202 11B5 275 acall cs ;print current station on first line 0204 78C0 276 mov r0,#0c0h ;print varanasi on second line 0206 111C 277 acall varanasi 0208 759000 278 mov p1,#00h ;turn on red led 020B 75B008 279 mov p3,#08h 020E 7900 280 mov r1,#00h ;delay of 5sec 0210 09 281 again1:inc r1 0211 31C7 282 acall delay 0213 B903FA 283 cjne r1,#03h,again1

56

mov p1,#00h ;turn on yellow led 0219 75B010 285 mov p3,#10h 021C 7900 286 mov r1,#00h ;delay of 5sec 021E 09 287 again2:inc r1 021F 31C7 288 acall delay 0221 B903FA 289 cjne r1,#03h,again2 0224 7401 290 mov a,#01h ;clear screen 0226 1102 291 acall lcd_cmd 0228 7880 292 mov r0,#80h 022A 11F5 293 acall pn ;print previous next on first li ne 022C 78C0 294 mov r0,#0c0h ;print varanasi on second line 022E 111C 295 acall varanasi 0230 78CC 296 mov r0,#0cch 0232 1135 297 acall bhadohi ;print bhadohi on second line 0234 7900 298 mov r1,#00h ;delay of 5sec with leds blinking 0236 09 299 again3:inc r1 0237 3189 300 acall delay1 0239 B903FA 301 cjne r1,#03h,again3 023C 7401 302 mov a,#01h ;clear screen 023E 1102 303 acall lcd_cmd 0240 7880 304 mov r0,#80h 0242 11B5 305 acall cs ;print current station on first line 0244 78C0 306 mov r0,#0c0h ;print bhadohi on second line 0246 1135 307 acall bhadohi 0248 759000 308 mov p1,#00h ;turn on red led 024B 75B008 309 mov p3,#08h 024E 7900 310 mov r1,#00h ;delay of 5sec 0250 09 311 again4:inc r1 0251 31C7 312 acall delay

0216 759000

284

57

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 6 0253 B903FA 313 cjne r1,#03h,again4 314 mov p1,#00h ;turn on yellow led 0259 75B010 315 mov p3,#10h 025C 7900 316 mov r1,#00h ;delay of 5sec 025E 09 317 again5:inc r1 025F 31C7 318 acall delay 0261 B903FA 319 cjne r1,#03h,again5 0264 7401 320 mov a,#01h ;clear screen 0266 1102 321 acall lcd_cmd 0268 7880 322 mov r0,#80h 026A 11F5 323 acall pn ;print previous next on first li ne 026C 78C0 324 mov r0,#0c0h ;print bhadohi on second line 026E 1135 325 acall bhadohi 0270 78CC 326 mov r0,#0cch 0272 1145 327 acall allahabad ;print allahabad on second line 0274 7900 328 mov r1,#00h ;delay of 5sec with leds blinking 0276 09 329 again6:inc r1 0277 3189 330 acall delay1 0279 B903FA 331 cjne r1,#03h,again6 027C 7401 332 mov a,#01h ;clear screen 027E 1102 333 acall lcd_cmd 0280 7880 334 mov r0,#80h 0282 11B5 335 acall cs ;print current station on first line 0284 78C0 336 mov r0,#0c0h ;print allahabad on second line 0286 1145 337 acall allahabad 0288 759000 338 mov p1,#00h ;turn on red led 028B 75B008 339 mov p3,#08h 028E 7900 340 mov r1,#00h ;delay of 5sec 0290 09 341 again7:inc r1 0291 31C7 342 acall delay 0256 759000

58

0293 B903FA 343 cjne r1,#03h,again7 0296 759000 344 mov p1,#00h ;turn on yellow led 0299 75B010 345 mov p3,#10h 029C 7900 346 mov r1,#00h ;delay of 5sec 029E 09 347 again8:inc r1 029F 31C7 348 acall delay 02A1 B903FA 349 cjne r1,#03h,again8 02A4 22 350 ret 02A5 351 d: 02A5 759000 352 mov p1,#00h ;turn off all leds 02A8 75B000 353 mov p3,#00h 02AB 7438 354 mov a,#38h 02AD 1102 355 acall lcd_cmd 02AF 7401 356 mov a,#01h 02B1 1102 357 acall lcd_cmd 02B3 740E 358 mov a,#0eh 02B5 1102 359 acall lcd_cmd 02B7 7880 360 mov r0,#80h 02B9 1181 361 acall downjourney ;print downjourney 02BB 7900 362 mov r1,#00h ;delay of 5sec 02BD 09 363 again9:inc r1 02BE 31C7 364 acall delay 02C0 B903FA 365 cjne r1,#03h,again9 02C3 7401 366 mov a,#01h ;clear screen 02C5 1102 367 acall lcd_cmd 02C7 11B5 368 acall cs ;print current station on first line 02C9 78C0 369 mov r0,#0c0h ;print allahabad on second line 02CB 1145 370 acall allahabad 02CD 759000 371 mov p1,#00h ;turn on red led 02D0 75B008 372 mov p3,#08h 02D3 7900 373 mov r1,#00h ;delay of 5sec 02D5 09 374 again10:inc r1 02D6 31C7 375 acall delay 02D8 B903FA 376 cjne r1,#03h,again10 02DB 759000 377 mov p1,#00h ;turn on yellow led

59

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 7 02DE 75B010 378 mov p3,#10h 379 mov r1,#00h ;delay of 5sec 02E3 09 380 again11:inc r1 02E4 31C7 381 acall delay 02E6 B903FA 382 cjne r1,#03h,again11 02E9 7401 383 mov a,#01h ;clear screen 02EB 1102 384 acall lcd_cmd 02ED 7880 385 mov r0,#80h 02EF 11F5 386 acall pn ;print previous next on first li ne 02F1 78C0 387 mov r0,#0c0h ;print allahabad on second line 02F3 1145 388 acall allahabad 02F5 78CC 389 mov r0,#0cch 02F7 1135 390 acall bhadohi ;print bhadohi on second line 02F9 7900 391 mov r1,#00h ;delay of 5sec with leds blinking in opposite direction 02FB 09 392 again12:inc r1 02FC 31A8 393 acall delay3 02FE B903FA 394 cjne r1,#03h,again12 0301 7401 395 mov a,#01h ;clear screen 0303 1102 396 acall lcd_cmd 0305 7880 397 mov r0,#80h 0307 11B5 398 acall cs ;print current station on first line 0309 78C0 399 mov r0,#0c0h ;print bhadohi on second line 030B 1135 400 acall bhadohi 030D 759000 401 mov p1,#00h ;turn on red led 0310 75B008 402 mov p3,#08h 0313 7900 403 mov r1,#00h ;delay of 5sec 0315 09 404 again13:inc r1 0316 31C7 405 acall delay 0318 B903FA 406 cjne r1,#03h,again13 02E1 7900

60

031B 759000

0321 7900

0329 7401

032F 11F5

0331 78C0

0337 111C 0339 7900

0341 7401

0347 11B5 0349 78C0

034D 759000

0353 7900

mov p1,#00h ;turn on yellow led 031E 75B010 408 mov p3,#10h 409 mov r1,#00h ;delay of 5sec 0323 09 410 again14:inc r1 0324 31C7 411 acall delay 0326 B903FA 412 cjne r1,#03h,again14 413 mov a,#01h ;clear screen 032B 1102 414 acall lcd_cmd 032D 7880 415 mov r0,#80h 416 acall pn ;print previous next on first li ne 417 mov r0,#0c0h ;print bhadohi on second line 0333 1135 418 acall bhadohi 0335 78CC 419 mov r0,#0cch 420 acall varanasi ;print allahabad on second line 421 mov r1,#00h ;delay of 5sec with leds blinking in opposite direction 033B 09 422 again15:inc r1 033C 31A8 423 acall delay3 033E B903FA 424 cjne r1,#03h,again15 425 mov a,#01h ;clear screen 0343 1102 426 acall lcd_cmd 0345 7880 427 mov r0,#80h 428 acall cs ;print current station on first line 429 mov r0,#0c0h ;print varanasi on second line 034B 111C 430 acall varanasi 431 mov p1,#00h ;turn on red led 0350 75B008 432 mov p3,#08h 433 mov r1,#00h ;delay of 5sec 0355 09 434 again16:inc r1 0356 31C7 435 acall delay 0358 B903FA 436 cjne r1,#03h,again16

407

61

035B 759000

0361 7900

mov p1,#00h led 035E 75B010 438 439 mov r1,#00h

437

;turn on yellow mov p3,#10h ;delay of 5sec

62

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 8 0363 09 440 again17:inc r1 0364 31C7 441 acall delay 0366 B903FA 442 cjne r1,#03h,again17 0369 22 443 ret 036A 444 main: 036A 31E0 445 acall u 036C 51A5 446 acall d 447 end

63

A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 9 SYMBOL TABLE LISTING ------ ----- -------

NAME

TYPE VALUE

ATTRIBUTES

A1 . . . . . . . . C ADDR 002EH A AGAIN. . . . . . . C ADDR 01F8H A AGAIN1 . . . . . . C ADDR 0210H A AGAIN10. . . . . . C ADDR 02D5H A AGAIN11. . . . . . C ADDR 02E3H A AGAIN12. . . . . . C ADDR 02FBH A AGAIN13. . . . . . C ADDR 0315H A AGAIN14. . . . . . C ADDR 0323H A AGAIN15. . . . . . C ADDR 033BH A AGAIN16. . . . . . C ADDR 0355H A AGAIN17. . . . . . C ADDR 0363H A AGAIN2 . . . . . . C ADDR 021EH A AGAIN3 . . . . . . C ADDR 0236H A AGAIN4 . . . . . . C ADDR 0250H A AGAIN5 . . . . . . C ADDR 025EH A AGAIN6 . . . . . . C ADDR 0276H A AGAIN7 . . . . . . C ADDR 0290H A AGAIN8 . . . . . . C ADDR 029EH A AGAIN9 . . . . . . C ADDR 02BDH A AGAINA . . . . . . C ADDR 0030H A ALLAHABAD. . . . . C ADDR 0045H A BACK1. . . . . . . C ADDR 0196H A BACK3. . . . . . . C ADDR 01B5H A BACKA. . . . . . . C ADDR 01BAH A BACKB. . . . . . . C ADDR 019BH A BACKC. . . . . . . C ADDR 01D4H A BACKD. . . . . . . C ADDR 01CCH A BACKE. . . . . . . C ADDR 018EH A BACKF. . . . . . . C ADDR 01ADH A BHADOHI. . . . . . C ADDR 0035H A CS . . . . . . . . C ADDR 00B5H A D. . . . . . . . . C ADDR 02A5H A DELAY. . . . . . . C ADDR 01C7H A

64

DELAY1 . . . . . . C ADDR 0189H A DELAY3 . . . . . . C ADDR 01A8H A DELAYA . . . . . . C ADDR 002CH A DOWNJOURNEY. . . . C ADDR 0081H A LCD_CMD. . . . . . C ADDR 0002H A LCD_WRITE. . . . . C ADDR 000FH A LED1 . . . . . . . C ADDR 012DH A LED3 . . . . . . . C ADDR 015BH A MAIN . . . . . . . C ADDR 036AH A OUT. . . . . . . . C ADDR 01BEH A OUT1 . . . . . . . C ADDR 019FH A P0 . . . . . . . . D ADDR 0080H A P1 . . . . . . . . D ADDR 0090H A P2 . . . . . . . . D ADDR 00A0H A P3 . . . . . . . . D ADDR 00B0H A PN . . . . . . . . C ADDR 00F5H A TF0. . . . . . . . B ADDR 0088H.5 A TH0. . . . . . . . D ADDR 008CH A TL0. . . . . . . . D ADDR 008AH A TMOD . . . . . . . D ADDR 0089H A TR0. . . . . . . . B ADDR 0088H.4 A U. . . . . . . . . C ADDR 01E0H A UPJOURNEY. . . . . C ADDR 0055H A VARANASI . . . . . C ADDR 001CH A

REGISTER BANK(S) USED: 0 A51 MACRO ASSEMBLER METRO1 05/14/2009 11:25:12 PAGE 10

ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S

BIBILOGRAPHY

65

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 66

Datasheets: www.datasheetarchive.com

67

S-ar putea să vă placă și