0
1.6kviews
Draw the interfacing of DC motor with 89C51 microcontroller. Write C language program to rotate DC motor clockwise and anticlockwise.
1 Answer
0
70views

enter image description here

Program:

#include< reg51.h>
sbit CW_DIRECTION=P1^0; //P1.0 for Clock Wise direction
sbit CCW_DIRECTION=P1^1; //P1.1 for counter clockwise direction
void main(void)
{
CW_DIRECTION =0;
while(1)
{
//Motor OFF
CW_DIRECTION =1;
CCW_DIRECTION =0;
}
}

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.