How To use LCD 20 x 04 DOGM204 from Electronic Assembly via SPI

Hello together,

as there are some experience reports here in the forum with the 20x04 LCD-Display DOGM204 from Electronic Assembly via SPI - which are not that successful - I want to provide some imformation about a successful project.

General information is provided at the webpage Chip-On-Glass DOG Displays von DISPLAY VISIONS. Unfortuantely the manufacturer does not provide a lib or other arduino related information about the display.

I choose this display because it has all interfaces 4bit, 8bit, I2c, SPI onboard and provides different color background options. I use an arduino micro. The LCD-Display is not compatible with the LCD-libs provided with arduino or in the web, because the display controller is the SSD1803A, which is different from the widely used hd44780.

I will explain my experiences with the SPI interface here, because it needs no additional ports on the arduino micro board beside the two MOSI and SCLK ports (which are mostly not used i my projects). The display has a SOD-Pin (Slave out) - this pin needs not to be connected, as we do not need read information from the display - we only write to the display.

First to say is, that module requires some external components. 7 small capacitors. And next to say, the LCD works with 3.3V - on supply level and control level - which requires voltage dividers on the 2 SPI control lines (4 resistors required). There you have to implement the circuit in the attachment first.

Yes, some effort. For the first time you can ignore the cabling below display, it is required for display lights only. The voltage dividers are made with 1k + 2.2k resistors., which provide a SPI-signal level of about 3.3V. (The arduino micro works with 5v all the pins). As display power supply you can use the 3.3V pin of the arduino micro of course.

This ist the first step. Go on with next post...

DOGM204SPIBreadb.JPG

1 Like

Ok, first step of cabling should be ready. Next step is controlling the display. As there is no arduino lib for this purpose, I used the standard SPI lib here and added all code in the main programm part. This is more convenient for exploring the behaviour.

The complete code is added here as attachement. You may open a new arduino project, paste the whole code an use it for your own projects.

The whole code is fairly short for complete display interface and demo program.

Some remarks:

  1. The display should be reseted for first usage in a program, otherwise the startup behaviour is not stable and program execution may fail. I used a port for this purpose (it can be done with some external components too, see EA pdf for this). The reset pin is alway HIGH (3.3V), only for reset its LOW for at least 20ms. The reset requires a voltage divider to 3.3V too !

  2. SPI initialization for arduino is standard. The display requires a SPI.beginTransaction( SPISettings(1000000 / 8, LSBFIRST, SPI_MODE0) ).

  3. The LCD initialzation sequence is taken exactly from the Spec.

  4. I used the onboard LED blinking on PIN 13. only for tracing the program progress. It has no purpose for the display control.

  5. The control of Slave-Select (SS) is optional, use it if you need, or delete it.

  6. Most comments in the source code are in German, however its self explainig :slight_smile:

  7. Nice feature is setting the display contrast via program code.

So far. Comments welcome - bspx

DOGM204SPIArduino.txt (8.36 KB)

1 Like

Here is a short demo clip of the program ...

DOGM204SPIArduino.mpg (1.95 MB)

Just wanted to add a link to my library in case somebody searches for how to control the dogm204 in 4bit mode!