STM32U535RET6 and LCD I2C communication
Hello!
I have a major and pretty dumb problem regarding my communication between a RX2004A LCD (Documentation if needed) and a custom board with a STM32U535RET6 chipset. I'm just trying to print any message on the display. The problem is that the display's reset pin is low active, so I'm trying to pull it up while sending the message, and the let it pull down again. The exact opposite happens, the message is sent in the time interval when the reset pin is pulled down, resetting the display while I'm trying to communicate.
I have attached down below the scripts (lcd_i2c.h being here, since I can't attach more than 3 files) that I'm using and some screenshots that illustrate the problem. I'm apologizing in advance if I chose the wrong board to post this on, or if this issue was already solved. I'm genuinely at the end of the line at this moment.
/*
* lcd_i2c.h
*
* Created on: Aug 22, 2024
*/
#ifndef LCD_I2C_H
#define LCD_I2C_H
#include "stm32u5xx_hal.h"
// I2C's address
#define LCD_ADDRESS 0x49 << 1
// LCD commands
#define LCD_CLEAR_DISPLAY 0x01
#define LCD_RETURN_HOME 0x02
#define LCD_ENTRY_MODE_SET 0x04
#define LCD_DISPLAY_CONTROL 0x08
#define LCD_CURSOR_SHIFT 0x10
#define LCD_FUNCTION_SET 0x20
#define LCD_SET_CGRAM_ADDR 0x40
#define LCD_SET_DDRAM_ADDR 0x80
// Display control
#define LCD_DISPLAY_ON 0x04
#define LCD_CURSOR_ON 0x02
#define LCD_BLINK_ON 0x01
// Display function
#define LCD_8BIT_MODE 0x10
#define LCD_2LINE_MODE 0x08
#define LCD_5x10DOTS_MODE 0x04
void LCD_Init(I2C_HandleTypeDef *hi2c);
void LCD_SendCommand(I2C_HandleTypeDef *hi2c, uint8_t cmd);
void LCD_SendData(I2C_HandleTypeDef *hi2c, uint8_t data);
void LCD_SendString(I2C_HandleTypeDef *hi2c, char *str);
#endif
