PDA

View Full Version : Word Wrap on an LCD



Circuitbuilder9
04-03-2012, 01:24 AM
Hi, guys.
I am in the middle of a propeller project (involving an LCD and keyboard), and i was wondering if there was any code on the OBEX or in the forums about word wrap. Any suggestions?
A word wrap feature, along with writing to a mSD card are going to be the final touches on my project, and i would lie to finish completely.

Circuitbuilder9
04-03-2012, 07:12 PM
(posted this because it went off the page)
Hi, guys.
I am in the middle of a propeller project (involving an LCD and keyboard), and i was wondering if there was any code on the OBEX or in the forums about word wrap. Any suggestions?
A word wrap feature, along with writing to a mSD card are going to be the final touches on my project, and i would lie to finish completely.

SRLM
04-03-2012, 07:18 PM
What, specifically, do you want the code to do?

Paul
04-03-2012, 08:08 PM
And more specifically, what do you mean by "LCD". Parallax sells a 8x2 LCD but you probably would have to wrap each word on it. Too many unknowns at this point to give you much in the way of help. Please advise.

Circuitbuilder9
04-03-2012, 08:28 PM
And more specifically, what do you mean by "LCD". Parallax sells a 8x2 LCD but you probably would have to wrap each word on it. Too many unknowns at this point to give you much in the way of help. Please advise.

I am going to do this for a 4 x 20 LCD from parallax. In that, i would like to know how to word wrap. In any case, i would like to know how anyway.

tingo
04-05-2012, 03:34 PM
I'm not sure what you are asking. The comcept is easy; you need to keep track of how many characters are left on your current line. You compare that with the next word you intend to print, if the word is longer (have more characters), you print it on the next line. Details on how to "keep track of characters left" and "prin on the next line" will (of course) vary with the type of display you use.