c language code for automatic gate control
#1

we tried this source code for automatic railway gate.. it doesnot show any error while compiling in keil.
but we are not getting the output in proteus.. it is correct until the gate opens.. bt nothing else happens after that. pls help


#include<reg51.h>
sbit ir1=P1^6;
sbit ir2=P1^7;
sbit lm0=P2^0;
sbit lm1=P2^1;
sbit rm0=P2^2;
sbit rm1=P2^3;
sbit BUZ_PIN = P1^0;
sbit Yellow_LED_1 = P1^3 ;//indicator
sbit GATE_CLOSE_LED = P1^1;//red
sbit GATE_OPEN_LED = P1^2;//green

#define BUZZ_ON 0
#define BUZZ_OFF 1
#define LED_ON 0
#define LED_OFF 1

void delay(int t);
void closegateact(void);
void opengateact(void);
void switchOnBuzzer(void);
void switchOffBuzzer(void);
void gateClose(void);
void gateOpen(void);
void switchOnCloseGate_LED(void);
void switchOnOpenGate_LED(void);
void switchOffOpenGate_LED(void);
void switchOnYellowLeds(void);
void switchOffBlinkingLeds(void);


void closegateact(void)
{
switchOnYellowLeds();
switchOnBuzzer();
delay(500);
switchOffBuzzer();
gateClose();
switchOnCloseGate_LED();
switchOffOpenGate_LED();
}
void opengateact(void)
{
switchOffBlinkingLeds();
gateOpen();
switchOnOpenGate_LED();
}
void switchOffBlinkingLeds()
{
Yellow_LED_1= LED_OFF ;
GATE_CLOSE_LED= LED_OFF ;
}
void gateClose(void)
{
lm0=0;
lm1=1;
rm0=0;
rm1=1;

}

void gateOpen(void)
{
lm0=1;
lm1=0;
rm0=1;
rm1=0;
}

void switchOnBuzzer(void)
{
BUZ_PIN = BUZZ_ON;
}

void switchOffBuzzer(void)
{
BUZ_PIN = BUZZ_OFF;
}

void switchOnCloseGate_LED(void)
{
GATE_CLOSE_LED = LED_ON;
}



void switchOnOpenGate_LED(void)
{
GATE_OPEN_LED = LED_ON;
}

void switchOffOpenGate_LED(void)
{
GATE_OPEN_LED = LED_OFF;
}
void delay(int t)
{
int i,j;
for(i=0;i<t;i++)
{
for(j=0;j<1275;j++);
}
}
void switchOnYellowLeds(void)
{
Yellow_LED_1 = LED_ON;
}

void main()
{
while(1)
{
if((ir1==1)&&(ir2==1))
{
switchOnOpenGate_LED();
}
if((ir1==0)&&(ir2==1))
{
delay(500);
closegateact();
delay(500);
}
if((ir1==1)&&(ir2==0))
{
opengateact();
}
}
}
Reply
#2

To get full information or details of c language code for automatic gate control please have a look on the pages

http://studentbank.in/report-c-language-...te-control

if you again feel trouble on c language code for automatic gate control please reply in that page and ask specific fields in c language code for automatic gate control
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
Popular Searches: automatic gate control code in asm,

[-]
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)

Possibly Related Threads...
Thread Author Replies Views Last Post
  karmasangsthan newspaper in bengali language karmasangsthan newspaper in bengali language karmasangsthan newspaper in be 77 385,726 23-09-2020, 05:22 PM
Last Post: @satym_sk9
  block diagram of low cost automatic gate light with musical bell 1 7,271 06-10-2018, 05:46 AM
Last Post: Guest
  mba project inventory control of tata motors 1 3,552 20-03-2018, 10:50 AM
Last Post: Guest
  circuit diagram dc motor speed and direction control over gsm mobile modem pdf 2 15,084 19-03-2018, 10:57 AM
Last Post: Guest
Tongue ppt slides on sliding mode scheme for speed and current control of brushless dc bldc motor 7 2,572 16-01-2018, 11:41 AM
Last Post: dhanabhagya
  advanced control theory nagoor kani free download pdf 7 4,447 25-11-2017, 07:35 AM
Last Post: Guest
  literature review of an automatic room light controller with bi directional visitor counter 4 2,268 24-10-2017, 09:53 AM
Last Post: jaseela123d
  to design an appropriate logic gate combinatin for a given truth table 1 5,536 13-10-2017, 10:26 AM
Last Post: Akash Mendhe
  automatic touch screen based vehicle driving system pdf 3 2,333 17-08-2017, 11:28 AM
Last Post: rajukuraganti
  automatic paper cutting machine by using geneva mechanism working 2 6,938 14-08-2017, 01:09 PM
Last Post: Guest

Forum Jump: