Here is code to check your display (only). The code was tested using my clone Mega and the display wired as above. The code will print "millis() =" and the current value of millis() in the middle of the screen. If this does not work as described, try adjusting the contrast pot and check your wiring. .
#include <U8g2lib.h>
U8G2_ST7920_128X64_F_SW_SPI lcd(U8G2_R0, 23, 38, 39, U8X8_PIN_NONE);
void setup()
{
Serial.begin(115200);
lcd.begin();
lcd.setFont(u8g2_font_5x7_tf);
}
void loop()
{
updateTime();
}
void updateTime()
{
static unsigned long timer = 0;
unsigned long interval = 1000;
if (millis() - timer >= interval)
{
timer = millis();
lcd.clearBuffer();
lcd.setCursor(10, 32);
lcd.print("millis() = ");
lcd.print(millis());
lcd.sendBuffer();
}
}