256-byte boundary PIC16f628a

Status
Not open for further replies.

susand

New Member
Hello all.
I have only been programming the PIC16F628A for a few weeks and am experiencing a problem for which I can find no answer. I have searched the forums extensively but no-one else seems to have had this one. I would appreciate any help that can be given.
The problem is this:
If I call a table or a subroutine, and the object of the call is not in the same 256-byte section of memory, instead of returning on the RETURN or RETLW instruction it just seems to step through all succeeding instructions after the RETURN or RETLW, WITHOUT ACTUALLY EXECUTING THEM and never returns to the calling instruction.
Putting in PAGESEL directives only induces a message from MPASM saying that "the device does not need these directives as there is only one page in this device". If I have the call and the object of the call in the same 256-byte section of memory it works fine. I just cannot find any reference to this problem anywhere.
I have implemented the code shown in AN556 but it doesn't make any difference.
As far as I can see, having looked at the Microchip forum, and all other forums, help pages, etc, the problem usually associated with this is the the RETURN or RETLW jumps to some strange place because PCLATH is not set properly.
This is not the problem I am having, it just doesn't execute anything after going to the called subroutine.
Can anyone help with this please?
 
Can you post example code that demonstrated this problem?

Mike.
 
Hi Mike
many thanks for your reply. The problem has been solved by a person on the Microchip forum website.
The answer was to delete the .mcw file, making MPLAB recreate it. That fixed the problem.
I hope this helps someone else in the future. I never would have found that one by myself!

Kind regards,
Susan
 
It's on the Microchip Forum clicky. Looks like it's another MPLAB bug that didn't get fixed.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…