![]() | ![]() | ![]() |
| | |||||||
| Notices |
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink (permalink)) |
| Hi I want to call a TABLE by using indirect addressing. Now I’m doing like this. Code: movlw 01h movwf 11h ;GP register movlw 02h movwf 12h ;GP register I can clear the GP registers using indirect addressing like below. Code: movlw 11h movwf FSR clrf INDF incf FSR,f btfss FSR,7 goto $-3 goto NEXT Thanks a lot Last edited by Suraj143; 10th July 2007 at 02:40 AM. | |
| | |
| | (permalink (permalink)) |
| Hi thanks for your reply doesn’t it need a jump value for TABLE? Another problem if my last GP register is 15h how to detect that. It means the tables last value must move to this last GP register. I have only 5 GP registers they are 11h,12h,13h,14h,15h So after moving last literal value to 15h it must do other work. How to detect the last 15h register? Thanks a lot | |
| | |
| | (permalink (permalink)) |
| Are you trying to read a table from program memory into RAM? Code:
Code: call table ;(where W is the pointer to the table) Last edited by blueroomelectronics; 11th July 2007 at 05:32 AM. | |
| | |
| | (permalink (permalink)) |
| No, not only 8 general purpose register. Up to 256 general purpose register maximum. For example, after incf FSR, f Code: movf FSR, w
xorlw 0x1b ;if you start with 11h and you have 10 GP register,
;the last one will be 1ah
btfss STATUS, Z
goto NEXT
goto exit
__________________ Superman returns.. | |
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Calling Tables for PIC877A | jinchang | Micro Controllers | 15 | 10th June 2007 02:08 PM |
| Indirect addressing issue with 16f84a | MWostal | Micro Controllers | 9 | 31st December 2006 12:40 PM |
| PIC: Table lookup across page boundary | eblc1388 | Micro Controllers | 11 | 16th August 2005 02:42 PM |
| 18F Lookup Table Cose Snippet [ASM] | pittuck | Micro Controllers | 0 | 14th December 2004 07:40 AM |
| Lookup table for LCD and 7 segment display | patricktran | Micro Controllers | 3 | 23rd April 2004 01:43 PM |