Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

graduation elevator project

Status
Not open for further replies.

suhail iskndrany

Newbie level 3
Joined
Mar 11, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
Hi,
I have a 3 floor elevator project with level sensors(limit switch) on every of them and 3 pushbuttons (one for first, one for second and one for third floor) outside the door.
I built a prototype
i will use pic microcontroller
PIC 16F874A/877A
to control elevator
I need the basic programm (to go up/down/stop where ordered) using Pic C Compiler.
can you help me???plzzzzzzz
 

this part is not of my spiciliest
it was for my ex-partner & I have no time to lern programming
the programing is part of the project but not all

---------- Post added at 15:06 ---------- Previous post was at 14:56 ----------

my job is to integrate embeded system not to program
they lern us just to program motorola
I didn't know how to program pic
 

hi,
this code is for my elevator project (using using pic c)
[ 3 floors with 3 pushbuttom & 3 limit switches] al are outside.
but ther is aproblem, that u should keep pressing on pushbuttom to order the elevator room...
any advices?????
thanks in advance



//////////////////Initiliziation///////////////////////
#include <16f877a.h>
#fuses hs,NOWDT
#use delay(clock=8000000)
#bit t1_overflow=0x0C.0
set_tris_b(0b11111111);//define port B as input port
set_tris_c(0b11111111);//define port C as input port
/////////////////////Main Program///////////////////////////////////
void main() {

int Sensor;
int Order;
start:
Order= input_C();
Sensor= input_B();
if (Order==Sensor)
{
output_low(PIN_a0);
output_low(PIN_a1);
goto start;
}
else if(Sensor > Order)
{
output_high(PIN_a0);
output_low(PIN_a1);
}
else
{
output_high(PIN_a1);
output_low(PIN_a0);
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top