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 / Topics / how to use 89C51 to dirve motor to 17 difrent places & on every place it should stop

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

|

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

  • This topic has 0 replies, 1 voice, and was last updated 13 years, 6 months ago by ZOBI.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • December 26, 2011 at 12:48 pm #1468
    ZOBI
    Participant

    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

  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • ac current limiting July 13, 2025
  • using a RTC in SF basic July 13, 2025
  • It's Amazing What A Buck And A Quarter.... July 13, 2025
  • Microinverters and storeage batteries? July 13, 2025
  • More fun with ws2812 this time XC8 and CLC July 13, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media 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 WTWH Media
Privacy Policy | Advertising | About Us

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