I'm busy writing a program for the 16F877 with a couple of large tables. One of them starts at 0x220 which is over the 256 byte limit. I've followed the recommendations in AN556 and tried a few examples from various sites - I can't seen to get any of them working. My program keeps crashing when I call the table.
I've tried the following:
and also some of the examples from AN556:
How do you go about addressing tables above 256 bytes. Am I missing something?
I've tried the following:
Code:
movlw high (table_START)
movwf pclath
movf index,w
addlw table_START
skpnc
incf pclath,f
movwf pcl
table_START
retlw ...
and also some of the examples from AN556:
Code:
org 0x80
movlw HIGH Table
movwf PCLATH
movlw offset,F
call Table
org 0x02ff
Table:
addwf PCL,F
.....
How do you go about addressing tables above 256 bytes. Am I missing something?
Last edited: