Go Down

Topic: LCD4Bit for 20x4 displays! (Read 8 times) previous topic - next topic

Bjonnh

Hi everyone,

I've made a modified version of the LCD4Bit for allowing it to work with my 20x4 displays, it should continue to work with 20x1, 20x2 and others display (I hope so). Hope it'll help some of you!

My display: White on Blue retro with two KS0066U-00PCC and KS0065BPCC controllers (they are HD44780 code compatible but offers some characters and other functions) from Lextronic France (http://www.lextronic.fr/ODT/4x20.htm it's not exactly the one on the pictures, I got one from them for only 12 euros last year, their new ones are a little bit more expensive).
Datasheet: http://www.lextronic.fr/ODT/20x4/20416D.zip
Library: http://lutingaia.free.fr/LCD4Bit_20x4.zip

If you have any question feel free to ask!

Jonathan.

neillzero

Nice!  Also, thanks for writing it up in the wiki.  I'm short for time at the moment, but I'll try to retest this library on the 1 and 2 line displays so that we can just offer this one version.

Bjonnh

Could also add this to add user-defined characters:


Code: [Select]

void LCD4Bit::WriteCGRAM(int adress, char code[]) {
  commandWrite(0x40+(adress<<3));

  for (int i=0 ; i <= 7 ; i++)
       {
               print(code[i]);
       }
  commandWrite(CMD_HOME);

}


I'm using the CMD_HOME to return to the DDRAM adress of the beginning of the screen. I don't know how to read the DDRAM adress from the LCD to send it back to it after CGRAM writing (we needed to do that because the controller only has one memory pointer).

Bjonnh

New version that includes:

_ CGRAM through WriteCGRAM (int character, char code[])
_ Speed optimization of  cursor positioning (by a factor "position")

http://lutingaia.free.fr/LCD4Bit.zip

Please test it with 1,2 and 4 lines displays if you can!



netnews

Jonathan
i have the same display (not working yet), can you show the wiring diagram you used, and the modifications you made to the sample code.  also, did you ground RW ? ( as indicated in reply #10 of http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1160586800/0#0)
thx
!!
detailed version http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1173804342
---------------------------------------------------

Quote
Hi everyone,

I've made a modified version of the LCD4Bit for allowing it to work with my 20x4 displays, it should continue to work with 20x1, 20x2 and others display (I hope so). Hope it'll help some of you!

My display: White on Blue retro with two KS0066U-00PCC and KS0065BPCC controllers (they are HD44780 code compatible but offers some characters and other functions) from Lextronic France (http://www.lextronic.fr/ODT/4x20.htm it's not exactly the one on the pictures, I got one from them for only 12 euros last year, their new ones are a little bit more expensive).
Datasheet: http://www.lextronic.fr/ODT/20x4/20416D.zip
Library: http://lutingaia.free.fr/LCD4Bit_20x4.zip

If you have any question feel free to ask!

Jonathan.


Go Up