how to show a variable via Glcd_Write_Text??

General discussion on mikroC.
Post Reply
Author
Message
GrunF
Posts: 13
Joined: 05 Dec 2010 17:01

how to show a variable via Glcd_Write_Text??

#1 Post by GrunF » 05 Dec 2010 17:06

hello to all!!!

now i am new in programing in mikroC and C in general, child of basic :D, now my question is how to set up a varaible and use it to show it on GLCD using Glcd_Write_Text Routine???

thx in advance!!!

Sobrietytest
Posts: 619
Joined: 05 Jul 2008 06:05
Location: Thailand

Re: how to show a variable via Glcd_Write_Text??

#2 Post by Sobrietytest » 06 Dec 2010 11:55

For example, if you had an integer variable...

Code: Select all

int MyVal;
char MyString[7];
....

IntToStr(MyVal, MyString);    //Convert integer value to text string)

Glcd_Write_Text(MyString, 8, 1, 1);   //Write MyString at position 8 on page 1


GrunF
Posts: 13
Joined: 05 Dec 2010 17:01

Re: how to show a variable via Glcd_Write_Text??

#3 Post by GrunF » 06 Dec 2010 12:17

ok i am going to try it during the day

thx

Post Reply

Return to “mikroC General”