General Gravity

Gravity LCD1602 v1.1 I2C LCD - interfacing with STM32 Nucleo platform

userHead Matteo.Spadafora 2026-10-13 05:10:10 798 Views7 Replies

Hi all,

 

I am trying to use the Gravity LCD1602 v1.1 I2C LCD (code BLWBBA - blue backlight only) with the STM32 Nucleo F446RE board. I have used this LCD in the past with an Arduino, and the custom DFRobot I2C LCD library worked excellently. However, I have not found any such library for the STM32 Nucleo, and a lot of the standard STM32 I2C LCD libraries either seem to be written for the PCF8574 I2C to parallel interface chip, and/or cannot control the Gravity's backlight.

 

Does anyone have experience using this LCD with the STM32 platform, or know of a good resource to explore that might be helpful?

 

Thank you for your assistance.

 

 

Matteo

2026-10-29 02:34:22

I always use the Nucleo boards. Maybe this will work for you…

https://github.com/mumanchu/LCDDisplay

userHeadPic Matt.Harvey
2026-10-13 16:46:33

Ah, the Gravity LCD1602 v1.1 can be a bit finicky with the Nucleo F446RE until you get the I2C address sorted out. Make sure you are pulling the correct slave address using an I2C scanner sketch first, and double-check your pull-up resistors on SDA and SCL since the onboard ones on some DFRobot variants can be weak. Once that handshake goes through, tweaking the backlight PWM via the PCF8574 expansion chip is pretty straightforward. By the way, dealing with tiny hardware bugs always eats up way more time than expected—almost as annoying as trying to track down a missing utility bill statement reference when the local power portal goes down like https://lescobillcheck.pk/

userHeadPic Luqcas.Brqooks
Matteo.Spadafora wrote:

Thank you for the tips. I'll have to check the I2C address with a sketch to confirm. The pullup resistors are in place and I am using 10k resistors.

I wasn't aware that the LCD I have contained a PCF8574 chip… all I had seen mentioned in my reading was that it uses an AIP31068L for text and typically the PCA9633 for RGB control. If the PCF8574 controls the backlight, then I'll have to look into the related instructions. I've attached photos, in case my board is different in some way.

And yes… I've already dug myself into a hole in playing with this issue, so I'm watching how long I spend on it.

Thanks!

2026-10-14 01:34:26
1 Replies
2026-10-13 14:28:07

Thank you for your reply. The SKU in question is DFR0555.

userHeadPic Matteo.Spadafora
Jason.Miao wrote:

Hi, this is the Gravity LCD1602 V1.1 (DFR0555). Quick heads-up: this module is not a plain PCF8574 I2C backpack. DFRobot drives it with the DFRobot_RGBLCD1602 library, and the backlight is controlled over I2C through a separate RGB controller address (0x6B on the V1.1 board), not through a PCF8574 pin. That's exactly why the PCF8574 STM32 libraries can't control the backlight.

Simplest way to reuse what you already had on Arduino: the Nucleo F446RE is supported by the STM32 Arduino core. Install it, enable Wire (I2C) on your SCL/SDA pins, install DFRobot's DFRobot_RGBLCD1602 library, and your old sketch should run as-is. The module runs at 3.3–5V, so the Nucleo's 3.3V I2C level is fine.

Module wiki + pinout: https://wiki.dfrobot.com/dfr0555/Arduino backlight-fade example (shows the 0x6B backlight address): https://wiki.dfrobot.com/dfr0555/docs/24390Official library: https://github.com/DFRobot/DFRobot_RGBLCD1602STM32 Arduino core: https://github.com/stm32duino/Arduino_Core_STM32

If you prefer bare-metal (HAL) instead of the Arduino toolchain, you'll need to port the command/register set from the library source — DFRobot doesn't publish a separate raw protocol doc. Backlight intensity is set via lcd.setPWM(REG_ONLY, i) written to the 0x6B address.

2026-10-13 17:13:30
Matteo.Spadafora wrote:

Hi Jason,

It seems like the Arduino library is the more straightforward method. I was trying to find a solution using HAL, but this is looking like it will take a considerable amount of effort. It would he an interesting project though.

Thank you for all of your advice.

2026-10-14 01:39:36
2 Replies
2026-10-13 10:08:58

Could you please specify the exact SKU? There are too many iic screens. I'm not sure which one you are using.

userHeadPic Jason.Miao