From 53faf79c1515aebc00de36de5b565ecc94297cbc Mon Sep 17 00:00:00 2001 From: Arie Johan van de Werken Date: Tue, 24 May 2016 14:00:56 +0200 Subject: [PATCH] Update LiquidCrystal.cpp // Due to inaccurate timing, skipping pulses. Results scrambled screen // (http://arduino.cc/en/Reference/delayMicroseconds) --- src/LiquidCrystal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LiquidCrystal.cpp b/src/LiquidCrystal.cpp index 8c6cdf0a..93834931 100644 --- a/src/LiquidCrystal.cpp +++ b/src/LiquidCrystal.cpp @@ -302,11 +302,11 @@ void LiquidCrystal::send(uint8_t value, uint8_t mode) { void LiquidCrystal::pulseEnable(void) { digitalWrite(_enable_pin, LOW); - delayMicroseconds(1); + delayMicroseconds(5); digitalWrite(_enable_pin, HIGH); - delayMicroseconds(1); // enable pulse must be >450ns + delayMicroseconds(5); // enable pulse must be >450ns digitalWrite(_enable_pin, LOW); - delayMicroseconds(100); // commands need > 37us to settle + delayMicroseconds(90); // commands need > 37us to settle } void LiquidCrystal::write4bits(uint8_t value) {