Tulkas
Member level 4

Hi, i have been using pics several years and i have never had this problem. Few time after pic start running it reset. I have not programed it with watchdog and other configuration bits wich could cause the reset. i have used debugger of the mplab and i can see something extrain. I use some delays subroutines and they are used continuosly during the program, but there is a point in the code where there is a call to a delay subroutine and in that subroutine there is other call to other delay subroutine, when the second call is executed the value of the stack in the first position change to the initial position of the code, and then when it execute the second return the program reset. I have this:
Always the stack change to the first position of the code in 0x101, if i write the code in ORG 0x60 for example stack change to 0x61, for that reason i'm not sure that a reset take place, and there isn't any jump to the label 'ini'. Anybody can help me?.
Sorry for my english, sorry for the post, sorry for all. Thanks

Code:
ORG 0x000
goto ini
ORG 0x004
.
.
.
retfie
ORG 0x100
ini
.
.
.
call delay1
.
.
goto $
delay1
.
.
call delay2
return
delay2
.
.
.
return
end
Always the stack change to the first position of the code in 0x101, if i write the code in ORG 0x60 for example stack change to 0x61, for that reason i'm not sure that a reset take place, and there isn't any jump to the label 'ini'. Anybody can help me?.
Sorry for my english, sorry for the post, sorry for all. Thanks