stepper interface to 8051 | Microcontroller › 8051 › stepper interface to 8051 This topic has 1 reply, 2 voices, and was last updated 12 years, 8 months ago by Naveen Srivastava. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts March 4, 2012 at 1:40 pm #1607 akshay ramParticipant hello, i have interfaced my 8051 to a stepper motor with resolution 1.8. how do i make the stepper rotate for any int value ?? i tried dividing the int by 1.8 and passing it to the motor using &0x0F|0xF0 but it didnt work… March 4, 2012 at 3:25 pm #7243 Naveen SrivastavaParticipant #include <stdio.h> #include <8051.h> void delay (int time) { int i,j; for (i=0;i<=10;i++) { for (j=0;j<=time*10;j++) { }}} void forward ( ) { P1=0x11; delay(10); P1=0x22; delay(10); P1=0x33; delay(10); P1=0x44; delay(10); } void main() { P1=0xff; while(1) { forward(); } } Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In