MessUpMymind
New Member
hi there,
i am currently trying to use lookup table to simplify my program ,
below is the coding:-
what i wan to do is just display those value on PORTD , but it seem not working =(...can anybody help me??
i am currently trying to use lookup table to simplify my program ,
below is the coding:-
Code:
pcl equ 03h
movlw 0x00 ;get high 8 bits of Table address
movwf PCLATH ;save to PCLATH (may not be correct, yet)
movlw 0x80 ;get Table low address
addwf offset,W ;add value of offset, keep result in W
;if page is crossed, carry will be set
btfsc STATUS,C ;check page crossed? Skip next if NO
incf PCLATH ;yes, increment PCLATH
call Table ;call to table
org 0x50
Table:
movwf pcl
retlw 0x88
retlw 0x70
retlw 0x38
movwf PORTD
call DELAY
what i wan to do is just display those value on PORTD , but it seem not working =(...can anybody help me??