Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

arzade

Newbie level 6
Joined
Apr 15, 2014
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
INDIA,NAGPUR
Activity points
74
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 .
 

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";

 

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
 

hello,


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

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: 57
Last edited:

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

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.
 

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 .
 

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]
 

hello,


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

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top