Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

memory paging problem

Status
Not open for further replies.

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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top