Associate III
May 7, 2022
Question
The LCD is working but not showing any character?
- May 7, 2022
- 6 replies
- 4116 views
Hi,
I am using stm32f103 and IAR for codes.
I am trying to use a character LCD 16x2 for my project. It turns on with 5 volt that I connect but not showing any character. I changed the potentiometer and still no sign of characters.
I was wondering what the problem is?
Here is the main code
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
lcd_init();
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
lcd_gotoxy(0,0);
lcd_puts("10");
HAL_Delay(10);
HAL_GPIO_WritePin(GPIOC, LED_STM_ON_Pin, GPIO_PIN_SET);
HAL_Delay(100);
HAL_GPIO_WritePin(GPIOC, LED_STM_ON_Pin, GPIO_PIN_RESET);
}
/* USER CODE END 3 */
}I attached the library that I used and a picture of CubeMX.
I would appreciate any help.
Ali/
#[LCD/LTDC] #[STM32 MCUs] #STM32F1
