Skip to main content
SScot.3
Associate III
August 9, 2021
Question

Trouble Writing to I2C LCD Display Using HAL in C

  • August 9, 2021
  • 2 replies
  • 736 views

I am just learning this architecture, IDE, and re-learning C. I have tried programming an example of a I2C for a LCD display. It compiles fine, but does not write to the display. I suspect it has to to do with HAL. Where or to whom can I have look ov

I am using a NUCLEO-H723

This topic has been closed for replies.

2 replies

MM..1
Chief III
August 9, 2021

When you use CubeIDE wizard for create projects can select examples from SDK or you can locate it in folder ...

And I2C you need check with scope ...

SScot.3
SScot.3Author
Associate III
August 9, 2021

Thanks! I an about to get out a analyzer now!

Tesla DeLorean
Guru
August 9, 2021

Try to keep the summary/title consise, and put the bulk of the question and contextual detail into the body of the question.

Edit the post if the formatting/content doesn't meet your expectations after submission.

What I2C display?

Connected How (to what pins)?

Compilers only care about syntactical details, they can't determine logic or implementation issues, you'll need to debug, and scope pins, etc to come to a better understand of why the display doesn't respond.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
SScot.3
SScot.3Author
Associate III
August 9, 2021

Tesla-

Thanks for the info on posting.

I first wanted to use a 2 line by 16 character as is shown in the tutorial. Once that works, try to figure out myself how to get a 4 line by 20 character to work as well.

I cannot get the 2x16 to work however. It flashes its backlight and then - nothing.

This is the link for the tutorial:

STM32 HAL with CubeMX: Tutorial 42 - I2C LCD16x2 driver - YouTube

I am using the 1st I2C port: HAL_I2C_Init(&hi2c1

I am about to get the analyzer out to see what is going on with the CLK and the DATA lines.