Page 1 of 1
sending dynamic data
Posted: Wed Dec 03, 2008 10:25 am
by MMBosstones86
I was wondering how to send dynamic data.
I'm trying to create a stopwatch with the GLK19264-7T-1U. I can output commands and data perfectly in SCI, but don't know how to create it for data that isn't get defined.
for example, I want to output x...and x changes constitently.
I know my question is kind of vague...hope someone can help.[/code]
Posted: Wed Dec 03, 2008 10:52 am
by Ray
That shouldn't be that hard.
Draw X and when X changes clear the area you drew X and draw the updated X?
Posted: Wed Dec 03, 2008 12:44 pm
by MMBosstones86
Ray,
Thanks for the quick response. Could you elaborate on what you mean by 'Draw X'?
So say i have x = 12 and y = 43 and I want to print 12.43. In the manual it just talks about drawing pixels, lines, graphs etc.
You'll have to forgive me, i've only been programming the LCD for a few days
Thanks again
Posted: Wed Dec 03, 2008 1:08 pm
by Ray
its really easy, if you want to display 12.43 you send 12.43 to the display easy as that

Posted: Thu Dec 04, 2008 8:23 am
by MMBosstones86
I have that so far, but my question is what if I don't know what x and y are, but want to print x.y for my stopwatch. do I have to make a case for every possibility?
if x == 1
print 1
else if x == 2
print 2
.
.
.
??
Posted: Thu Dec 04, 2008 8:38 am
by Ray
You just need to send a string to the display with whatever you want to display. How you do that is all up to you, I can tell you a huge function with 60 ifs is pretty certain not the most optimal way to do it. Although I'd love to give you a course in the foundations of programming this is way beyond the scope of this forum and there are places that do a better job at it then we ever could. I suggest you pickup a book on the language you are planning on using and go from there.