How should I initialize a RepRap Discount 12864 on u8glib? I was taking the advantage of an existing piece of hardware (RepRapDiscount Full Graphic Smart Controller) for my present project.

Here is a link for the RepRap wiki about the controller

#define LCD_PIN_SCLK   A4
#define LCD_PIN_MOSI   6
#define LCD_PIN_CS   8
U8GLIB_ST7920_128X64_1X u8g(A4,6,8, U8G_PIN_NONE);


But all I got is a blank screen with no light at all. What has happened?
I solved the problem myself. It turns out to be a problem of wrong pinouts.

My PCB of the project was originally designed for the LCD2004 counterpart, and I thought it was a drop-in replacement for 12864. But no, it's not.


This is the "Smart Adaptors". Notice that the orientation are 180 degree different.

If you have the same problem not lighting up a 12864 when switching from 2004, or vice versa. Check your orientation as above.

My solution will be crimping a different JTAG wire instead.