2 digit token display system report

Upload: deardestiny

Post on 05-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 2 Digit Token Display System Report

    1/9

    2-DIGIT TOKEN DISPLAY

    SYSTEM

    1

  • 7/31/2019 2 Digit Token Display System Report

    2/9

    CONTENTS

    1. Introduction

    2.

    Circuit Diagram

    3. Circuit Description

    4. 8051 Microcontroller Architecture

    5. Source code

    6. Bibliography

    2

  • 7/31/2019 2 Digit Token Display System Report

    3/9

    2-DIGIT TOKEN DISPLAY SYSTEM

    INTRODUCTION:2-Digit Token Display System are ideal for Banks, Airports, Public dealing offices,

    Hospitals, Doctors Clinics, Restaurants and other such places where people have to wait in

    line for their turn. These systems allow customers to wait without having to stand in line,once their number is displayed then only will they have to get in line for their turn.

    PROJECT SUMMARY:

    The inconvenience encountered in many public dealing places like restaurants,

    banks, and canteens etc. where people normally follow queue system has called for many

    solutions to speed up and ease the dealings. In this project, we show a microcontrollerbased 2 digit token number display system to overcome the inconvenience mentioned

    above. We are using microcontroller 89c51 as CPU. Tokens are distributed on first come

    first serve basis and as soon as any counter are ready to provide services the person therejust has to press one push switch to show the incremented token number and respective

    counter number in displays. Whenever counter has to be stopped another switch is pressed

    and a message WAIT is displayed. Now when this switch is again pressed, messageREADY TO SEND is displayed and counter starts from the previous location. Using this

    system the customers need not wait in long queues in sunlight or rain and wasting time, but

    come to get their order once their token number is displayed in the large customer display.

    It consists of two portions: a display unit and a processing unit.

    CIRCUIT DIAGRAM:

    The circuit diagram is shown in figure below-

    3

  • 7/31/2019 2 Digit Token Display System Report

    4/9

    CIRCUIT DESCRIPTION:

    LCD is connected with the port 1 of the MC. One seven segment display is

    connected to port 0 and second seven segment is connected to port 2.

    The two seven segments used is LT542 i.e. anode type. Every time switch s1 ispressed counter is increased and the corresponding number is displayed on the seven

    segment. Number which is displayed on the seven segment is simultaneously displayed on

    LCD.

    And when switch s2 is pressed counter is stopped and wait message is displayedon LCD.Now counter will be incremented only when s2 is again pressed. And ready to

    send will be displayed on LCD. Switch s3 is used for resetting the counter.

    8051 MICROCONTROLLER ARCHITECTURE:

    4

  • 7/31/2019 2 Digit Token Display System Report

    5/9

    The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with

    4K bytes of Flash programmable and erasable read only memory (PEROM). The device ismanufactured using Atmels high-density nonvolatile memory technology.The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of

    RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a

    full duplex serial port, on-chip oscillator and clock circuitry.

    Pin Configuration:

    SOURCE CODE

    The coding of the token display system prototype is in the assembly language.

    org 0000h

    5

  • 7/31/2019 2 Digit Token Display System Report

    6/9

    lcd equ p1rs equ p3.3rw equ p3.2en equ p3.1org 0h

    acall lcd1mov r7,#0h

    go1:mov p0,#0c0hacall gomov p0,#0f9hacall gomov p0,#0a4hacall gomov p0,#0b0h

    acall gomov p0,#99hacall gomov p0,#92hacall gomov p0,#82hacall gomov p0,#0f8hacall gomov p0,#80hacall go

    mov p0,#90hacall gosjmp go1

    go:mov p2,#0c0hacall delayacall cnmov p2,#0f9hacall delayacall cn

    mov p2,#0a4hacall delayacall cnmov p2,#0b0hacall delayacall cnmov p2,#99hacall delay

    6

  • 7/31/2019 2 Digit Token Display System Report

    7/9

    acall cnmov p2,#92hacall delayacall cnmov p2,#82h

    acall delayacall cnmov p2,#0f8hacall delayacall cnmov p2,#80hacall delayacall cnmov p2,#90hacall delayacall cn

    ret

    delay:mov r3,#1hhj: mov r1,#0ffhgh: mov r2,#0ffhty: djnz r2,ty

    djnz r1,ghdjnz r3,hjret

    cmd:mov lcd,aclr rsclr rwsetb enacall delay1clr enret

    dat:mov lcd,a

    setb rsclr rwsetb enacall delay1clr enret

    lcd1:

    7

  • 7/31/2019 2 Digit Token Display System Report

    8/9

    mov a,#38hacall cmdmov a,#01hacall cmdmov a,#06h

    acall cmdmov a,#0ehacall cmdmov a,#80hacall cmdret

    cn:mov a,r7mov b,#0ahdiv ab

    mov 47h,bmov b,#0ahdiv abmov 46h,bmov a,#30hadd a,46hacall datmov a,#30hadd a,47hacall dat

    loop:jnb p3.6,goajnb p3.7,ngoasjmp loopgoa:mov a,#01hacall cmdinc r7ret

    ngoa:

    mov a,#01hacall cmdmov dptr,#k1godf:clr amovc a,@a+dptrjz heracall dat

    8

  • 7/31/2019 2 Digit Token Display System Report

    9/9

    inc dptrsjmp godfher:acall delayacall delay

    here:jnb p3.7,jfsjmp herejf:acall delaymov a,#01hacall cmdmov dptr,#k2tyr:clr amovc a,@a+dptr

    jz loopacall datinc dptrsjmp tyrdelay1:mov r6,#23hsj: mov r5,#0ffhry: djnz r5,ry

    djnz r6,sjret

    k1: db 'WAIT', 0

    k2: db 'READY TO SEND, 0end

    BIBLOGRAPHY:

    INTRODUCTION TO 8051 MICROCONTROLLER MAZIDI

    INTRODUCTION TO 8051 MICROCONTROLLER AYALA

    SEDRA SMITH

    9