16f877a: message 306 / PCLATH
Hello Dave and Alain,
I am not using any "BRANCH procedure". My program is only using a lot of "GOTO" and "CALL" instructions. People explained me that this large number of "GOTO" and "CALL" is the reason why there is the message 306 (Crossing page boundary -- ensure page bits are set): the pic program memory (where my program is saved) is divided into pages due to limitation in the program counter size that can't carry the whole address bits for the whole memory. My program may have exceeded the size of one page so it crossed the page boundries to the next page. So the pc (program counter) overflowed.
The solution would be to adjust PCLATH register.
That is why I would like someone to give me an example of PCLATH use, through a short program, in order that I could know how to do with this PCLATH.
If you could help me, I thank you in advance,
Best regards,
Hervé.