Log in

View Full Version : Large Lookup Tables


Mr. Lim
29-01-2004, 23:51
I have a few look up tables I'm trying to define, and am running into problems with the C18 Linker.

The error I am getting is that the section I am loading these tables into is not big enough =/. Has anyone else used linker directives to get their large lookup tables to reside in a larger portion of memory? The table I am declaring is similar to this:

static const unsigned char mytable[256] = {

[mydata]

};

From what I've read so far, I need a #pragma linker directive to get this thing to go into a nice big chunk of program ROM.

Thanks in advance for the help!

-Shawn...

deltacoder1020
29-01-2004, 23:56
try using the "rom" keyword in the variable definition - this allows you to place constant data in the PIC's rom, which is 32k - easily enough to store a very large lookup table or two.

i.e.

const rom unsigned char mytable[256] = {

[mydata]

};

Mr. Lim
30-01-2004, 00:27
Thanks a bundle!

Kevin Karan
31-01-2004, 01:10
thanks delta, I was having the exact same problem!

Zee
16-02-2004, 20:16
Does this work with an EDU-bot?

deltacoder1020
16-02-2004, 21:30
it should, unless for some reason they neglected to include any rom....