[SOLVED] RG12864E Graphics Display not working

Hi,

I have an RG12864E 128x64 GLCD. The LCD shows a white screen without an external potentiometer and a blue screen with it. Some YouTube videos instruct to adjust the onboard pot, but there is no onboard pot on this LCD.

I have tried all the available graphics LCD libraries but can't make it work.

Request you to please help.

Thank you

Please post a link to the actual display that you have bought.
Then we don't have to guess.

Google found RG12864E series 128x64 LCD 113.0mm x 53.0mm - Easby Electronics
Please confirm if it is the correct display.

RG1286E appears to have NT0108 controller which is the equivalent of KS0108.

Install U8g2lib or other KS0108 library.

Connect a pot between pin #1, pin#18 with the slider to pin#3. Adjust for contrast.

David.

Hi David,

Thanks for the reply. I don't have much details about the LCD as it was bought from a local electronics store. Please find the images attached. However, I will try what you have suggested and will let you know the results.

Thank you

Hi David,

I tried using KS0108 Library and got an error. The error is:


Arduino: 1.8.16 (Windows 10), Board: "Arduino Uno"

In file included from C:<Path>\Arduino\libraries\KS0108-master\examples\GLCDexample\GLCDexample.pde:11:0:

C:<Path>\libraries\KS0108-master/ks0108.h:32:17: error: conflicting declaration 'typedef uint8_t boolean'

typedef uint8_t boolean;
^~~~~~~

In file included from sketch\GLCDexample.pde.cpp:1:0:

C:\Users<Path>\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/Arduino.h:126:14: note: previous declaration as 'typedef bool boolean'

typedef bool boolean;
^~~~~~~

In file included from C:\Users<Path>\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/Arduino.h:28:0,

             from sketch\GLCDexample.pde.cpp:1:

C:<Path>\libraries\KS0108-master/Arial14.h:48:27: error: variable 'Arial_14' must be const in order to be put into read-only section by means of 'attribute((progmem))'

static uint8_t Arial_14 PROGMEM = {
^

C:<Path>\libraries\KS0108-master/SystemFont5x7.h:41:28: error: variable 'System5x7' must be const in order to be put into read-only section by means of 'attribute((progmem))'

static uint8_t System5x7 PROGMEM = {
^

C:<Path>\libraries\KS0108-master/ArduinoIcon.h:11:30: error: variable 'ArduinoIcon' must be const in order to be put into read-only section by means of 'attribute((progmem))'

static uint8_t ArduinoIcon PROGMEM = {
^

exit status 1

Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


When I used U8g2lib, the display turns on and shows this:

Thank you.

Please copy-paste your U8g2lib constructor statement.
And describe your wiring i.e. which Arduino pin to which KS0108 pin.

I don't know the KS0108-master library. It does not sound like a Library Manager supported library.

David.

This is the constructor statement:

U8G2_SSD1306_128X64_NONAME_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8);


This is the circuit:

GLCD Arduino Pot
Pin 1 (Vss) GND Pin 1 of Pot
Pin 2 (Vcc) 5V -
Pin 3 (Vo) - Pin 2 (Slider) of Pot
Pin 4 (RS) 10 -
Pin 5 (R/W) 11 -
Pin 6 (En) 13 -
Pin 15 (CS1) GND -
Pin 17 (RST) 8 -
Pin 18 (Vee) - Pin 3 of Pot
Pin 19 (BLA) 3.3V -
Pin 20 (BLK) GND -


KS0108-master library was downloaded as .ZIP from GitHub and U8g2lib was downloaded from the library manager.

Thank you

This is how I connect a KS0108 display to a Uno:

U8G2_KS0108_128X64_F u8g2(U8G2_R0, 8, 9, 2, 3, 4, 5, 6, 7, A2, A0, A3, A4, U8X8_PIN_NONE, A5);
GLCD Arduino Pot
Pin 1 (Vss) GND Pin 1 of Pot
Pin 2 (Vcc) 5V -
Pin 3 (Vo) - Pin 2 (Slider) of Pot
Pin 4 (RS) A0 -
Pin 5 (R/W) GND -
Pin 6 (En) A2 -
Pin 7 (DB0) 8 -
Pin 8 (DB1) 9 -
Pin 9 (DB2) 2 -
Pin 10 (DB3) 3 -
Pin 11 (DB4) 4 -
Pin 12 (DB5) 5 -
Pin 13 (DB6) 6 -
Pin 14 (DB7) 7 -
Pin 15 (CS1) A3 -
Pin 16 (CS2) A4 -
Pin 17 (RST) A5 -
Pin 18 (Vee) - Pin 3 of Pot
Pin 19 (BLA) 3.3V -
Pin 20 (BLK) GND -

I suggest that you follow my wiring scheme and copy-paste my constructor.

Run all the U8g2 examples with this constructor.

When you are sure that everything is 100% you can change the wiring scheme for your convenience.

You have probably noticed that this display uses most of your Arduino pins. Leaving 10-13 for SPI and A1 for an Analog sensor.

David.

p.s. this adapter can make your KS0108 run on I2C.
https://www.ebay.co.uk/itm/263769081656

1 Like

Hi David,

It works like a charm! I am immensely grateful to you! I thought that the display was not working, and it was lying around for a couple of years. Finally, it is working because of your guidance! Thanks again.

Sincerely,
Shreyas

KS0108 works ok but uses a lot of wires.

Yes, I see that. Thanks again.

Sincerely,
Shreyas