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.

how to use 89C51 to dirve motor to 17 difrent places & on every place it should stop

Status
Not open for further replies.

Zohaibmaroof

Member level 2
Joined
Oct 10, 2010
Messages
50
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,832
how to use 89C51 to dirve motor to 17 difrent places & on every place it should stop

i want to make a program which drive a motor to 17 different places an stop on every place then ti will remain there at a given timer value , program will start in this way that at 1st operator or USER will enter timer value for example 10 mins for sensor 1 (1st place where motor should stop) then enter the value 1 hour for sensor 2 2nd place where motor should stop) and son on for further remaining sensors, after all values are given by User/operator then the motor will move and stop at sensor 1 spends its given time and then move to sensor 2 and so on , problem is how should i use 8 registers of 89C51 for saving timer or DELAY values for 17 sensors if it is only 1 or 2 sensor 1 will be easy but how will save all 17 sensor values using 89C51 registers


this is the program written in ASSEMBLY language this program will move 2 motors 1st X axis motor then stop at sensor then move Y AXIS motor in downward direction then remains there at User given time then after that move upward then x-axis motor , The line "Chamber_delay:" is that line after that line the user given Delay /timer value will be placed . please help me out how to put that value this program will be written same for 17 times for 17 sensors , this is for checking purpose work for only 1 sensor

org 000h
clr p1.0
clr p1.2
clr p1.4

setb p1.0 ;1 starts motor x in forward direction
Lp1: JB p1.1,Lp1 ;Continue to move motor as long as p1.1 is high
clr p1.0 ;1 stops motor x
setb p1.2 ;1 starts motor y in downward direction
Lpp1: JB p1.3,Lpp1 ;Continue to move motor as long as p3.0 is high
clr p1.2 ;1 stops motor y
Chamber_delay:



setb p1.4 ;1 starts motor y in upward direction
Lpp2: JB p1.5,Lpp2 ;Continue to move motor as long as p1.5 is high
clr p1.4

end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top