***it Encoder_In = P1^0;
void Interrupt_1_isr() interrupt 2
{
Encoder_Turn_Left = 0;
Encoder_Turn_Right = 0;
if(Encoder_In)
Encoder_Turn_Left = 1;
else Encoder_Turn_Right = 1;
}
***it Encoder_In = P1^0;
void Interrupt_1_isr() interrupt 2
{
Encoder_Turn_Left = 0;
Encoder_Turn_Right = 0;
if(Encoder_In)
Encoder_Turn_Left = 1;
else Encoder_Turn_Right = 1;
}
举报