EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / Hello sirThank you for the

Hello sirThank you for the

|

Microcontroller › PIC › Intelligent ambulance with automatic traffic control › Hello sirThank you for the

June 28, 2016 at 12:46 pm #14029
tadi
Participant

Hello sir

Thank you for the reply.

Well I was asking about how is the remote conneceted to pic microcontroller in the ambulance unit?

We also have a code regardinmg this in which three colours for the traffic are mentioned.

#include “reg51.h”
#include “define.h”
main()
{
Initialise();
while(1)
Traffic_Light();
}

Traffic_AC()
{
here:
YA=0;YC=0;YB=0;YD=0;
GA=1;GC=1;GB=0;GD=0; //A and C side Green; B and D side Red
RA=0;RC=0;RB=1;rD=1;
if(count<50)
{
if(Input==0)
{
while(Input==0);
if(A==1 || C==1) //Ambulance from A or C side
{
Traffic_Light();
}
if(b==1 || D==1) //Ambulance from B or D side
{
Traffic_Light1();
}
}
goto here;
}
count=0;
}
Yellow_BD()
{
here1:
YA=0;YC=0;YB=1;YD=1;
if(count<20)
{
if(Input==0)
{
while(Input==0);
if(A==1 || C==1) //Ambulance from A or C side
{
Traffic_Light();
}
if(b==1 || D==1) //Ambulance from B or D side
{
Traffic_Light1();
}
}

goto here1;
}
count=0;
}
Traffic_BD()
{
here2:
YA=0;YC=0;YB=0;YD=0;
GA=0;GC=0;GB=1;GD=1; //A and C side Green; B and D side Red
RA=1;RC=1;RB=0;rD=0;
if(count<50)
{
if(Input==0)
{
while(Input==0);
if(A==1 || C==1) //Ambulance from A or C side
{
Traffic_Light();
}
if(b==1 || D==1) //Ambulance from B or D side
{
Traffic_Light1();
}
}

goto here2;
}
count=0;
}
Yellow_AC()
{
here3:
YA=1;YC=1;YB=0;YD=0;
if(count<20)
{
if(Input==0)
{
while(Input==0);
if(A==1 || C==1) //Ambulance from A or C side
{
Traffic_Light();
}
if(b==1 || D==1) //Ambulance from B or D side
{
Traffic_Light1();
}
}

goto here3;
}
}
Traffic_Light()
{
Traffic_AC();
Yellow_BD();
Traffic_BD();
Yellow_AC();
}

Traffic_Light1()
{
Traffic_BD();
Yellow_AC();

Traffic_AC();
Yellow_BD();

}

Thats why we are confused with coulour and number of LEDs.

I request you to please look into it.

Thank you.

RSS Recent Posts

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Arrowfly
Privacy Policy | Advertising

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise