Searching \ for '[PIC] Large byte arrays on PIC24H' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Large byte arrays on PIC24H'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Large byte arrays on PIC24H'
2007\03\02@105709 by Harold Hallikainen

face
flavicon
face
I need to store some arrays of bytes that are larger than the PSV window.
The User Guide
(http://ww1.microchip.com/downloads/en/DeviceDoc/C30_Users_Guide_51284e.pdf)
on pdf page 177 gives the following sample code:

const __attribute__((space(const)))
char my_const_array[10] = {0,1,2,3,4,5,6,7,8,9};

My code :

const __attribute__((space(const)))
uint8_t fox[]={
  #include "images/fox1.txt"
};

gives a syntax error:
error: syntax error before "const"

I DO have uint8_t defined in a typedef, so that's ok.

If I change the line to this:

const uint8_t fox[]={
   #include "images/fox1.txt"
};

it compiles ok, but I run out of PSV space (actually, I CAN compile with
one image array, but when I put in more, I run out of PSV space).

So... What is a good line of code to put my byte array in code space? Does
anyone have a sample of inline assembly to use table access to read a byte
from the array?

THANKS!

Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...