Hi I have a terrible problem when writing to PCLATH so please take a look.
I attached the disassembly listing it shows the actual line number in my Data Tables.
You can see the half of Table11 & Table12 exceeding 0FFh mark. Highlighted in red.
I can call Table1 to 10 anywhere in the program memory. Because there in the first 0FFh mark. But when I call Tables 11 & 12 it won’t work very well.
I’m calling Table11 from 12Fh line. Here what I wrote to PCLATH.
Code:
calling Table11 from 12Fh line
movlw HIGH Table11
movwf PCLATH
call Table11
Hi,
I think your table 12 should be working well.
Look at the table 11, it starts at memory location 0x00EC and ends at 0x010A. So you are able to call table 11 until 0x00ff. From 0x0100 onwards, it starts going wrong because the high side of table 11 is always 0x00.
Do you get what I mean?
You can force the high side of table 11 to start at 0x01 by:
Hi,
I think your table 12 should be working well.
Look at the table 11, it starts at memory location 0x00EC and ends at 0x010A. So you are able to call table 11 until 0x00ff. From 0x0100 onwards, it starts going wrong because the high side of table 11 is always 0x00.
Do you get what I mean?
First of all thanks for all of your replies.
I tried every ones methods.I placed org statements to the Table11 also but still I coudn't access to Table11 onwards.
From Table 1 to 10 its working perfectly but from Table11 onwards its not working.
Here is my code.Main routine starts from 12Fh line.
Code:
Main clrf 2Ah
incf 2Ah,F ;increment the jump value
movf 2Ah,W ;Put jump value into W
[COLOR="Red"]movlw High Table11
movwf PCLATH
call Table11[/COLOR]
movwf 30h ;get the 30h GP register
xorlw 0FFh ;If table11 value is 0FF in 30h register?
btfsc STATUS,Z ;bit 2 of STATUS will be SET (=1)
goto Exit ;goto Exit
call Scan ;show Display
Main clrf 2Ah
incf 2Ah,F ;increment the jump value
movlw High Table11
movwf PCLATH
[COLOR="Red"] movf 2Ah,W ;Move this to here[/color]
call Table11
movwf 30h ;get the 30h GP register
xorlw 0FFh ;If table11 value is 0FF in 30h register?
btfsc STATUS,Z ;bit 2 of STATUS will be SET (=1)
goto Exit ;goto Exit
call Scan ;show Display
First of all thanks for all of your replies in my earlier thread.
My problem is I cannot call the Table11 onwards.
I tried every ones methods. I placed org statements to the Table11 also but still I coudn't access to Table11 onwards.
From Table 1 to 10 it’s working perfectly but from Table11 onwards it’s not working.
Here is my code. Main routine starts from 12Fh line.
Code:
Main clrf 2Ah
incf 2Ah,F ;increment the jump value
movf 2Ah,W ;Put jump value into W
[COLOR="Red"]movlw High Table11
movwf PCLATH
call Table11[/COLOR]
movwf 30h ;get the 30h GP register
xorlw 0FFh ;If table11 value is 0FF in 30h register?
btfsc STATUS,Z ;bit 2 of STATUS will be SET (=1)
goto Exit ;goto Exit
call Scan ;show Display
Please help me to solve my problem.Attachment contains the disassembly listing.