ahmedragia21
Member
Hello , i've two problems , i wanna use INT0 to stop a motor and while this it does something else like doing a while loop and counter ..etc
example.
at interrupt
motor_stop
while (1)
{
motor_start;
// do robot program
}
the problem is when removing other robot program the external interrupt works , the program doesnt work simulatanously (interrupt + robot program ) e.g robot move forward while onother motor will stop till it touches the limit switch using external interrupt.
2nd problem is when powering the uC circuit it does strange things it makes random things like starting motors and blink leds , i dont know why from where could be the problem ?
example.
at interrupt
motor_stop
while (1)
{
motor_start;
// do robot program
}
the problem is when removing other robot program the external interrupt works , the program doesnt work simulatanously (interrupt + robot program ) e.g robot move forward while onother motor will stop till it touches the limit switch using external interrupt.
2nd problem is when powering the uC circuit it does strange things it makes random things like starting motors and blink leds , i dont know why from where could be the problem ?