diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-02-25 13:17:59 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-02-25 13:17:59 -0500 |
commit | b505ab981859761a9eae9e820c5a06e2210c5dfc (patch) | |
tree | 8f4aaac412a1bcfe3abb5551e532333a3a609685 /libraries | |
parent | 262e01aa1f5944544df040105e764e62a7864883 (diff) | |
download | librambutan-b505ab981859761a9eae9e820c5a06e2210c5dfc.tar.gz librambutan-b505ab981859761a9eae9e820c5a06e2210c5dfc.zip |
Shaving 32 microseconds off of LiquidCrystal::pulseEnable().
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/LiquidCrystal/LiquidCrystal.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libraries/LiquidCrystal/LiquidCrystal.cpp b/libraries/LiquidCrystal/LiquidCrystal.cpp index 366ad6c..f05aed8 100644 --- a/libraries/LiquidCrystal/LiquidCrystal.cpp +++ b/libraries/LiquidCrystal/LiquidCrystal.cpp @@ -303,16 +303,16 @@ void LiquidCrystal::pulseEnable(void) { digitalWrite(_enable_pin, LOW); delayMicroseconds(1); - // Enable pulse must be > 450 ns. Value chosen here is the max - // of the following two reports: - // http://forums.leaflabs.com/topic.php?id=640&page=2 + // Enable pulse must be > 450 ns. Value chosen here according to + // the following threads: + // http://forums.leaflabs.com/topic.php?id=640 // http://forums.leaflabs.com/topic.php?id=512 - digitalWrite(_enable_pin, HIGH); - delayMicroseconds(30); + togglePin(_enable_pin); + delayMicroseconds(1); + togglePin(_enable_pin); // Commands needs > 37us to settle. - digitalWrite(_enable_pin, LOW); - delayMicroseconds(45); + delayMicroseconds(42); } void LiquidCrystal::write4bits(uint8 value) { |