Go Down

Topic: LCD Library (Read 10678 times) previous topic - next topic


Good point on the diagram.

The LiquidCrystal library in Arduino 0012 will support both 4 and 8 bit.  For the moment, there's no serial support, since I guess every Serial LCD has a different interface.  The playground is publicly editable, but you should probably coordinate with whoever posted the version you want to modify / improve.


i am working only a short time now with lcd´s. But as a newbie there i have brand new questions i have had.
For example: what happens with signs in column 17 when you  have 16x2 display.
Does the hole stuff scroll to the left one char or will it dissapear or will it be in some ram? Will it go to the next line? could that be possible? Like serial, a behavior like a terminal?
One of many things i wanted to read in the controller manual? but i don´t had time until now.
I think if you want to have a consistency here, the behavior should be like in a terminal. (my thoughts ;-) )
Then the print & println makes sense, because you expect this line oriented behavior. I have similar behavior for example in python or perl with text output not only with serial communication.
it is also possible to clear a terminal and navigate to a position.
a lcd is a kind of a very small terminal, especially with only one line. But with 2 the picture becomes a bit more sharper and with 4 it should be sharp.
cd with more line become affordable so we should think about this and . . .

a n d . . .  what about graphic lcd?

if not now implemented, we should think about to get it maybe in v13. all the features of the text lcd should be consistent on a graphic display too! The only difference should be that you are able to program your graphics also.

Another question i have, what about lcd´s with newer technologies. Like the dog-m series.
If you want to take a look: http://www.lcd-module.de/eng/dog/dog.htm
Here you can see what the future can change in a maximum compatible way on the hardware side.
I am fiddling around to get the 1 line 8 char version to run, in little steps, (looks good at the moment).
The only difference here, before the last two commands of init( clear and cursor mode), some commands have to be written in sequence (3.3V or 5V, contrast, voltage, bias, ..) it´s only five to seven commands.
But thats only with 4bit mode. You have also an additional SPI mode, and the controller manual says there exists also a i2c version! I would really like a i2c interface! Thats so easy to use.
Apropos: SPI is also a library worth, hopefully without headache - which mode(1to4), howto more devices?.
So we have to expect some additional technology there also.
Isn´t the 4bit data protocol called something like 6800 code and the 8bit 8521? . as i have in mind now. So it comes from the old days, when we were happy to have an epson FX80 printer! Isn´t 6800 a 8bit uprocessor a sister series to the 6502 (2MHz, the heart of the 8bit Ataris :) ) the predecessor of the 68000 32/16 (heart of Atari ST).

So in consistency, can the data protocol brought to where it belongs, in some extra or one extra library?
something like: DATA bitshinundher1 = DATA(SPI, MODE, CS, CLK, DO, DI); - atmega manual has also something to say here!

or   DATA bitshinundher2 = DATA(4P , RS, RW, E, D4, .. D7);
or   DATA bitshinundher3 = DATA(SER , BAUD, PAR, ?.);
or   DATA bitshinundher4 = DATA(2W ,  ?.);
or whatever, these data transfer protocols are a bit too complicated to handle, i think.
with a good standard protocol library in the background, other libraries could also really benefit of it,
maybe a gps, LED, Bluetooth or whatever lib which has to communicate to some klingon ic in some klingon protocol.

Code: [Select]
LCD klingonlcd = LCD(x rows ( , y cols (, COLOR)) ); // text lcd only rows, graphic x & y , standard bw or RGB-bit - 256 or 12364 or ?
I think thats it what a lcd defines: rows, columns and colormode

all other is secondary,

Code: [Select]
klingonlcd.data(PROTOCOL (, spec1 (, specx. . . )));
and then if necessary a not standard init:
Code: [Select]
klingonlcd.initlcd(0xXX (, 0xYY(, B0100100 . . . )));  // the additional init sequence

or can we make lcdfactfiles, like the atmega168 file for the compiler, where it can check where the ports are and what features a special avr chip has?
Code: [Select]
# include "4bit.lcdprot"  // if necessary add a lcd specific file:
# include "klingon.lcdspec"   // don´t know if possible.
# include "cc.arduino.dataprot.4bit.lcd"  
# include "cc.arduino.spec.lcd.klingonlcd"  

( ohh, what would i give for to know the C Syntax much more better then yet :( , often i feel so handicaped, have it in mind, but don´t know how to write.. . )

so. it´s too late now. stop thinking and go sleeping
and there´s more than one way to do that.

goodNight.Austin Texas! Or wherever you are!

PS: if someone uses Dog-M displays, they are really nice!, BUT MIND the gap: THERE IS a foly on the back of the display! Especially when you can see a light gray line! But don´t scratch away the milky part of the display. For german buyers: you can get them at http://www.reichelt.de the text version 12? lcd + 4? standard colors led backlight. Thats really affordable for what you get.

Go Up