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 / ‘c’ code for stepper motor

‘c’ code for stepper motor

|

Microcontroller › 8051 › ‘c’ code for stepper motor

  • This topic has 4 replies, 3 voices, and was last updated 13 years, 1 month ago by nikhiljain.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • September 10, 2010 at 7:41 pm #406
    poonam
    Participant

    hi………… i need ‘c’ code for stepper motor which rotate stepper motor up and down.

    May 12, 2012 at 9:48 pm #7753
    D.V.G. Krishna
    Participant

    first you need to find the type of stepper you are using.

    incase of unipolar stepper then

    the control algorithm willbe

    if(condition for forword)

    while(condition for forword)

    { 

    control port=0x11;   0001

           delay(); define as per the motor

    control port=0x22;   0010

           delay();

    control port=0x44;   0100

           delay();

    control port=0x88;   1000

           delay();

    if(condition for backword)

    while(condition for backword)

    {

    control port=0x88;   1000

           delay();

    control port=0x44;   0100

           delay();

    control port=0x22;   0010

           delay();

    control port=0x11;   0001

           delay();

    }

    May 12, 2012 at 9:48 pm #7773
    D.V.G. Krishna
    Participant

    first you need to find the type of stepper you are using.

    incase of unipolar stepper then

    the control algorithm willbe

    if(condition for forword)

    while(condition for forword)

    { 

    control port=0x11;   0001

           delay(); define as per the motor

    control port=0x22;   0010

           delay();

    control port=0x44;   0100

           delay();

    control port=0x88;   1000

           delay();

    if(condition for backword)

    while(condition for backword)

    {

    control port=0x88;   1000

           delay();

    control port=0x44;   0100

           delay();

    control port=0x22;   0010

           delay();

    control port=0x11;   0001

           delay();

    }

    May 14, 2012 at 6:39 am #7780
    nikhiljain
    Participant

    such projects are available on this site.. please browse thru EG Labs projects before posting such threads.

     

    FYI check : http://www.engineersgarage.com/microcontroller/8051projects/stepper-motor-control-ULN2003-at89c51-project-code-circuit

    May 14, 2012 at 6:39 am #7796
    nikhiljain
    Participant

    such projects are available on this site.. please browse thru EG Labs projects before posting such threads.

     

    FYI check : http://www.engineersgarage.com/microcontroller/8051projects/stepper-motor-control-ULN2003-at89c51-project-code-circuit

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

RSS Recent Posts

  • Fun with AI and swordfish basic June 22, 2025
  • Microinverters and storeage batteries? June 22, 2025
  • FFC connector white June 22, 2025
  • Is AI making embedded software developers more productive? June 22, 2025
  • Can I make two inputs from one?? June 22, 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