CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

A Graphic LCD question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
theasus



Joined: 31 May 2009
Posts: 79

View user's profile Send private message

A Graphic LCD question
PostPosted: Wed Mar 24, 2010 2:46 pm     Reply with quote

For example I have some data like this;
data[0]=7
data[1]=10
data[2]=12
And I want to show this data on graphic lcd how can i do this?
I have used these codes but it didn't work.
Code:

   data[0]=7;
   glcd_text57(0, 15, data[0], 1, ON);


And then I have tried these codes;
Code:

   data[0]=7;
   i=0;
   glcd_text57(0, 15, data[i], 1, ON);

But It didn't work again.Could you help me?(Compiler version is 4.068)
Also I'm using these libraries for graphical lcd and I have no other problem with graphical LCD;
#include <HDM64GS12.c>
#include <graphics.c>
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 24, 2010 2:55 pm     Reply with quote

Post what you want to see on the GLCD.
You have this data:
Quote:

data[0]=7
data[1]=10
data[2]=12


Do you want to see this?
Quote:
71012


Or something else ? Post what you want to see.
dezso



Joined: 04 Mar 2010
Posts: 102

View user's profile Send private message

PostPosted: Wed Mar 24, 2010 8:10 pm     Reply with quote

Code:

char data_str[3];
sprintf(data_str, "%u", data[i]);
glcd_text57(0, 15, data_str, 1, ON);


try this
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group