Common LCD1602A-I2C driver for my projects. PCF8574 I2C Expander needed along with LCD1602A. Compatible with STM32CubeIDE. Multiple lcds can be attached with different I2C ports.
- Tested on STM32F446RE
Clone the project
git clone https://github.com/TaskinOkmen/lcd1602a-i2c-driver.git
#include "main.h"
#include "lcd1602a.h"
I2C_HandleTypeDef hi2c1;
LCD1602A lcd;
...
/**
* @brief The application entry point.
* @retval int
*/
int main(void) {
/* other init functions */
MX_I2C1_Init();
// call after i2c init
LCD_Init(&lcd, &hi2c1);
LCD_SetCursor(&lcd, 0, 0);
LCD_WriteString(&lcd, "TEST MESSAGE");
...
}