Hello,
I am writing this piece of code in order to insert a delay in my execution cycle.
The code is the following:
DELAY: STHX DLY_A ; (4)
LOOPOUT: STX DLY_B ; (3)
LOOPIN:
DEC DLY_B ; (4)
BNE LOOPIN ; (3)
DEC DLY_A ; (4)
BNE LOOPOUT ;(3)
RTS
I am using code warrior 10.6
After starting the debug process. The communication with the micro-controller will stop after debugger will step in and is able to do few iterations .
PS: watchdog is deactivated.
Looks really weird.
Any help?
Any body has a better way to insert delay?
Many thanks
Hard to tell what's wrong without more complete code. For example, where are DLY_A and DLY_B variables located?
BTW, here's a sample delay routine to give you an idea (but for ASM8 assembler)