Hello Xbot,
It is likely that your C statement that uses the division process will compile to more than one assembly instruction. The easiest way to obtain the number of cycles required by the statement is to use full chip simulaton, and single step, noting the cycle count before and after the statement is executed.
Interrupt latency can occur between different assembly instructions, so perhaps you might globally disable interrupts prior to the critical period, and re-enable at the conclusion of this period.
Regards,
Mac
Message Edited by bigmac on
2008-02-07 05:51 PM