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
     do {
158
     do {
159
       WRITE(ST7920_CLK_PIN, LOW);
159
       WRITE(ST7920_CLK_PIN, LOW);
160
       WRITE(ST7920_DAT_PIN, val & 0x80);
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
       WRITE(ST7920_CLK_PIN, HIGH);
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
       val <<= 1;
164
       val <<= 1;
165
     } while (--n);
165
     } while (--n);
166
   }
166
   }
171
   #define ST7920_SND_BIT(nr)              \
171
   #define ST7920_SND_BIT(nr)              \
172
     WRITE(ST7920_CLK_PIN, LOW);           \
172
     WRITE(ST7920_CLK_PIN, LOW);           \
173
     WRITE(ST7920_DAT_PIN, TEST(val, nr)); \
173
     WRITE(ST7920_DAT_PIN, TEST(val, nr)); \
174
-    DELAY_NS(500);                        \
174
+    DELAY_NS(700);                        \
175
     WRITE(ST7920_CLK_PIN, HIGH);          \
175
     WRITE(ST7920_CLK_PIN, HIGH);          \
176
-    DELAY_NS(500);
176
+    DELAY_NS(700);
177
 
177
 
178
   static void ST7920_SWSPI_SND_8BIT(const uint8_t val) {
178
   static void ST7920_SWSPI_SND_8BIT(const uint8_t val) {
179
     ST7920_SND_BIT(7); // MSBit
179
     ST7920_SND_BIT(7); // MSBit

Loading…
Cancel
Save