# i am calling .hex file from main c program to dsiplay message on graphic lcd

Status
Not open for further replies.

##### Newbie level 6
but it hoes error as

FONT.H(1): error C129: missing ';' before 'PROGMEM'

the error is from FONT.h file & i am calling this file from main program .
FONT.h contain simple array of Alphabet .

#### milan.rajik

##### Banned
array should be terminated with ( semi-colon like...

Code C - [expand]1
2
3
char myArray[6] = {'H', 'E', 'L', 'L', 'O', '\0'}[COLOR="#0000FF"];[/COLOR]

char myArray[] = "Hello";

##### Newbie level 6
yes it is very true.
i have provided semicolon there.
& it shows error on first line where i have initialize array like
unsigned char arr[] = { a,b,c};

but in may case the array size is very large ...

- - - Updated - - -

this array is store in FONT.h file .
and i am calling this array from main.c file

#### paulfjujo

hello,

maybe you have to declare your array as extern in the main..

#### milan.rajik

##### Banned
Zip and post complete project files.

##### Newbie level 6
i have attached the code here

i need to put only array in font.h file.
i dont want to create function in font.h file

- - - Updated - - -

oh... thanks to every body
i got my fault.

#### Attachments

• New folder.rar
2.8 KB · Views: 4
Last edited:

#### milan.rajik

##### Banned
I asked you to zip and post complete Keil uVision project files so that it can be compiled and tested.

#### paulfjujo

hello,

Are you sure about the syntaxe of declaration
i don't know C51
but for C18 case i use like this.

Code:
font5x7.h contains :

const unsigned char tableN[480] = {
0x00,0x00,0x00,0x00,0x00, // 20 space ASCII table for NOKIA LCD: 96 rows * 5 shorts= 480 shorts
0x00,0x00,0x5f,0x00,0x00, // 21 ! Note that this is the same set of codes for character you
0x00,0x07,0x00,0x07,0x00, // 22 " would find on a HD44780 based character LCD.
0x14,0x7f,0x14,0x7f,0x14, // 23 # Also, given the size of the LCD (84 pixels by 48 pixels),
0x24,0x2a,0x7f,0x2a,0x12, // 24 \$ the maximum number of characters per row is only 14.
0x23,0x13,0x08,0x64,0x62, // 25 %
0x36,0x49,0x55,0x22,0x50, // 26 &
... etc ..
0x78,0x46,0x41,0x46,0x78}; // 7f Left Arrow <-

the term const means in Programm memory and is located before the table definition
not after..

and i tell to the compiler where to search my file font5x7.h
No error in compile, even in run.

##### Newbie level 6
thanks for help..paulfjujo
now its is working perfectly ... but if i put values for all the alphabet & number in an array the i got error as ..
'DATA': SEGMENT TOO LARGE
i.e. when i increase the size of FONT.h file compiler gives me this error .

#### paulfjujo

hello,

Sorry,i don't know C51, only PIC family
maybe you have to test inside the linker file amount of data available for data segment
maybe collapse more segment..if data segment lenght is limited to 256 bytes.
font table need 2 segments of 256 bytes..

or try to manage 2 table font
font1[256]
font2[224]

##### Newbie level 6
i think i need to interface external memory with c51

#### paulfjujo

hello,

Maybe you can use an external I2C RAMTRON FRAM 2Kbytes FM24CL16
Faster than a 24LC16 EEPROM classic..

##### Newbie level 6
ill interface it & check

Status
Not open for further replies.