Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8051 connections for an elevator

Status
Not open for further replies.

kautilya

New Member
hi there,

this is regarding my earlier post of an elevator programmed with 8051.

i am using some spst switches for giving user inputs to the microcontroller for going to a partcular floor as well as responding to inputs outside the lift. i want to monitor the status of the switches by maintaining a queue of order in which the switches are pressed so tht lift stops on floor in the order user requested.

can anyone suggest how do i go abt it?

regards
kautilya
 
If all the microcontroller is doing is just monitoring what floor its going to, you can just create a loop that reads the inputs, then stores them in array or, using pointers to create a stack and push and pop them as needed. You can find source code for a queue online.

if you need to do other tasks with the microcontroller then you can create a timer interupt, to run the loop.

Then when its time to determine what floor you are on, pop the queue, to determine what floor, and do what you need to with that.
 
hi there,

this is regarding my earlier post of an elevator programmed with 8051.

i am using some spst switches for giving user inputs to the microcontroller for going to a partcular floor as well as responding to inputs outside the lift. i want to monitor the status of the switches by maintaining a queue of order in which the switches are pressed so tht lift stops on floor in the order user requested.

can anyone suggest how do i go abt it?

regards
kautilya

Can you post the circuit diagram here ?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top