Defines | |
#define | LCD_CLEAR 0x01 |
Clear: clear display and go to position 0. | |
#define | LCD_CONTROL 0x08 |
Display On/Off Control - used by lcd_set_cursor() | |
#define | LCD_CONTROL_BLINK 0x01 |
Option: B=1: blink current character. | |
#define | LCD_CONTROL_CURSOR_OFF 0x00 |
Option: C=0: no cursor. | |
#define | LCD_CONTROL_CURSOR_ON 0x02 |
Option: C=1: display cursor. | |
#define | LCD_CONTROL_DISPLAY_OFF 0x00 |
Option: D=0: display off (clear). | |
#define | LCD_CONTROL_DISPLAY_ON 0x04 |
Option: D=1: display on. | |
#define | LCD_ENTRYMODE 0x04 |
Entry Mode: set cursor and display movement | |
#define | LCD_ENTRYMODE_DECREMENT 0x00 |
Option: I/D=0: auto-decrement (right-to-left) right-to-left is not really supported by this library yet, its internal position will not match the LCD position in this setting, it may cause trouble. | |
#define | LCD_ENTRYMODE_INCREMENT 0x02 |
Option: I/D=1: auto-increment (left-to-right) of character position. | |
#define | LCD_ENTRYMODE_SHIFT 0x01 |
Option: S: shift: the cursor does not move, but the display does This is currently unsupported, automatic linebreak may do wrong things The shifting does not work across line borders. | |
#define | LCD_FUNCTION 0x20 |
Function Set: Initialize the Controllers - used by lcd_init() | |
#define | LCD_FUNCTION_1LINE 0x00 |
Option: N=0: one display line (per controller). | |
#define | LCD_FUNCTION_2LINES 0x08 |
Option: N=1: two display lines (per controller). | |
#define | LCD_FUNCTION_4BIT 0x00 |
Option: DL=0: interface data length 4bit. | |
#define | LCD_FUNCTION_5x10 0x04 |
Option: F=1: character font. | |
#define | LCD_FUNCTION_5x8 0x00 |
Option: F=0: character font. | |
#define | LCD_FUNCTION_8BIT 0x10 |
Option: DL=1: interface data length 8bit. | |
#define | LCD_HOME 0x02 |
Home: go to position 0. | |
#define | LCD_SET_CGRAM_ADDR 0x40 |
Set Character Generator RAM Address | |
#define | LCD_SET_DDRAM_ADDR 0x80 |
Set Display Data RAM Address (LCD Position) - used by lcd_set_position(), lcd_set_line() | |
#define | LCD_SHIFT 0x10 |
Cursor (or Display) shift: move cursor or display content - please call lcd_set_position() after moving the cursor with this command, not really supported | |
#define | LCD_SHIFT_CURSOR 0x00 |
Option: S/C=0: move display content, cursor stays at the same position (not really supported). | |
#define | LCD_SHIFT_DISPLAY 0x08 |
Option: S/C=1: move cursor position. | |
#define | LCD_SHIFT_LEFT 0x00 |
Option: R/L=0: left. | |
#define | LCD_SHIFT_RIGHT 0x04 |
Option: R/L=1: right. |
The bit names in the description refer to the Hitachi HD44780U datasheet. Usually calling these commands from your code should not be necessary. If you use them, be careful that the LCD position should always match the internal variable lcd_position. If the position was moved, call lcd_set_position() to go to your new position, lcd_home(), go back to the old position with
, or setlcd_position=your_new_known_position;