Interfacing I2C LCD With STM32 Black Pill Using STM32CubeIDE

by Tejvinder Singh in Circuits > Microcontrollers

21 Views, 0 Favorites, 0 Comments

Interfacing I2C LCD With STM32 Black Pill Using STM32CubeIDE

STM32F103C8T6_Black_Pill-1.jpg
I2C-LCD-with-Arduino.jpg

In this tutorial, we'll use an STM32 Black Pill to program an I²C LCD on STM32CubeIDE using HAL programming.

Supplies

  1. STM32 Black Pill
  2. LCD with I2C
  3. Female to Female Jumpers
  4. STMCubeIDE
  5. STMCubeProgrammer
  6. USB C Cable


Project Creation

  • Create a new STM32 project from File > New > STM32 Project
  • Select the appropriate board.


Pinout Selection

  • Go to Connectivity > I2C1 and enable it. This will set SDA to pin 43 and SCL to pin 42.\
  • Go to System Core > RCC > HSE > Crystal/Ceramic Resonator.


Clock Configuration

  • Configure your board's clock.
  • Save using Ctrl + S.