LiquidCrystalFast Arduino Library ================================= LiquidCrystalFast is an improved version of the Arduino LiquidCrystal library. The primary improvements are increased speed when the RW pin is connected, and support for 40x4 displays. LiquidCrystalFast History ------------------------- In early-2010, John Raines rewrote the LiquidCrystal library, adding several features, fixing problems, and greatly improving its speed. The final version of John's excellent work is at: http://code.google.com/p/liquidcrystal440/ John prepared a version for inclusion in Arduino 0019, with certain features removed as requested by the Arduino developers. However, the Arduino project never adopted John's code. In mid-2011, Paul Stoffregen merged some of John's versions of the library and renamed it "LiquidCrystalFast", so it can be used on Arduino without removing LiquidCrystal. Speed Increase (with RW pin) ---------------------------- Using the example in File > Examples > LiquidCrystalFast > Benchmark on a Teensy 2.0 with Arduino 0022 and Teensyduino 0.95 running on a 16x2 LCD: LiquidCrystalFast: 89 milliseconds. LiquidCrystal: 354 milliseconds. John Raines's Original Readme ============================= This version of LiquidCrystal supports the API of LiquidCrystal in Arduino 17 fully but does not actually ever use 8 data pins. This change makes the code smaller, saving flash RAM and also less complex, making it easier to read. 40x4 LCDs --------- I added support for an LCD of 4 LInes and 40 characters. I think that if 24x4, 32x4 LCDs exist, they would also work with the software as I have modified it although I have not had the opportunity to test that. The 40x4 LCD (and any HD44780 based LCD with between 81 and 160 characters) will have 2 enable lines. To use an LCD with 4 lines and 40 columns you would declare your LiquidCrystal object as: LiquidCrystal lcd(RS,RW,Enable1,Enable2, data3,data2,data1,data0); At this time I donʼt support 8 data lines. (You can pass 255 as the RW item, ground RW and save an Arduino pin.) Then in the setup function you would call: lcd.begin(40,4); Linewrap -------- When you declare the dimensions of the LCD in your begin call, the LiquidCrystal library remembers how long the lines are. Now when it reaches the end of line 1, text wraps onto line 2 (not line 3 as previously). println ------- Although print has worked properly in the past, println has not. Now the ʻ\rʼ and ʻ\nʼ characters are not sent to the screen as though they were visible characters and the ʻ\rʼ resets the character position to the top of the next line. 16x4 LCDs --------- The begin statement also correctly positions text at the beginning of the line on 16x4 (and 40x4) LCDs, which were not correctly handled before. setCursor --------- In the past setCursor selected a location in the HD44780ʼs RAM not actually a screen location. If you use any of the commands that shift the display left or right with the previous routines, then setCursor and print, text appears in an unexpected location on the screen. With the new software, if you call either scrollDisplayLeft() or scrollDisplayRight(), the LiquidCrystal package keeps track of the relationship between RAM and the LCD so that setCursor coordinates are pegged to a specific spot on the screen, rather than a spot in RAM. The sotware does not handle autoScroll, however. Call home() after autoScroll to restore the expected relationship between setCursor and the LCD screen. Testing the LCD Busy Flag ------------------------- Previous versions of LiquidCrystal always used timed delays on the Arduino side of the interface to give the LCD module enough time to complete its operation. This version still does that if you tie the RW pin to ground and do not tell LiquidCrystal what that pin number is. If you do specify RW now, however, the software will poll the busy flag on the LCD module. Arduino operations may thus overlap LCD operations and potentially things may go a little faster. Syntactic Sugar --------------- #include from http://arduiniana.org/2009/04/new-streaming-library/ Then you can combine that with an overloading of the () operator in this code. This lets you specify screen location and chain print commands together by writing: lcd(column,line)<<“a=”<