S Suraj143 Active Member Sep 24, 2010 #1 I cannot access the table values above 2K memory.Please help. I have mentioned the memory address (from de-assembling list) in the comments. Code: call Cal_Offset ; get the character offset call ASCII_Table ; 0x0ff line movwf PORTB ---- ---- ASCII_Table movlw High Table addwf Offset_H,W movwf PCLATH movlw Low Table addwf offset_L,W btfsc STATUS,C incf PCLATH,F movwf PCL ; Table retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' ; Char_1 retlw b'00000001' retlw b'00000001' retlw b'00000001' retlw b'00000001' retlw b'00000001' retlw b'00000001' ; retlw b'00000000' ;---- ;---- ;---- ; 0x07ff [COLOR="Red"]Char_8 retlw b'00000001' ; 0x0800[/COLOR] retlw b'00000010' retlw b'00000100' retlw b'00001000' retlw b'00010000' retlw b'00100000' Last edited: Sep 24, 2010
I cannot access the table values above 2K memory.Please help. I have mentioned the memory address (from de-assembling list) in the comments. Code: call Cal_Offset ; get the character offset call ASCII_Table ; 0x0ff line movwf PORTB ---- ---- ASCII_Table movlw High Table addwf Offset_H,W movwf PCLATH movlw Low Table addwf offset_L,W btfsc STATUS,C incf PCLATH,F movwf PCL ; Table retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' ; Char_1 retlw b'00000001' retlw b'00000001' retlw b'00000001' retlw b'00000001' retlw b'00000001' retlw b'00000001' ; retlw b'00000000' ;---- ;---- ;---- ; 0x07ff [COLOR="Red"]Char_8 retlw b'00000001' ; 0x0800[/COLOR] retlw b'00000010' retlw b'00000100' retlw b'00001000' retlw b'00010000' retlw b'00100000'
P Pommie Well-Known Member Most Helpful Member Sep 25, 2010 #2 If ASCII_TABLE is in bank 1 (above 2k) then you need to do, Code: call Cal_Offset ; get the character offset [COLOR="red"]bsf PCLATH,3[/COLOR] call ASCII_Table ; 0x0ff line [COLOR="red"]bcf PCLATH,3[/COLOR] movwf PORTB ---- ---- ASCII_Table movlw High Table addwf Offset_H,W movwf PCLATH movlw Low Table addwf offset_L,W btfsc STATUS,C incf PCLATH,F movwf PCL ; Table retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' This will be the same for any calls to bank 1. Mike.
If ASCII_TABLE is in bank 1 (above 2k) then you need to do, Code: call Cal_Offset ; get the character offset [COLOR="red"]bsf PCLATH,3[/COLOR] call ASCII_Table ; 0x0ff line [COLOR="red"]bcf PCLATH,3[/COLOR] movwf PORTB ---- ---- ASCII_Table movlw High Table addwf Offset_H,W movwf PCLATH movlw Low Table addwf offset_L,W btfsc STATUS,C incf PCLATH,F movwf PCL ; Table retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' retlw b'00000000' This will be the same for any calls to bank 1. Mike.
S Suraj143 Active Member Sep 26, 2010 #3 Hi Mike it worked nicely. Thank you very much for your support.
Mosaic Well-Known Member Sep 28, 2010 #4 Code: call Cal_Offset ; get the character offset [COLOR="red"]bsf PCLATH,3[/COLOR] call ASCII_Table ; 0x0ff line [COLOR="red"]bcf PCLATH,3[/COLOR] movwf PORTB ---- ---- ASCII_Table movlw High Table addwf Offset_H,W movwf PCLATH movlw Low Table addwf offset_L,W btfsc STATUS,C incf PCLATH,F movwf PCL ; Table dt .0,.0,.0,.0 using the 'dt' data approach is far more compact and legible, u can use hex,decimal (as shown) or binary without the retlw instructions.
Code: call Cal_Offset ; get the character offset [COLOR="red"]bsf PCLATH,3[/COLOR] call ASCII_Table ; 0x0ff line [COLOR="red"]bcf PCLATH,3[/COLOR] movwf PORTB ---- ---- ASCII_Table movlw High Table addwf Offset_H,W movwf PCLATH movlw Low Table addwf offset_L,W btfsc STATUS,C incf PCLATH,F movwf PCL ; Table dt .0,.0,.0,.0 using the 'dt' data approach is far more compact and legible, u can use hex,decimal (as shown) or binary without the retlw instructions.
P Pommie Well-Known Member Most Helpful Member Sep 28, 2010 #5 Mosaic said: using the 'dt' data approach is far more compact and legible, u can use hex,decimal (as shown) or binary without the retlw instructions. Click to expand... I guess you missed his other thread. Mike.
Mosaic said: using the 'dt' data approach is far more compact and legible, u can use hex,decimal (as shown) or binary without the retlw instructions. Click to expand... I guess you missed his other thread. Mike.