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

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;
}
}

Please log in to add an answer.