??? 04/11/09 08:57 Read: times |
#164528 - reply Responding to: ???'s previous message |
Timer is set to interrupt every 1ms.
In order to moves a phase of stepper motor which requires 30 ms, in the ISR, a variable is set to 30 and keep reducing every interrupt occurs. If the variable is 0 then only moves the stepper motor with 1 phase. Not the ISR delay every 1ms but the interrupt interrupts every 1ms which will accumulate until 30 times (30 multiples with 1ms = 30ms). Sry for giving wrong info about the ISR delay in previous message. TF2 is cleared at the end of ISR. |