LCD Driver for STM32XXX Microcontrollers to use HD47780 based 16x01 or 16x02 LCD Displays. This library also supports error handling and scrolling of LCD.
Important
Specify the HAL include files in "LCD.h"
- STM32XXXX_HAL_HEADER_FILE for your Microcontroller.
Important
Intialize a I2C Handler to connect the LCD Device.
- LCD_InitTypeDef
- Addrs
- Cols
- Rows
- Backlight
- LCD_FuncSet
- LCD_DisplayControl
- LCD_EntryModeSet
- LCD_Cursor_Display_Shift
- I2C
- HAL_LCD_Init
- HAL_LCD_State
- HAL_LCD_Clear
- HAL_LCD_Home
- HAL_LCD_SetCursor
- HAL_LCD_SetBacklight_State
- HAL_LCD_SetCursor_State
- HAL_LCD_SetCursorBlink_State
- HAL_LCD_AutoScroll_State
- HAL_LCD_PutChar
- HAL_LCD_PutStr
- HAL_LCD_Scroll
- HAL_LCD_CharEntry
Copy the "/Inc" & "/Src" directory into your STM32 project.
-
FUNCTION_SET
- DEFAULT_FUNCTION_SET_LINE1_5X8: Line=1, Font=5x8
- DEFAULT_FUNCTION_SET_LINE1_5X10: Line=1, Font=5x10
- DEFAULT_FUNCTION_SET_LINE2_5X8: Line=2, Font=5x8
- DEFAULT_FUNCTION_SET_LINE2_5X10: Line=2, Font=5x10
-
DISPLAY_CONTROLS
- DEFAULT_DISPLAY_CONTROLS_NO_CURSOR_NO_BLINK: Display=ON, Cursor=OFF, Blink=OFF
- DEFAULT_DISPLAY_CONTROLS_CURSOR_NO_BLINK: Display=ON, Cursor=ON, Blink=OFF
- DEFAULT_DISPLAY_CONTROLS_CURSOR_BLINK: Display=ON, Cursor=ON, Blink=ON
-
ENTRY_MODE_SET
- DEFAULT_ENTRY_MODE_SET: Cursor=Increment
-
CURSOR_DISPLAY_SHIFT
- DEFAULT_CURSOR_DISPLAY_SHIFT: Default
-
DEFAULT_CONFIGS: Display=ON, Cursor=OFF, Blink=OFF, Cursor=Increment
- Arguments:
Rownumber of rowsColsnumber of columnsDevAddrsi2c device addressI2Cinstace of a i2c handlerFUNCTION_SETconfig for the function set
- Arguments:
-
DEVICE_ADDRS
-
Arguments:
DevAddrsi2c device address
-
Returns:
DevAddrs1Bit left shifted device address
-
Use function HAL_LCD_Init to Initialize the Driver.
Intitalizes the DHT11 Driver.
-
Arguments:
LCDinstance of a LCD driver.
-
Returns:
- HAL_StatusTypeDef
Clears the LCD.
-
Arguments:
LCDinstance of a LCD driver.
-
Returns:
- HAL_StatusTypeDef
Set the cursor to first column and row of the LCD.
-
Arguments:
LCDinstance of a LCD driver.
-
Returns:
- HAL_StatusTypeDef
Sets cursor to a row and column of the LCD.
-
Arguments:
LCDinstance of a LCD driver.Colcolumn numberRowrow number
-
Returns:
- HAL_StatusTypeDef
Scrolls the whole display Left or Right.
-
Arguments:
LCDinstance of a LCD driver.DirectionLEFT or RIGHT
-
Returns:
- HAL_StatusTypeDef
Sets new character entry direction.
-
Arguments:
LCDinstance of a LCD driver.DirectionLEFT or RIGHT
-
Returns:
- HAL_StatusTypeDef
Writes a character to LCD.
-
Arguments:
LCDinstance of a LCD driver.Charactercharacter to write
-
Returns:
- HAL_StatusTypeDef
Writes a string to LCD.
-
Arguments:
LCDinstance of a LCD driver.Stringstring to write
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the LCD.
-
Arguments:
LCDinstance of a LCD driver.StateON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the LCD Backlight.
-
Arguments:
LCDinstance of a LCD driver.StateON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the Cursor.
-
Arguments:
LCDinstance of a LCD driver.StateON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the Cursor Blink.
-
Arguments:
LCDinstance of a LCD driver.StateON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the Autoscroll.
-
Arguments:
LCDinstance of a LCD driver.StateON of OFF.
-
Returns:
- HAL_StatusTypeDef
v1.0.0