I have made a program 16F877A more than 1K and by handling pclath everything were ok.When I should extend more than 0X800 I have started having problem.The program has many messages for an LCD screen. I setted tables at 0X700 and 0X800 a second part.Till 0X700 by adding in pclath H'07' the call message subroutins are working right.When I add H'08' to pclath this seems that it ignores the relative call subroutine .In mplab built option although it is succeded there is a 306 message about crossing page boundary and check if page bits are correct. The point where it happens is where the instruction call message is but I already had added to pclath H'08' .
Thank you
Paging
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PAGING
Hello,
Not 100% sure what the problem is here, sorry I re-read your post a few times.
Which compiler are you using? BoostC handles page switching automatically so you don't have to do anything with the pclath register. If your using a Microchip compiler then you may be better off asking on the Microchip forums.
Not 100% sure what the problem is here, sorry I re-read your post a few times.
Which compiler are you using? BoostC handles page switching automatically so you don't have to do anything with the pclath register. If your using a Microchip compiler then you may be better off asking on the Microchip forums.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PAGING
Hello
thank you for your reply
I forgot to write that I am using assembly with mplab ide. I find it very curious that adding to pclath H'07' works ok with the messages to that direction but adding h'08' not. It happened to 16f88 too and that is why I changed to 16F877A. But I have noticed something else.When an instruction is within h'400' to h'7FF' the add h'08' to pclath works and the subroutins after h'800' are called.In the current program there is some call subroutines before h'400' and these are that not working.Also before h'400' jumps with pclath to h'400' to h'7FF' works too.It seems something like scale and may be there is the need of another instruction that I do not know.I will try to direct the calls after h'400' and then jump to h'800' to see what happens.
thank you for your reply
I forgot to write that I am using assembly with mplab ide. I find it very curious that adding to pclath H'07' works ok with the messages to that direction but adding h'08' not. It happened to 16f88 too and that is why I changed to 16F877A. But I have noticed something else.When an instruction is within h'400' to h'7FF' the add h'08' to pclath works and the subroutins after h'800' are called.In the current program there is some call subroutines before h'400' and these are that not working.Also before h'400' jumps with pclath to h'400' to h'7FF' works too.It seems something like scale and may be there is the need of another instruction that I do not know.I will try to direct the calls after h'400' and then jump to h'800' to see what happens.
Re: PAGING
FINALY IT WAS AN ERROR.AFTER THE CALL MESSAGES WAS IMMEDIATELY A GOTO INSTRUCTION SO BEFORE GOTO PCLATH SHOULD BE RESETED.