From 9c410ddf68ae0afed0ea1183b255045b899ae664 Mon Sep 17 00:00:00 2001 From: dot-bob Date: Sat, 15 Apr 2017 22:45:15 -0600 Subject: [PATCH] Fixed an issue where a display with a hardware reset pin (LCD_RESET) may not get initialized properly. --- Marlin/ultralcd_impl_DOGM.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index cb06db95a2..3bbedea1b9 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -240,7 +240,7 @@ void lcd_printPGM(const char* str) { for (; char c = pgm_read_byte(str); ++str) lcd_print(c); } -// Initialize or re-initializw the LCD +// Initialize or re-initialize the LCD static void lcd_implementation_init() { #if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight @@ -248,7 +248,11 @@ static void lcd_implementation_init() { #endif #if PIN_EXISTS(LCD_RESET) + OUT_WRITE(LCD_RESET_PIN, LOW); // perform a clean hardware reset + _delay_ms(5); OUT_WRITE(LCD_RESET_PIN, HIGH); + _delay_ms(5); // delay to allow the display to initalize + u8g.begin(); // re-initialize the display #endif #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel