Thanks Tony=2C What I think I'm after is a hybrid of both =21=21 i=2Ee=2E = store the table in = EEDATA=2C and write it into program memory as the Micro boots up=2E If I load it into RAM=2C I don't have enough RAM in one page to hold the fu= ll table=2C = so I would not be able to use ADDWF PCL to do a table read=2E you could look at it as I want to use ADDWF PCL but the table has to be a= lterable = an reconfigured=2C without reprogramming the Micro=2E I can't really wait for the 18F252 to hit the streets either=21=21 Thanks=2E tony=2Ekubek=40FLINTAB=2ECOM on 12=2F02=2F2002 11=3A18=3A27 Please respond to PICLIST=40MITVMA=2EMIT=2EEDU=40INTERNET=40wtgw To=3A=09PICLIST=40MITVMA=2EMIT=2EEDU=40INTERNET=40wtgw cc=3A=09 = Paper Mail=3A=09 Subject=3A=09Re=3A =5BPIC=5D=3AProgram memory tables - Advice please =2A=2A=2A WARNING =2A=2A=2A This mail has originated outside your organization=2C either from an external partner or the Global Internet=2E = Keep this in mind if you answer this message=2E = Hi=2C Mike Blakey wrote=3A =3EI am using a 16f876 and have a large lookup table of values=2C =28196 by= tes=29 At present =3Ethis table is in EEDATA=2E the access to the data is not quite fast enou= gh=2C I believe =3Ethat it is possible to copy this data into program memory=2C possible us= ing a routine =3Eat boot-up=2E I have looked in Microchips archive=2C and don't fully und= erstand how to =3Edo this=2E Has anyone done this sort of thing before=2C and could point = me in the right =3Edirection=2C Thanks=2E From what I understand you are using the eeram to store the table =3F In that case I assume something like this is used to access it=3A =3B =2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A= =2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A= =2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A=2A =3B EE=5FWRITE=5FBYTE - Routine to read a byte from ee ram =3B Adress in W=2C byte will be delivered in W EE=5FREAD=5FBYTE BANK2 MOVWF EEADR =3B put in adress reg=2E BSF STATUS=2CRP0 =3B bank3 =21=21 BCF EECON1=2CEEPGD =3B set to read data memory BSF EECON1=2CRD =3B set bit to read BCF STATUS=2CRP0 =3B bank2 =21=21 MOVF EEDATA=2CW =3B move data to W BANK0 =3B Reset to BANK0 =21 RETURN =3B and return Something around 12 instructions not counting the call=2Freturn=2C if this is to 'slow' then there always is the program table path which can be accomplished by somthing like=3A GET=5FTABLE=5FBYTE ADDWF PCL MY=5FTABLE dt 0x01=2C 0x02=2C 0x03=2C 0x04=2C=2E=2E=2E=2E=2E=2E IF =28=28HIGH =28=A4=29=29 =21=3D =28HIGH =28MY=5FTABLE=29=29=29 ERROR =22TABLE CROSSES PAGE BOUNDARY=2C RE-ALIGN =21=22 ENDIF Which would generate more or less only 1 instruction for the same task=2E Which is as fast as you can go I'm afraid=2E On the 16F876 one can always access the flash mem by similar means as the eeram but it would only be something around 1-2 instructions shorter than the normal eeram read=2E However it would 'save' program space if it would be sufficient to save only 7 bits=2Fvariable=2E see=3A http=3A=2F=2Fwww=2Epiclist=2Ecom=2Ftechref=2Fmicrochip=2Ftables=2Eht= m for additional info and pointers=2E =2Abeware=2A of program pages =21 =2FTony -- http=3A=2F=2Fwww=2Epiclist=2Ecom hint=3A The list server can filter out sub= topics =28like ads or off topics=29 for you=2E See http=3A=2F=2Fwww=2Epiclist=2Eco= m=2F=23topics ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics