Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/04/04 17:51
Read: times


 
#61907 - ISR time shouldn't last that long? 1 sec
In my system, interrupt is generated if any of the four light sensors detected the ball. The program run into the ISR and read the four sensors' state . Hence control the motion of the robot by that four sensors reading. But the problem is: All of the motions of the robot have to be perform for a rather long time, at least 1 secound.(too long for ISR, doesn't it?)

For example, It need a right turn after the right light sensor detected the ball:

1. S52 control the robot to turn in order to find the ball;
2. Right light sensor detected the ball;
3. 89C2051 interrupt 89S52, the main MPU;
4. S52 stop the robot from turning. Program run into ISR,read the state and determine which light sensor has detected the ball.
5. Make a right turn, until the front light sensor detect the ball.
6. If none of the light sensor detect the ball, RETI.
---back to 1.---

I've been told that the ISR should be so long(last for 1 secound?!)
So what is a unual way to handle the interrupt and the sensor? Can anyone give me an example?


List of 15 messages in thread
TopicAuthorDate
ISR time shouldn't last that long? 1 sec            01/01/70 00:00      
   RE: ISR time shouldn\'t last that long? 1 sec            01/01/70 00:00      
      RE: ISR time shouldn\'t last that long? 1 sec            01/01/70 00:00      
         RE: ISR time shouldn\\\'t last that long? 1 sec            01/01/70 00:00      
         <<<No ball motions>>>            01/01/70 00:00      
            RE: <<<No ball motions>>>            01/01/70 00:00      
   RE: ISR time shouldn't last that long? 1 sec            01/01/70 00:00      
   RE: ISR time shouldn\'t last that long? 1 sec            01/01/70 00:00      
   <<<Read This First>>>            01/01/70 00:00      
      RE: <<<Read This First>>>            01/01/70 00:00      
         RE: <<<Read This First>>>            01/01/70 00:00      
      RE: <<<Read This First>>>            01/01/70 00:00      
         RE: <<<Read This First>>>            01/01/70 00:00      
         RE: <<<Read This First>>>            01/01/70 00:00      
            RE: <<<Read This First>>>            01/01/70 00:00      

Back to Subject List