Browse Source

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 !!!

etagle 6 years ago
parent
commit
99b2fc2066
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp

+ 4
- 4
Marlin/src/lcd/dogm/u8g_dev_st7920_128_64_sw_spi.cpp View File

@@ -158,9 +158,9 @@ FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
158 158
     do {
159 159
       WRITE(ST7920_CLK_PIN, LOW);
160 160
       WRITE(ST7920_DAT_PIN, val & 0x80);
161
-      DELAY_NS(500);
161
+      DELAY_NS(700); /* RE-ARM requires 700ns to be stable, RAMPS4DUE works with 500ns */
162 162
       WRITE(ST7920_CLK_PIN, HIGH);
163
-      DELAY_NS(500);
163
+      DELAY_NS(700); /* RE-ARM requires 700ns to be stable, RAMPS4DUE works with 500ns */
164 164
       val <<= 1;
165 165
     } while (--n);
166 166
   }
@@ -171,9 +171,9 @@ FORCE_INLINE static void DELAY_CYCLES(uint32_t x) {
171 171
   #define ST7920_SND_BIT(nr)              \
172 172
     WRITE(ST7920_CLK_PIN, LOW);           \
173 173
     WRITE(ST7920_DAT_PIN, TEST(val, nr)); \
174
-    DELAY_NS(500);                        \
174
+    DELAY_NS(700);                        \
175 175
     WRITE(ST7920_CLK_PIN, HIGH);          \
176
-    DELAY_NS(500);
176
+    DELAY_NS(700);
177 177
 
178 178
   static void ST7920_SWSPI_SND_8BIT(const uint8_t val) {
179 179
     ST7920_SND_BIT(7); // MSBit

Loading…
Cancel
Save