This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debug issues and delay function

Hi everyone, great forum!
had a question about debugging and timer interrupt.
Delay function delay(unsigned int msec)
assumes 12Mhz clock, and 2 timer interrupts/msec, so it waits for timer interrupt in a for loop, as many times as needed to simulate the delay.
Production version runs fine like that.
I get some upredictible code behavior when i try to debug code in an emulator. Often the code seems to get buffered, so then later on in one debug step, bunch of instructions get executed.
Any suggestions on how to modify delay() calls when running in an emulator. I need the delay in some I/O port operations because of the transition period. So I can't quite remove it.

0