JLX12864G-378 wiring to Arduino

Attached is the 20 pin layout.

Can you help in wiring it to Arduino. Also what library I should I use ?

In one possibility, only 8 pins used (5-12)


but I have no clue what Arduino pins to use and what protocol and library …in a nutshell total confusion !!!
Tracing the schematic… also attached

RST was connected to RX Pin 0
CS To TX Pin1
D7 To Pin 2 Int
D6 To Pin 3 Int

The other 4 pins are for powering the Display ( I presume !!)

For the sake of completion, I am attaching the manufacturer datasheet ( in Chinese )

JLX12864G-378-PC的中文字库编程说明书.pdf (917 KB)

Schematic: This does not look like an Arduino Board. How is the schematic related to your questions?
One more thing: You should not connect the LCD to 5V GPIO Pins. You need a level shifter IC (like 74HC4050) between the controller and the display.

Display: A displays usually comes with a display controller. It is a key information to know the controller name. In your case it is a ST7565 (as stated in the datasheet).

Display PCB: The ST7565 supports several communication interfaces (parallel, SPI, I2C). Usually the type of the interface can be changed on the PCB by changing solderbridges there. Please post a picture of the back side of your display to identify the interface type.

Library: This display is supported by u8g2, see here: https://github.com/olikraus/u8g2/issues/440. Use the NHD_C12864 constructor:


Thank you for your quick response.

The processor in the schematic is ATmega8/168/328 which is an arduino compatible

Here is the Display

If you need a better picture ...please let me know....and I will do it

Here is a better picture …I hope !!

I downloaded the library u8g2, picked the sketch HelloWorld.ino ( it figures!!!)
and chose

U8X8_ST7567_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);

Now the wiring.......Help please

As mentioned via the links of my first post, you must use
U8G2_ST7565_NHD_C12864_1_4W_SW_SPI or U8X8_ST7565_NHD_C12864_4W_SW_SPI (depending on the library mode).

According to the picture, your display is configured in 4-wire SPI mode.

Now the wiring.......Help please

Basically it is like this: Connect your display (clock, data, cs, dc (a0 or rs) and reset to any empty GPIO pin.
Write down the Arduino pin nummer and pass that pin number to the U8g2 (or U8X8) constructor. My suggestion is to make a mapping table like this
clock --> arduino pin number
data --> arduino pin number
cs--> arduino pin number
dc/a0/rs--> arduino pin number
reset--> arduino pin number

Let me assume the table looks like this:

clock --> 13
data --> 11
cs--> 7
dc/a0/rs--> 9
reset--> 8

then the constructor will look like this:

U8X8_ST7565_NHD_C12864_4W_SW_SPI(/* clock=/ 13, / data=/ 11, / cs=/ 7, / dc=/ 9, / reset=*/ 8)


  1. I do not know your board. So you are on your own with the Arduino Pin numbers.
  2. There MUST be some kind of level shifting. Your display has a 3.3V controller which will not be able to communicate with a 5V microcontroller. The level shifting might be on the display, but to be on the safe side, you should do a level shifting here by yourself.


I do appreciate your patience and support in such "complex" topic. The confusion stems from the fact that pin labelling is NOT standard ( at least to my understanding ). Not only that but rather confusing. For example RS and RST and RES. I am sure there is a logical explanation; unless it is deliberate to safeguard the developer.

You gave me a lot of info about the topic in hand and I will take it from here. I am extremely appreciative for giving me such support.

Thank you