0
2.0kviews
Draw labelled interfacing diagram of DC Motor with 89C51 microcontroller OR Write C language program to rotate DC motor clockwise and anticlockwise.
1 Answer
written 5.7 years ago by | • modified 5.6 years ago |
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;
}
}