PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 23, 2010 12:58 pm |
|
|
Look at the TEXT[][] arrays and the glcd_text57() function in this file:
Quote: |
c:\program files\picc\drivers\glcd.c
|
Notice how the TEXT data is broken up into two arrays. That's done
because of the 'const' array limit of 256 bytes for the PCM compiler.
The PCH compiler (18F) doesn't have this size restriction. But the
glcd.c file is done this way so it will work with both compilers.
For example, with the PCH compiler, you can edit the TEXT and TEXT2
arrays, and combine them into one array. Then you don't have to do
a test on the input char value, to see which array to use. You could just
have one line to copy the 'const' font data to a RAM array. Example:
Code: |
memcpy(pixelData, TEXT[textptr[i]-' '], 5);
|
|
|