MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM full report
#2

project source code in C

Code:
#include<89c51rd2.h>
#include <stdio.h>
unsigned char code arr1[]="\n1.Water Level Status\n2.Dam Gate Control\n3.Damsate status\n";
unsigned char code arr2[]="\n1.Lower the gate by X cms\n2.raise the gate by X cms\n3.main menu\n";
unsigned char code arr3[]={0x03,0x06,0x0c,0x09};
unsigned char code arr4[]={0x09,0x0c,0x06,0x03};
unsigned int i,j,s;
char sbuf;
void look(void);
void delay(void);
void anglecontrol(void);
void look1(void);
void look2(void);
void ccw(void);
void cw(void);
void status(void);
void gatestatus(void);

void main(void)
    {    P0=0x00;
        SCON=0x42;
        TMOD=0x20;
        TH1=0x0FD;
        TR1=1;
        REN=0x01;
        TI=1;
        look();
     }

void look(void)
{
    printf("%s\n",arr1);
    lp1:if(RI)
        {
        s=SBUF;
        RI=0;
        goto lp2;
        }

    if(s==0)
    {
        goto lp1;
    }
    lp2:while(1)
        {
          if (s==0x31)
          {
          s=0;
          status();
          }
          else if(s==0x32)
          {
          s=0;
          anglecontrol();
          }
                  else if(s==0x33)
          {
          s=0;
          gatestatus();
          }
          else
          {
          s=0;
          printf("wrong choice\n");
          look();
          }
        }
}

void status(void)
{
          if(P0==0x80)
          {
          printf("water level low\n");
          look();
          }
          else if(P0==0x40)
          {
          printf("water level medium\n");
          look();
          }
          else if(P0==0x20)
          {
          printf("water level high\n");
          look();
          }
          else if(P0==0x10)
          {
          printf("water overflow\n");
          look();
          }
          else
          {
          printf("no status detected\n");
          look();
          }
}

void gatestatus(void)
{
          if(P0==0x7F)
          {
          printf("dam gate is at 1feet\n");
          look();
          }
          else if(P0==0x3F)
          {
          printf("dam gate is at 2feet\n");
          look();
          }
          else if(P0==0x1F)
          {
          printf("dam gate is at 3feet\n");
          look();
          }
          else if(P0==0x00)
          {
          printf("gate is completely opened\n");
          look();
          }
          else
          {
          printf("no status detected\n");
          look();
          }
}


void anglecontrol(void)
{
    printf("%s\n",arr2);
    lp3:if(RI)
        {
        s=SBUF;
        RI=0;
        goto lp4;
        }

    if(s==0)
    {
        goto lp3;
    }
    lp4:while(1)
        {
          if(s==0x31)
          {
          s=0;
          cw();
          anglecontrol();
          }
          else if(s==0x32)
          {
          s=0;
          ccw();
          anglecontrol();
          }
          else if(s==0x33)
          {
          s=0;
          look();
          }
          else
          {
          s=0;
          printf("wrong choice\n");
          anglecontrol();
          }
        }
}

void cw(void)
{for(i=0;i<=3;i++)
{
P2=arr3[i];
delay();
}

}

void ccw(void)
{for(i=0;i<=3;i++)
{
P2=arr4[i];
delay();
}
}

void delay(void)
{
for (j=1;j<3900;j++)
   {
   ;
   }
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: microcontrolledbased dam gate controll system,
Popular Searches: roosevelt dam, microcontroller based automatic dam gate control system, automatic dam gate control wiki, automatic dam gate control system with caution alarm pdf report, advantages and disadvantages of microcontroller based dam gate control system, seminar report of piano key spillway of dam, naramada dam 2012,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Messages In This Thread
RE: MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM full report - by project topics - 10-05-2011, 04:18 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Remote Controlling of Greenhouse Agriculture System by Microcontroller and Bluetooth smart paper boy 2 3,008 12-01-2018, 12:40 PM
Last Post: dhanabhagya
  AUTOMATIC STREET LIGHT CONTROL WITH SENSOR TECHNOLOGY seminar class 2 11,627 22-05-2017, 11:07 AM
Last Post: yasminoth93
  FINGER PRINT BASED ELECTRONIC VOTING MACHINE full report project topics 60 50,675 11-05-2017, 10:43 AM
Last Post: jaseela123d
  VECTOR CONTROL DRIVE OF PERMANENT MAGNET SYNCHRONOUS MOTOR USING MATLAB/SIMULINK seminar class 2 12,142 05-04-2017, 01:18 PM
Last Post: surya256
  Voice Based Automated Transport Enquiry System seminar class 2 3,164 05-10-2016, 09:34 AM
Last Post: ijasti
  GSM based Control Panel for Agricultural and Domestic Water Pumps seminar addict 4 24,342 08-09-2016, 10:58 AM
Last Post: ijasti
  AUTOMATIC BUS STATION ANNOUNCEMENT SYSTEM full report project report tiger 4 10,805 13-08-2016, 11:16 AM
Last Post: jaseela123d
  DEVELOPMENT OF SOFTWARE & HARDWARE FOR MICROCONTROLLER BASED SMART NOTICE BOARD (US Electrical Fan 3 3,858 09-08-2016, 11:27 AM
Last Post: jaseela123d
  GSM based SCADA implementation using Microcontroller project report tiger 19 27,552 31-05-2016, 12:13 PM
Last Post: dhanabhagya
  Microcontroller Based Cellular Voting Machine seminar projects crazy 5 6,591 10-05-2016, 04:19 PM
Last Post: pankaj raj

Forum Jump: