I am programming a fairly large project that is approaching, but has not yet passed the Page1 (0x7FF) boundary of the program memory space. I did run into this a little before with the same program with a CALL to a Look-Up Table and looked for a solution. One of the answers involved setting the PCLATH register. The program size at that time was still below the Page 1 boundary.
I did use the PCLATH code to correct that problem which was:
It worked, but it doesn't make much sense to me. I've read the Datasheet, searched online extensively but it does not seem like this should not be happening if I'm within and stay within the 1st Page, right?
Now I'm running into the same thing again, I think, when I call a general subroutine. The question I have is: Why is this even happening when I'm staying within the boudary of the 1st Page of Program Memory?
I'm using MPLAB IDE, PICKit2 Programmer, 16F917 MCU, 3 pushbuttons, 16x2 LCD display, 2Kbit EEPROM memory chip, 4 16F54 slave MCUs via parallel connection to the 16F917 master. Everything has been working extremely well...just a few bumps in the road along the way that have lead to an educational experience. :-D
Thanks again everyone, you have lead me to answers before and love this forum.
I did use the PCLATH code to correct that problem which was:
Rich (BB code):
MOVLW HIGH TABLE ; Load High 8-bit Address of TABLE
MOVWF PCLATH ; into PCLATH
CALL TABLE
Now I'm running into the same thing again, I think, when I call a general subroutine. The question I have is: Why is this even happening when I'm staying within the boudary of the 1st Page of Program Memory?
I'm using MPLAB IDE, PICKit2 Programmer, 16F917 MCU, 3 pushbuttons, 16x2 LCD display, 2Kbit EEPROM memory chip, 4 16F54 slave MCUs via parallel connection to the 16F917 master. Everything has been working extremely well...just a few bumps in the road along the way that have lead to an educational experience. :-D
Thanks again everyone, you have lead me to answers before and love this forum.