memory paging problem

krpz

New Member
i use a pic16f877
i also use these instructions :

Code:
		movlw	high(subroutine)
		movwf	PCLATH
		call	subroutine
		clrf	PCLATH
in the start of the subroutine i put "ORG 0x900"

but the programma is not executed the way it supposed. Any help??

if i dont have the above instruction i take this error:
CORE-W0014: Halted due to PC incrementing over the Maximum PC address and wrapping back to Zero


PLEASE HELP ME , it very urgent for school assignment THANKS
 
Last edited:
It sounds like you forgot the return instruction at the end of your subroutine. Post the subroutine code in case it's something else.

Mike.
 
i change my code and it has another problem:

Error - section '.org_0' can not fit the absolute section. Section '.org_0' start=0x00000000, length=0x000012ce

Any helo how to overcome this problem??
 
Hi krpz
I also had many a problem with paging. Now i use the following macro. Just be aware the PAGESEL macro (internal in assembler) will destroy w register so be careful to pass parameters to your subroutine using w.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…