3 #ifndef LiquidCrystal_h
4 #define LiquidCrystal_h
15 #define LCD_CLEARDISPLAY 0x01
16 #define LCD_RETURNHOME 0x02
17 #define LCD_ENTRYMODESET 0x04
18 #define LCD_DISPLAYCONTROL 0x08
19 #define LCD_CURSORSHIFT 0x10
20 #define LCD_FUNCTIONSET 0x20
21 #define LCD_SETCGRAMADDR 0x40
22 #define LCD_SETDDRAMADDR 0x80
25 #define LCD_ENTRYRIGHT 0x00
26 #define LCD_ENTRYLEFT 0x02
27 #define LCD_ENTRYSHIFTINCREMENT 0x01
28 #define LCD_ENTRYSHIFTDECREMENT 0x00
31 #define LCD_DISPLAYON 0x04
32 #define LCD_DISPLAYOFF 0x00
33 #define LCD_CURSORON 0x02
34 #define LCD_CURSOROFF 0x00
35 #define LCD_BLINKON 0x01
36 #define LCD_BLINKOFF 0x00
39 #define LCD_DISPLAYMOVE 0x08
40 #define LCD_CURSORMOVE 0x00
41 #define LCD_MOVERIGHT 0x04
42 #define LCD_MOVELEFT 0x00
45 #define LCD_8BITMODE 0x10
46 #define LCD_4BITMODE 0x00
47 #define LCD_2LINE 0x08
48 #define LCD_1LINE 0x00
49 #define LCD_5x10DOTS 0x04
50 #define LCD_5x8DOTS 0x00
61 void begin(byte cols, byte rows, byte charsize = LCD_5x8DOTS);
73 void scrollDisplayRight();
80 void setCursor(byte, byte);
81 virtual WRITE_RESULT write(byte);
84 virtual void config() =0;
85 virtual void send(byte, byte) =0;
86 virtual void write4bits(byte) =0;
88 byte _displayfunction;
92 byte _numlines,_currline;
104 byte d0, byte d1, byte d2, byte d3, byte d4, byte d5, byte d6, byte d7);
106 byte d0, byte d1, byte d2, byte d3, byte d4, byte d5, byte d6, byte d7);
108 byte d0, byte d1, byte d2, byte d3);
110 byte d0, byte d1, byte d2, byte d3);
112 void init(byte fourbitmode, byte rs, byte rw, byte enable,
113 byte d0, byte d1, byte d2, byte d3, byte d4, byte d5, byte d6, byte d7);
115 virtual void config();
116 virtual void send(byte, byte);
117 virtual void write4bits(byte);
119 void write8bits(byte);
142 virtual void config();
143 virtual void send(byte, byte);
144 virtual void write4bits(byte);
Base class for different types of interfaces to character LCD's.
Definition: PortsLCD.h:57
void noBlink()
Turn on and off the blinking cursor.
Definition: PortsLCD.cpp:127
Can be used to drive a software (bit-banged) I2C bus via a Port interface.
Definition: Ports.h:213
void autoscroll()
This will 'right justify' text from the cursor.
Definition: PortsLCD.cpp:157
void rightToLeft()
This is for text that flows Right to Left.
Definition: PortsLCD.cpp:151
void noCursor()
Turns the underline cursor on/off.
Definition: PortsLCD.cpp:117
void createChar(byte, byte[])
Allows us to fill the first 8 CGRAM locations with custom characters.
Definition: PortsLCD.cpp:170
Each device on the I2C bus needs to be defined using a DeviceI2C instance.
Definition: Ports.h:266
void leftToRight()
This is for text that flows Left to Right.
Definition: PortsLCD.cpp:145
virtual void send(byte, byte)
write either command or data, with automatic 4/8-bit selection
Definition: PortsLCD.cpp:367
Interface to character LCD's connected via 2 I/O pins using software I2C.
Definition: PortsLCD.h:133
Ports library definitions.
void scrollDisplayLeft()
These commands scroll the display without changing the RAM.
Definition: PortsLCD.cpp:137
void noAutoscroll()
This will 'left justify' text from the cursor.
Definition: PortsLCD.cpp:163
Interface to character LCD's connected via 4 to 8 I/O pins.
Definition: PortsLCD.h:101
virtual void send(byte, byte)
write either command or data, with automatic 4/8-bit selection
Definition: PortsLCD.cpp:281
void noDisplay()
Turn the display on/off (quickly)
Definition: PortsLCD.cpp:107