
TextLCD library for controlling various LCD panels based on the HD44780 4-bit interface
Fork of TextLCD by
Diff: TextLCD.cpp
- Revision:
- 9:dbeef6223e7a
- Parent:
- 7:44f34c09bd37
--- a/TextLCD.cpp Thu Jan 02 21:07:01 2014 +0000 +++ b/TextLCD.cpp Fri Jul 07 15:27:16 2017 +0000 @@ -25,7 +25,7 @@ TextLCD::TextLCD(PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7, LCDType type) : _rs(rs), - _e(e), _d(d4, d5, d6, d7), + _e(e,1), _d(d4, d5, d6, d7), _type(type) { _e = 1; @@ -39,12 +39,13 @@ wait(0.00164); // this command takes 1.64ms, so wait for it } writeByte(0x2); // 4-bit mode - wait(0.000040f); // most instructions take 40us + wait(0.00164); // 1.64ms writeCommand(0x28); // Function set 001 BW N F - - writeCommand(0x0C); writeCommand(0x6); // Cursor Direction and Display Shift : 0000 01 CD S (CD 0-left, 1-right S(hift) 0-no, 1-yes cls(); + } void TextLCD::character(int column, int row, int c) {