Hi John! You should take care of 256 bytes page boundaries in PIC16 architecture. You need to broke your 1k-words table in four 256 bytes tables. Realy, it is worst: you need to write a small code in the beginning of each page in order to assure that high PC bits are correct. Or, in a different approach, you need adjust PCLATH before each table jump. Another thing: the first table (at bank 0) may be of less entries that follower tables. A example of using tables is like this: ; RAM variables OFFSETT_0 equ 0x25 ; Variable that holds offsett for Table_0 OTHER equ 0x26 ; Other variable OFFSETT_1 equ 0x27 ; Variable that holds offsett for Table_0 OFFSETT_2 equ 0x37 ; Variable that holds offsett for Table_0 ANOTHER EQU 0X39 ; Another :) OFFSETT_3 equ 0x3A ; Variable that holds offsett for Table_0 ORG 0x000 goto MAIN ORG 0x004 INTERRUPT_SERVICE ; Put code for interrupt here MAIN ; Put code for initialization here Main_Loop ; Put some code of main loop here Read_Table_0 movf OFFSETT_1, W call Table_0 ; use value returned in W Read_Table_1 movf OFFSETT_1, W call Table_1 ; use value returned in W Read_Table_2 movf OFFSETT_2, W call Table_2 ; use value returned in W Read_Table_3 movf OFFSETT_3, W call Table_3 ; use value returned in W ; Put the last code of the mainline here. goto Main_Loop ; ;----- Table's zone can begins here ------------------------ ; ORG 0x57 ; Say that, for example, the next free ; memory program position is 0x57 Table_0 clrf PCLATH ; Position 0x057 used by table header. addwf PCL, F ; Position 0x058 used by table header. retlw 0x21 ; First really util postion: 0x059 retlw 0x05 ; Second usable position: 0x05A ... retlw 0x45 ; Last usable position in table 0 is at 0x0FF ORG 100 Table_1 bsf PCLATH, 0 ; Position 0 of bank 1 at 0x100 bcf PCLATH, 1 ; Position 1 of bank 1 at 0x101 addwf PCL, F retlw 0x45 ; First really usable position: 0x103 retlw 0x58 ; Second position: 0x104 .... retlw 0x13 ; Last position in this bank: 0x1FF ORG 200 Table_2 bcf PCLATH, 0 ; Assure that PCLATH is equal to 0x02 bsf PCLATH, 1 addwf PCL, F retlw 0x76 ; First table entry at position 0x203 retlw 0x23 ; Second at 0x204 .... retlw 0x98 ; Last entry in Table_2 at 0x2FF ORG 0x300 Table_3 bsf PCLATH, 0 bsf PCLATH, 1 ; PCLATH is equal to 0x03 addwf PCL, F retlw 0x83 ; First in this bank at 0x303 retlw 0x37 ... retlw 0x36 ; Last position in the whole PIC16F84 is at 0x3FF Hope this will help... Cheers! :) At 20:05 27/11/00 -0800, you wrote: >Being a closet AVR person, I have come to the point where I must use a pic >for this application. > >I have taken a crash course on the 16F84, and came to the conclusion there >are no page bounderies on the 1K program memory block. I want to fill the >whole program memory with a data table using retlw's, and a short program >to run through the complete data table continuosly. Am I correct about no >page bounderies? Anything I should be aware of in doing this? > >Thanks for any help > >John > >-- >http://www.piclist.com hint: To leave the PICList >mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu