From 99b2fc2066372ad091903ff2a4ccc0e0d679ed7e Mon Sep 17 00:00:00 2001 From: etagle Date: Thu, 21 Dec 2017 02:33:22 -0300 Subject: [PATCH] Adjusted timings on the ST7290 u8glib so RE-ARM and RAMPS4DUE have no problems when writing to the graphics LCD. This fixes Issue #8787 - Special thanks to Bergerac56 for testinf this out !!! --- Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp index 655da54139..0fccba9ce3 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp @@ -158,9 +158,9 @@ FORCE_INLINE static void DELAY_CYCLES(uint32_t x) { do { WRITE(ST7920_CLK_PIN, LOW); WRITE(ST7920_DAT_PIN, val & 0x80); - DELAY_NS(500); + DELAY_NS(700); /* RE-ARM requires 700ns to be stable, RAMPS4DUE works with 500ns */ WRITE(ST7920_CLK_PIN, HIGH); - DELAY_NS(500); + DELAY_NS(700); /* RE-ARM requires 700ns to be stable, RAMPS4DUE works with 500ns */ val <<= 1; } while (--n); } @@ -171,9 +171,9 @@ FORCE_INLINE static void DELAY_CYCLES(uint32_t x) { #define ST7920_SND_BIT(nr) \ WRITE(ST7920_CLK_PIN, LOW); \ WRITE(ST7920_DAT_PIN, TEST(val, nr)); \ - DELAY_NS(500); \ + DELAY_NS(700); \ WRITE(ST7920_CLK_PIN, HIGH); \ - DELAY_NS(500); + DELAY_NS(700); static void ST7920_SWSPI_SND_8BIT(const uint8_t val) { ST7920_SND_BIT(7); // MSBit