Hi Medusa,
I had this problem once and it turned out to be a subroutine that had a GOTO at the end of it instead of RETURN. Changed the word--solved the problem.
HTH,
BobK
Hi Medusa,
I had this problem once and it turned out to be a subroutine that had a GOTO at the end of it instead of RETURN. Changed the word--solved the problem.
HTH,
BobK
thanks bobk..i tried that, put return at the end of each goto instruction i have, but still it has not succeeded. is it possible due to overflow stack?
my program is supposed to have a stack of 8 byte output excluding the preamble and header and timeguard.
does anyone ever write a program that has a subroutine as follows
read input from port GPIO
move data from GPIO to 'input' register
take only data from bit 1
store the input (bit 1)to bit 0 at another register
repeat for eight times
what i already have in mind
movfw GPIO
movwf input
movlw 0000 0000
xorwf input,f
goto rotate
rotate
rrf input,f
rrf input,f
anyone has any idea to continue?
Hi Medusa,
That's not what I meant. If you are calling a subroutine then at the end of the subroutine you put a RETURN. GOTO does not go at the end of a subroutine. This was the problem I had with one of my projects (18F452). The stack overflow was causing my project to hangup when it got to the subroutine after the stack overflowed. This was the only point I was trying to make.
If you have both a GOTO and a RETURN then you might still be experiencing a problem.
HTH,
BobK
Bookmarks