Constants

Libraries ›› The LCD unit ››
Parent Previous Next

Along with the conditional defines parameters, some constants are defined by the unit:


Name / Value

Used as parameter of

Comments

LCD_Width


Nb of characters in width, according to the conditional compilation symbols.

CURSOR_MOVE_LEFT = $00;

LCD_CursorMoveMode

Cursor or text will move to the left at each character write.

CURSOR_MOVE_RIGHT = $02;

Cursor or text will move to the right at each character write (default).

CURSOR_MOVE_TEXT = $01;

Text scrolling: the cursor is fixed and the text scrolls.

DISPLAY_TEXT_ON = $04;

LCD_DisplayMode

Show the text (default).

DISPLAY_TEXT_OFF = $00;

Hide the text.

DISPLAY_CURSOR_ON = $02;

Show the cursor.

DISPLAY_CURSOR_OFF = $00;

Hide the cursor (default).

DISPLAY_CURSOR_FIXED = $00;

Fixed cursor.

DISPLAY_CURSOR_BLINK = $01;

Blinking cursor (default).

SHIFT_TEXT = $08;

LCD_ShiftMode

Fixed cursor, text is scrolling

SHIFT_LEFT = $04;

Shift to the left

SHIFT_RIGHT = $00;

Shift to the right (default)


Some constants have been fixed for an HITACHI HD44780U display and may have to be adjusted for slower displays:


Name / Value

Comments

LCD_WAIT_DELAY_HOME = 1520;

In microseconds, for HOME / CLEAR operation: used only if LCD_READ is not defined (no handshake)

LCD_WAIT_DELAY_NORMAL = 37;

In microseconds, for other operations: used only if LCD_READ is not defined (no handshake)

LCD_DATA_DELAY = 2;

In microseconds, delay after data set before write or read enable pulse

LCD_ENABLE_DELAY = 5;

In microseconds, width of the enable pulse to the LCD

       

Note: These timing values are now modifiable through conditional defines.