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:
Row
number of rowsCols
number of columnsDevAddrs
i2c device addressI2C
instace of a i2c handlerFUNCTION_SET
config for the function set
- Arguments:
-
DEVICE_ADDRS
-
Arguments:
DevAddrs
i2c device address
-
Returns:
DevAddrs
1Bit left shifted device address
-
Use function HAL_LCD_Init
to Initialize the Driver.
Intitalizes the DHT11 Driver.
-
Arguments:
LCD
instance of a LCD driver.
-
Returns:
- HAL_StatusTypeDef
Clears the LCD.
-
Arguments:
LCD
instance of a LCD driver.
-
Returns:
- HAL_StatusTypeDef
Set the cursor to first column and row of the LCD.
-
Arguments:
LCD
instance of a LCD driver.
-
Returns:
- HAL_StatusTypeDef
Sets cursor to a row and column of the LCD.
-
Arguments:
LCD
instance of a LCD driver.Col
column numberRow
row number
-
Returns:
- HAL_StatusTypeDef
Scrolls the whole display Left or Right.
-
Arguments:
LCD
instance of a LCD driver.Direction
LEFT or RIGHT
-
Returns:
- HAL_StatusTypeDef
Sets new character entry direction.
-
Arguments:
LCD
instance of a LCD driver.Direction
LEFT or RIGHT
-
Returns:
- HAL_StatusTypeDef
Writes a character to LCD.
-
Arguments:
LCD
instance of a LCD driver.Character
character to write
-
Returns:
- HAL_StatusTypeDef
Writes a string to LCD.
-
Arguments:
LCD
instance of a LCD driver.String
string to write
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the LCD.
-
Arguments:
LCD
instance of a LCD driver.State
ON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the LCD Backlight.
-
Arguments:
LCD
instance of a LCD driver.State
ON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the Cursor.
-
Arguments:
LCD
instance of a LCD driver.State
ON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the Cursor Blink.
-
Arguments:
LCD
instance of a LCD driver.State
ON of OFF.
-
Returns:
- HAL_StatusTypeDef
Turns ON or OFF the Autoscroll.
-
Arguments:
LCD
instance of a LCD driver.State
ON of OFF.
-
Returns:
- HAL_StatusTypeDef
v1.0.0