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 / Bipolar Stepper Motor 8051 C-program is needed!!! Please share if anybody have one.

Bipolar Stepper Motor 8051 C-program is needed!!! Please share if anybody have one.

|

Microcontroller › 8051 › Bipolar Stepper Motor 8051 C-program is needed!!! Please share if anybody have one.

  • This topic has 3 replies, 4 voices, and was last updated 12 years, 7 months ago by venkatraman.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 5, 2013 at 11:58 am #2233
    Liquid
    Participant

    Bipolar Stepper Motor 8051 C-program is needed!!! Please share if anybody have one.Thanks in advance. Also tell how to calculate time delays.

    April 11, 2013 at 10:22 am #9461
    Jason Jordon
    Participant

    Hi,

     

    I am very sure that there are some C-based bipolar stepper motor programs in the “contribution” section. Find them out!!!

    June 8, 2013 at 4:24 am #9905
    ajay
    Participant

      #include<reg51.h>
    sbit ir=P2^0;
    sbit buzzer=P0^7;
    stepper();
    delay(unsigned int);
    unsigned char i;
    unsigned int z,s;
    main()
    {
    buzzer=0;
    while(1)
    {
    if(ir==0)
    {
    buzzer=1;
    stepper();
    buzzer=0;
    }
    else
    {
    buzzer=0;
    }
    }
    }
    stepper()
    {
    for(s=0;s<14;s++)
    {
    for(z=0x01;z<0x0a;z=z*2)
    {
    P3=z;
    delay(5);
    }
    }
    for(s=0;s<14;s++)
    {
    for(z=0x08;z>0x00;z=z/2)
    {
    P3=z;
    delay(5);
    }
    }
    }
    delay(unsigned int time)
    {
    unsigned int i,j;
    for(i=0;i<time;i++)
    for(j=0;j<1275;j++);
    }

    June 17, 2013 at 3:06 am #9971
    venkatraman
    Participant
    #include<reg51.h>
    #define motor P1
    void delay(unsigned int k)
    {
    unsigned int i,j;
    for(i=0;i<k;i++)
    {
    for(j=0;j<30;j++)
    {}}}
    void main()
    {
    motor=0x00;
    while(1)
    {
    motor=0x06;
    delay(200);
    motor=0x05;
    delay(200);
    motor=0x09;
    delay(200);
    motor=0x0a;
    delay(200);
    }}

     

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

RSS Recent Posts

  • getting no where fast 8 x 8 led matrix January 23, 2026
  • Expensive hobby January 23, 2026
  • analog logic of shmidt trigger bjt circuit January 22, 2026
  • Micro mouse January 22, 2026
  • Best practices for accurate LiPo battery monitoring on ESP32? January 22, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 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