Microcontroller › 8051 › NXP 8051 – DC Motor Interfacing › status=1;while(1){chr =
September 30, 2012 at 3:18 pm
#8633
matrixworld20
Participant
status=1;
while(1)
{
chr = getCharacter ();
if (chr == ‘S’)
{
status=0;
}
if (chr == ‘R’)
{
status=1;
}
//====================================
if(status==0)
{
motora=1;
motorb=0;
}
if(status==1)
{
motora=0;
motorb=0;
}
and imp , u should have seperate the power source for both… bcoz motor shrink more current probably it will damage controller