On Mon, Jun 30, 2003 at 03:44:56AM -0400, Ishaan Dalal wrote: > > I'd restructure the table so that you don't have to move the upper > > byte at all. So each page of table would be every 4th table value > > and the page selector would actually come from the top 2 bits in > > ACCM. > > I'm confused. Consider the current table: What I mean is that if you had a table: 0x1c00: a, b, c, d, e, f, g, h, i, j, ... where your index is 0x1c00 + (10 bit number), that instead you would use: 0x1c00: a, e, i, ... 0x1d00: b, f, j, ... 0x1e00: c, g, k, ... 0x1f00: d, h, l, ... where your index is now 0x1c00 + (upper 8 bits of number) + 256 * (lower 2) The reason being that (upper 8 bits of number) is just ACCH. I'm not 18F savvy but something like: movff ACCM, TEMP rlncf TEMP, F rlncf TEMP, W andlw 0x3 addlw 0x1c movwf PCH movff ACCH, PCL -- Ben Jackson http://www.ben.com/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu