N
NDS
Hi all. I'm having a strange problem here with some debugging. Got an ide
that the problem is perhaps relatet to some sort of bank-switching. My
qustion is :
I'm in program bank ?.
Make a call to a routine in bank1.
In here i recieve an INT whitch takes me to some code in programbank 0. In
the INT i save PCLATH, then make several call's. When done, i restore
PCLATH, then retfie.
Now i'm back with the routine in bank 1, but after return it seemes like
sometimes i'm not returning to the bank from where the original call was
made (this could be any one).
The datasheet states that you need to set PCLATH only on the way OUT - not
on return? Is that also true after servicing a INT in a nother bank,
containing call's of it's own ?
If not - is it "wrong" to have "common routines" like switch-reading which
need to be called from different banks - out of bank 0? Or is there some
other way round this?
If there's a "simple" problem here, i would really like to know - before
spending even more time debugging .
Thanks Niels
that the problem is perhaps relatet to some sort of bank-switching. My
qustion is :
I'm in program bank ?.
Make a call to a routine in bank1.
In here i recieve an INT whitch takes me to some code in programbank 0. In
the INT i save PCLATH, then make several call's. When done, i restore
PCLATH, then retfie.
Now i'm back with the routine in bank 1, but after return it seemes like
sometimes i'm not returning to the bank from where the original call was
made (this could be any one).
The datasheet states that you need to set PCLATH only on the way OUT - not
on return? Is that also true after servicing a INT in a nother bank,
containing call's of it's own ?
If not - is it "wrong" to have "common routines" like switch-reading which
need to be called from different banks - out of bank 0? Or is there some
other way round this?
If there's a "simple" problem here, i would really like to know - before
spending even more time debugging .
Thanks Niels