Problem using ST7920 at MKR1000

Hi all,

Currently I’m using ST7920 128x64 display on MKR1000 with SPI communication and facing problem my display didn’t show anything. Does anyone have solution?

Here is my schematic:

Pin connection:

MKR1000 ST7920
Pin 9 SCK Pin E
Pin 8 MOSI Pin R/W
Pin 10 Pin RS

Sketch using u8g2 library:

#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>

#define MKR_EC 9
#define MKR_RW 8
#define MKR_RS 10

U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ MKR_EC /* A4 */ , /* data=*/ MKR_RW /* A2 */, /* CS=*/ MKR_RS /* A3 */, /* reset=*/ U8X8_PIN_NONE);
//U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R0, /* CS=*/ MKR_RS, /* reset=*/ U8X8_PIN_NONE);

void setup(void) {

void loop(void) {
  u8g2.clearBuffer();         // clear the internal memory
  u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
  u8g2.drawStr(0,10,"Hello World!");  // write something to the internal memory
  u8g2.sendBuffer();          // transfer internal memory to the display