skimask, I recommend to you to read the other posts and my replies.
To me an interrupt means:
-Stop the current main program.
-Execute the interrupt routine
-Go back to where you came from in the main routine.
Basically interrupts should show a possible way to create the impression of multithreading. But.
But imagine there is a servo motor. The motor needs a signal every 20ms to keep it's torque. So the interrupt starts the interrupt routine. The interrupt routine should take say 2 seconds. And within these two seconds there is the action of force onto the motor.
This is what I was alluding to when writing about the pauseus issue. This stands for reserving time within the interrupt routine.
Or do DT's includes make the pic execute the code (even the main code) by cycling through each interrupt each cycle of code execution? So using a 20Mhz quarz leads to processing a portion of each code every 0.2 us?
I appreciate that you want to answer my questions to my satisfaction. Then give me a code example showing how to do that with DT's includes.
Bookmarks