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
You are here: Home / Replies / I am working on real hardware

I am working on real hardware

|

Microcontroller › 8051 › Stepper Motor interfacing with 8051, › I am working on real hardware

November 16, 2013 at 10:48 am #10612
pankaj
Participant

I am working on real hardware it is not giving any desired response (at output pins)  how ever it works perfectly in Proteus my circuit is:

hardware: AT89C51, capacitor 33pF, crystal 12MHz, Bipolar Stepper Motor (4 wire)…

 

my program is:

 

#include<reg51.h> //using AT89C51
#include<stdio.h>
void delay(int); // Rotation In sequence without any switch continously
void main()
{
P1=0;
P2=0;
P3=0;
  do
  {
    P2=0x01; //0001
    delay(100);
    P2=0x04; //0100
    delay(100);
    P2=0x02; //0010
    delay(100);
    P2=0x08; //1000
    delay(100);
  }while(1);
}
 
void delay(int k)
{
  int i,j;
  for(i=0;i<k;i++)
  {
    for(j=0;j<1725;j++)
    {}
  }
}
 
wysiwyg_imageupload:11079:

RSS Recent Posts

  • question about speaker crossover August 19, 2022
  • How does a transistor works as a switch? August 19, 2022
  • Designspark PCB V10.0 on Windows 11 - fails to start August 19, 2022
  • Pedestal fan August 19, 2022
  • Peltier control August 19, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

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