Friday 18 December 2015

Video Operation for Queue Control Systems


Circuit Design using Proteus 8 Professional




Program Queue Control Systems Using Keil uVision4

#include <reg51.h>

//**********LIBRARY ADRESS**********//
#define lcd_clear 0x01
#define return_home 0x02
#define dec_cursor 0x04
#define inc_cursor 0x06
#define display_shift_left 0x05
#define display_shift_right 0x07
#define disp_off_cursor_off 0xE0
#define disp_on_cursor_off 0x0C
#define disp_on_cursor_blink 0x0F
#define shift_left_cursor 0x10
#define shift_right_cursor 0x1C
#define first_line 0x80
#define second_line 0xC0
#define lcd_2line 0x38
#define lcd_4bit 0x28
#define lcd_goto1 lcd_command(first_line)
#define lcd_goto2 lcd_command(second_line)
#define lcd_clr lcd_command(lcd_clear)

void delay_displays(unsigned int gap);
void delay_cycle(unsigned int interval);
void send_nibble(unsigned char value);
void lcd_command(unsigned char value);
void lcd_data(unsigned char value);
void lcd_init(void);
void lcd_putc(unsigned char c);
void lcd_puts(unsigned char *txt);

//void lcd_goto(unsigned char line, unsigned char column);

//**********Port Declaration**********//
#define LCD_port P0
sbit RS = P0^1;
sbit EN = P0^2;
sbit SW1 = P0^0;
sbit SW2 = P2^0;
sbit SW3 = P2^1;

void main(void)
{

lcd_init();   

while(1)
{
unsigned char n,x,j,i,interval, ticket;
code unsigned number[] = {0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x67};
code unsigned number1[] = {0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x67};
code unsigned char text1[] = "   PLEASE TAKE";
code unsigned char text2[] = "   YOUR TICKET";
code unsigned char text3[] = "    COUNTER 1  ";
code unsigned char text4[] = "    COUNTER 2  ";
   code unsigned char text5[] = "  PLEASE GO TO";

      if(SW1 == 0)
    {
ticket=i++;

for(x=0; x<ticket; x++)
   {
P1=number1[x];
    delay_displays(25);
}     
           
lcd_goto1;
lcd_puts(text1);
lcd_goto2;
lcd_puts(text2);
   
    }
 
else if(SW2 == 0)
    {
  interval=j++;

for(n=0; n<interval; n++)
   {
P1=number[n];
    delay_displays(25);
}
   
lcd_goto1;
lcd_puts(text5);
lcd_goto2;
lcd_puts(text3);
     
    }

      else if(SW3 == 0)
    {
  interval=j++;

for(n=0; n<interval; n++)
   {
P1=number[n];
    delay_displays(25);
}

lcd_goto1;
lcd_puts(text5);
lcd_goto2;
lcd_puts(text4); 
    }
}  
}
  
//**********Display Delay**********//
void delay_displays(unsigned int gap)
{
unsigned int a, b;
for(a=0; a<gap; a++)
for(b=0; b<1275; b++);
}

//**********LCD Delay**************//
void delay_cycle(unsigned int interval)
{
unsigned int c, d;
for(c=0; c<interval; c++)
{
for(d=0; d<5; d++);
}
}

//**********LCD Program**********//
void send_nibble(unsigned char value)
{
LCD_port=(LCD_port&0x0F)|(value&0x0F0);
EN=1;
delay_cycle(7);
EN=0;
LCD_port=(LCD_port&0x0F)|((value<<4)&0x0F0);
EN=1;
delay_cycle(7);
EN=0;
LCD_port=LCD_port|0X09; //AVOID LATCHUP
}

void lcd_command(unsigned char value)
{
RS=0;
delay_cycle(1);
send_nibble(value);
return;
}

void lcd_data(unsigned char value)
{
RS=1;
delay_cycle(1);
send_nibble(value);
return;
}

void lcd_init(void)
{
LCD_port =0x0F0;
lcd_command(0x33);
lcd_command(0x32);
lcd_command(lcd_4bit); // 4 bit mode
lcd_command(shift_left_cursor); // shift cursor left
lcd_command(inc_cursor); // increment cursor
lcd_command(disp_on_cursor_off); // display on cursor off
lcd_command(lcd_clear); // clear LCD
delay_cycle(20);
}

void lcd_putc(unsigned char c)
{
if(c=='\f')
lcd_command(0x01);
else if(c=='\n')
lcd_command(0xC0);
else
lcd_data(c);
}

void lcd_puts(unsigned char *txt)
{
unsigned char limit=0;
while(*txt)
lcd_putc(*txt++);

}

Monday 14 December 2015

INPUT & OUTPUT REQUIREMENT FOR QUEUE CONTROL SYSTEMS



                   

Thursday 19 November 2015

Queue Control System

INTRODUCTION


Queue Control System have been developed for the purpose of controlling queue in banking, hotel reservation counter, ticket counter, insurance company, customer service centre and so on. The aim of the designed systems is to maintain a queue with order and efficiency because of lack in customer service management, customer can be left confused as to what line to stand in, what counter to go to when called and distracted by noisy and crowded environment. So, Queue Control System is designed to reduce the traffic in the queue flow regarding nowadays people are always spending time while queuing. Basically, this projects more like design and builds a model of Queue Control Systems.


SYSTEM OPERATION

This project is to develop a Queue Control System model that can display a number display module, a queue module and a sound module. The circuit schematic design using Proteus 8 Professional. The system was program by Keil uVision4. The IC used is Atmel AT89C51 where the program is stored inside. With the 5V to the IC, it can power up output component such as Buzzer. In this project, we are using two switch for start and the second switch are for reset. We also using decoder, latch, seven segment, buzzer and voltage regulator circuit. The related information from this system will be displayed at the display module (Seven Segment Display) and Sound Module (Buzzer).

FLOWCHART


BLOCK DIAGRAM


LIST OF COMPONENT


NO

DESCRIPTION

QUANTITY

PRICE PER UNIT
(RM)

PRICE
(RM)

1
Resistor:
10KΩ

3

RM 0.20

RM 0.60

2
Donut Board:
(13x25cm)

1

RM 3.60

RM 3.60

4
Crystal Oscillator:
11.0592Mhz

1

RM 1.30

RM 1.30

5
Capacitor:
330uF


2

RM 0.10

RM 0.20

6
Push Button Switch:
(6*6*2MM 2Pins)


3

RM 0.40

RM 1.20

7

7 Segment Display

1

RM 4.00

RM 4.00

8
Cable:
 (100m black)

1

RM 0.50

RM 0.50

9
ToolStick850DC – UG

1

RM 40.00

RM 40.00

10
LCD Display:
(LM016L)

1

RM 15.00

RM 15.00

TOTAL

RM 66.40