Skip to content

Commit 21d8edb

Browse files
committed
Fix problem with Kanji characters appearing on some displays
1 parent 073c563 commit 21d8edb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Display/ST7920/lcd7920.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const uint8_t LcdSetDdramAddress = 0x80; // add the address we want to set
2525
// LCD extended instructions
2626
const uint8_t LcdSetGdramAddress = 0x80;
2727

28-
const unsigned int LcdCommandDelayMicros = 72 - 8; // 72us required, less 7us time to send the command @ 2.0MHz
28+
const unsigned int LcdCommandDelayMicros = 72 - 8; // 72us required, less 7us time to send the command @ 2.0MHz
2929
const unsigned int LcdDataDelayMicros = 4; // delay between sending data bytes
3030
const unsigned int LcdDisplayClearDelayMillis = 3; // 1.6ms should be enough
3131

@@ -64,11 +64,13 @@ void Lcd7920::Init()
6464
delayMicroseconds(1);
6565

6666
sendLcdCommand(LcdFunctionSetBasicAlpha);
67-
delay(1);
67+
delay(2);
6868
sendLcdCommand(LcdFunctionSetBasicAlpha);
6969
CommandDelay();
7070
sendLcdCommand(LcdEntryModeSet);
7171
CommandDelay();
72+
sendLcdCommand(LcdDisplayClear); // need this on some displays to ensure that the alpha RAM is clear (M3D Kanji problem)
73+
delay(LcdDisplayClearDelayMillis);
7274
sendLcdCommand(LcdFunctionSetExtendedGraphic);
7375
CommandDelay();
7476

0 commit comments

Comments
 (0)