SlideShare uma empresa Scribd logo
1 de 11
Stepper Motor Interfacing with 89C51
Dr.M.Sugadev,M.Tech,Ph.D
Associate Professor
Department of ECE
Sathyabama Institute of Science and Technology
Chennai-600119
1
Stepper Motor
2
• Stepper motors are DC motors that move in discrete steps. They have
multiple coils that are organized in groups called "phases". By energizing
each phase in sequence, the motor will rotate, one step at a time.
3
Stepper Motor Excitation- Full Step
1
Stepper Motor Excitation- Half Step
Decreasing step size with more coils
1
Stepper Motor Interfacing with 89C51
1
C-Program for Toggling Leds at Port-2
#include<reg51.h> // include register header files
void delay(int x); //function declaration
void main()
{
1
P2=0x00;//Configure P2 as output port
while(1) // Infinite Loop
{
P2 = 0xFF; // Make Port2 pins High
delay(5000); // Call delay function
P2=0x00; // Make Port2 pins Low
delay(5000); Call delay function
}
}
void delay(x)
{
unsigned int i,j;
for(i=0;i<x;i++);
for(j=0;j<x;j++);
}
Controlling individual Port pins
1
C-Program for configuring individual Port pins
1
#include<reg51.h>
void delay(int x); //function declaration
sbit LED = P2^0; // assign name port pin
void main()
{
LED =0; // Configure Port 2.0 as output port
while(1)
{
LED=1;
delay(5000); // Call delay function
LED=0;
delay(5000); // Call delay function
}
}
void delay(x)
{
unsigned int i,j;
for(i=0;i<x;i++);
for(j=0;j<x;j++);
}
Reading a switch and controlling Leds
1
C-Program for reading a switch and controlling
Leds
1
#include<reg51.h>
sbit LED = P2^0;
sbit SW = P2^5;
void main()
{
SW = 1; // Configure Port 2.5 as input port
LED =0; // Configure Port 2.0 as output port
while(1)
{
if (SW==0)
LED=1;
else
LED=0;
}
}

Mais conteúdo relacionado

Semelhante a Session 9 Stepper Motor Interfacing.pptx

D0255033039
D0255033039D0255033039
D0255033039
theijes
 
Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...
Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...
Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...
IJPEDS-IAES
 
Project Report-Design of a PLC System for health monitoring of DC drive throu...
Project Report-Design of a PLC System for health monitoring of DC drive throu...Project Report-Design of a PLC System for health monitoring of DC drive throu...
Project Report-Design of a PLC System for health monitoring of DC drive throu...
Abhishek Sharma
 

Semelhante a Session 9 Stepper Motor Interfacing.pptx (20)

Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Design & implementation of 16 bit low power ALU with clock gating
Design & implementation of 16 bit low power ALU with clock gatingDesign & implementation of 16 bit low power ALU with clock gating
Design & implementation of 16 bit low power ALU with clock gating
 
Fpga implementation of power efficient all digital phase locked loop
Fpga implementation of power efficient all digital phase locked loopFpga implementation of power efficient all digital phase locked loop
Fpga implementation of power efficient all digital phase locked loop
 
OPAL-RT Induction machine & power electronic test system on FPGA
OPAL-RT Induction machine & power electronic test system on FPGAOPAL-RT Induction machine & power electronic test system on FPGA
OPAL-RT Induction machine & power electronic test system on FPGA
 
Automatic Power Factor Correction Using Arduino Uno
Automatic Power Factor Correction Using Arduino UnoAutomatic Power Factor Correction Using Arduino Uno
Automatic Power Factor Correction Using Arduino Uno
 
A high speed low power consumption d flip flop for high speed phase frequency...
A high speed low power consumption d flip flop for high speed phase frequency...A high speed low power consumption d flip flop for high speed phase frequency...
A high speed low power consumption d flip flop for high speed phase frequency...
 
A high speed low power consumption d flip flop for high speed phase frequency...
A high speed low power consumption d flip flop for high speed phase frequency...A high speed low power consumption d flip flop for high speed phase frequency...
A high speed low power consumption d flip flop for high speed phase frequency...
 
Library Characterization Flow
Library Characterization FlowLibrary Characterization Flow
Library Characterization Flow
 
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOPDESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
DESIGN AND IMPLEMENTATION OF AREA AND POWER OPTIMISED NOVEL SCANFLOP
 
D0255033039
D0255033039D0255033039
D0255033039
 
Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...
Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...
Low cost Real Time Centralized Speed Control of DC Motor Using Lab View -NI U...
 
Devry ecet 105 week 7 i lab add
Devry ecet 105 week 7 i lab addDevry ecet 105 week 7 i lab add
Devry ecet 105 week 7 i lab add
 
Bosch Internship presentation
Bosch Internship presentationBosch Internship presentation
Bosch Internship presentation
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Reversible Logic Gate
Reversible Logic GateReversible Logic Gate
Reversible Logic Gate
 
Power Saving Design Techniques with Low Cost FPGAs
Power Saving Design Techniques  with Low Cost FPGAs Power Saving Design Techniques  with Low Cost FPGAs
Power Saving Design Techniques with Low Cost FPGAs
 
pipelining
pipeliningpipelining
pipelining
 
IRJET - Analysis of Power Consumption in Glitch Free Dual Edge Triggered ...
IRJET -  	  Analysis of Power Consumption in Glitch Free Dual Edge Triggered ...IRJET -  	  Analysis of Power Consumption in Glitch Free Dual Edge Triggered ...
IRJET - Analysis of Power Consumption in Glitch Free Dual Edge Triggered ...
 
PRINT
PRINTPRINT
PRINT
 
Project Report-Design of a PLC System for health monitoring of DC drive throu...
Project Report-Design of a PLC System for health monitoring of DC drive throu...Project Report-Design of a PLC System for health monitoring of DC drive throu...
Project Report-Design of a PLC System for health monitoring of DC drive throu...
 

Último

如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
mestb
 
[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...
[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...
[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...
daisycvs
 
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
Vibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptxVibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptx
joshuaclack73
 
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
Balancing of rotating bodies questions.pptx
Balancing of rotating bodies questions.pptxBalancing of rotating bodies questions.pptx
Balancing of rotating bodies questions.pptx
joshuaclack73
 
Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...
Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...
Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...
drjose256
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
mestb
 
Toko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra Magelang
Toko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra MagelangToko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra Magelang
Toko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra Magelang
adet6151
 

Último (17)

如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(OP毕业证书)奥塔哥理工学院毕业证成绩单本科硕士学位证留信学历认证
 
[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...
[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...
[[Jeddah]] IN RIYADH +2773-7758557]] Abortion pills in Jeddah Cytotec in Riya...
 
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UVic毕业证书)维多利亚大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(AUT毕业证书)奥克兰理工大学毕业证成绩单本科硕士学位证留信学历认证
 
REMOTE SOLAR MONITORING SYSTEM - A solution to make battery life extend by 300%
REMOTE SOLAR MONITORING SYSTEM - A solution to make battery life extend by 300%REMOTE SOLAR MONITORING SYSTEM - A solution to make battery life extend by 300%
REMOTE SOLAR MONITORING SYSTEM - A solution to make battery life extend by 300%
 
Vibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptxVibration of Continuous Systems.pjjjjjjjjptx
Vibration of Continuous Systems.pjjjjjjjjptx
 
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(SUT毕业证书)斯威本科技大学毕业证成绩单本科硕士学位证留信学历认证
 
DOC-20240514-WA0014..pdfmodern survey kll
DOC-20240514-WA0014..pdfmodern survey kllDOC-20240514-WA0014..pdfmodern survey kll
DOC-20240514-WA0014..pdfmodern survey kll
 
Balancing of rotating bodies questions.pptx
Balancing of rotating bodies questions.pptxBalancing of rotating bodies questions.pptx
Balancing of rotating bodies questions.pptx
 
Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...
Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...
Top^Clinic Soweto ^%[+27838792658_termination in florida_Safe*Abortion Pills ...
 
NO1 Qari Rohani Amil In Islamabad Amil Baba in Rawalpindi Kala Jadu Amil In R...
NO1 Qari Rohani Amil In Islamabad Amil Baba in Rawalpindi Kala Jadu Amil In R...NO1 Qari Rohani Amil In Islamabad Amil Baba in Rawalpindi Kala Jadu Amil In R...
NO1 Qari Rohani Amil In Islamabad Amil Baba in Rawalpindi Kala Jadu Amil In R...
 
NO1 Qari kala jadu karne wale ka contact number kala jadu karne wale baba kal...
NO1 Qari kala jadu karne wale ka contact number kala jadu karne wale baba kal...NO1 Qari kala jadu karne wale ka contact number kala jadu karne wale baba kal...
NO1 Qari kala jadu karne wale ka contact number kala jadu karne wale baba kal...
 
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(USYD毕业证书)悉尼大学毕业证成绩单本科硕士学位证留信学历认证
 
Vip ℂall Girls Shanti Niketan Phone No 9999965857 High Profile ℂall Girl Delh...
Vip ℂall Girls Shanti Niketan Phone No 9999965857 High Profile ℂall Girl Delh...Vip ℂall Girls Shanti Niketan Phone No 9999965857 High Profile ℂall Girl Delh...
Vip ℂall Girls Shanti Niketan Phone No 9999965857 High Profile ℂall Girl Delh...
 
NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...
NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...
NO1 Best Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addre...
 
Toko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra Magelang
Toko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra MagelangToko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra Magelang
Toko Jual Viagra Asli Di Magelang 081229400522 Obat Kuat Viagra Magelang
 
Matrix Methods.pptxhhhhhhhhhhhhhhhhhhhhh
Matrix Methods.pptxhhhhhhhhhhhhhhhhhhhhhMatrix Methods.pptxhhhhhhhhhhhhhhhhhhhhh
Matrix Methods.pptxhhhhhhhhhhhhhhhhhhhhh
 

Session 9 Stepper Motor Interfacing.pptx

  • 1. Stepper Motor Interfacing with 89C51 Dr.M.Sugadev,M.Tech,Ph.D Associate Professor Department of ECE Sathyabama Institute of Science and Technology Chennai-600119 1
  • 2. Stepper Motor 2 • Stepper motors are DC motors that move in discrete steps. They have multiple coils that are organized in groups called "phases". By energizing each phase in sequence, the motor will rotate, one step at a time.
  • 5. Decreasing step size with more coils 1
  • 7. C-Program for Toggling Leds at Port-2 #include<reg51.h> // include register header files void delay(int x); //function declaration void main() { 1 P2=0x00;//Configure P2 as output port while(1) // Infinite Loop { P2 = 0xFF; // Make Port2 pins High delay(5000); // Call delay function P2=0x00; // Make Port2 pins Low delay(5000); Call delay function } } void delay(x) { unsigned int i,j; for(i=0;i<x;i++); for(j=0;j<x;j++); }
  • 9. C-Program for configuring individual Port pins 1 #include<reg51.h> void delay(int x); //function declaration sbit LED = P2^0; // assign name port pin void main() { LED =0; // Configure Port 2.0 as output port while(1) { LED=1; delay(5000); // Call delay function LED=0; delay(5000); // Call delay function } } void delay(x) { unsigned int i,j; for(i=0;i<x;i++); for(j=0;j<x;j++); }
  • 10. Reading a switch and controlling Leds 1
  • 11. C-Program for reading a switch and controlling Leds 1 #include<reg51.h> sbit LED = P2^0; sbit SW = P2^5; void main() { SW = 1; // Configure Port 2.5 as input port LED =0; // Configure Port 2.0 as output port while(1) { if (SW==0) LED=1; else LED=0; } }