8 years, 11 months ago.

20x4 LCD with SSD1803 confused?

Hello!

First, thank you for your great work of this library!

I'm trying to use this LCD: http://www.lcd-module.de/fileadmin/eng/pdf/doma/dip203-4e.pdf

It is a 4x20LCD with SSD1803 controller. I connect it via SPI.

When using your test-code with this setup:

..
// SPI Communication
SPI spi_lcd(p5, p6, p7); // MOSI, MISO, SCLK
..
//Native SPI 3 wire, 24 bits, SSD1803A  TextLCD::SSD1803_3V3
TextLCD_SPI_N_3_24 lcd(&spi_lcd, p8, TextLCD::LCD20x4D, NC, TextLCD::SSD1803_3V3); 
// SPI bus, CS pin, LCDType=LCD20x4, BL=NC, LCDTCtrl=SSD1803 =Ok
..

I get:

/media/uploads/charly/lcd20x4-1.png

When I use TextLCD::LCD20x4 as LCD-Type I get:

/media/uploads/charly/lcd20x4-2.png

(The line-numbers get mixed up!)

Any idea what goes wrong here?

The memory-addresses shown on terminal for TextLCD::LCD20x4D look correct, for TextLCD::LCD20x4 are mixed up also:

TextLCD::LCD20x4

LCD Test. Columns=20, Rows=4
MemAddr(Col=0, Row=0)=0x00
MemAddr(Col=19, Row=0)=0x13
MemAddr(Col=0, Row=1)=0x40
MemAddr(Col=19, Row=1)=0x53
MemAddr(Col=0, Row=2)=0x14
MemAddr(Col=19, Row=2)=0x27
MemAddr(Col=0, Row=3)=0x54
MemAddr(Col=19, Row=3)=0x67

Thanks - Charly

Question relating to:

Updated for more display types. Fixed memoryaddress confusion in address() method. Added new getAddress() method. Added support for UDCs, Backlight control and other features such as control through I2C and … HD44780, LCD, PCF2116, ST7032, ST7036, text, TextLCD, WS0010

Hi Karl,

I had the same problem and read the datasheet of the SSD1803 controller and provided a fix for the display initialization. You can try (which worked fine for 20x4 display EA DIP203B): https://developer.mbed.org/users/0x6d61726b/code/TextLCD/

posted by 0x6d61726b 30 Apr 2017

1 Answer

8 years, 11 months ago.

Hmm, I have just tested the latest version of the lib on the DOGM204N-A using:

TextLCD_SPI_N_3_24 lcd(&spi_lcd, p8, TextLCD::LCD20x4D, NC, TextLCD::SSD1803_3V3); 

That looks fine.

The start addressvalues you get for the LCD20x4 are correct: 0x00, 0x40, 0x14, 0x54 You see that lines 2 and 3 just continue from where lines 0 and 1 finish.

The start addressvalues you get for the LCD20x4D should be: 0x00, 0x20, 0x40, 0x60 Is that what you see?

Make sure the lib is updated to the most recent version. I will have a look at the datasheet for your display.

Accepted Answer

Hi! Lib is up to date. For LCD20x4D I get this addresses:

LCD Test. Columns=20, Rows=4
MemAddr(Col=0, Row=0)=0x00
MemAddr(Col=19, Row=0)=0x13
MemAddr(Col=0, Row=1)=0x20
MemAddr(Col=19, Row=1)=0x33
MemAddr(Col=0, Row=2)=0x40
MemAddr(Col=19, Row=2)=0x53
MemAddr(Col=0, Row=3)=0x60
MemAddr(Col=19, Row=3)=0x73

Which are what the datasheet says they should be. But the display is as shown on the first picture.

Charly

I've just realized that there are more versions of SSD1803!

My display has SSD1803

Yours has SSD1803A

And they have different commands.... :-((

posted by Karl Zweimüller 22 Dec 2015

I am indeed suspicious about the controller on your board. The commandtable for Function Set is different between the datasheet in your link and the Solomon SSD1803A datasheet that I have. There is also a difference in the pins between the two datasheets: SSD1803A has D0/SCLK as combined pin, your datasheet has D0/SOD as combined pin. I will do some more digging, but the controller is different. It looks like a KS0078 or a KS0073 (with extended driver) which are 'almost compatible'. The lib doesnt support the KS0078 type for 20x4D, but you may try KS0073 instead.

Try

TextLCD_SPI_N_3_24 lcd(&spi_lcd, p8, TextLCD::LCD20x4D, NC, TextLCD::KS0073);
posted by Wim Huiskamp 22 Dec 2015

Hi!

TextLCD_SPI_N_3_24 lcd(&spi_lcd, p8, TextLCD::LCD20x4D, NC, TextLCD::KS0073);

This works, even the controller is another one!

It works!

Thanks a lot for your help.

Charly

posted by Karl Zweimüller 23 Dec 2015

It works because the SSD1803 is pretty much the same as the KS0073 as far as the commandset is concerned. I will add the SSD1803 to the next release of the lib and change the current SSD1803 into SSD1803A since they really are different.

posted by Wim Huiskamp 23 Dec 2015