✅✅✅ working without any issue ..... I'm using with STM32G030 MCU .......... good thing compare to other library it print Integer directly with separate function without converting it into string. Thanks for reducing our work load.
Hi, that was a very good video, I tried doing it with a STM32L412 board, butI'm not sure why I'm getting a lot of error about CMSIS (even tho I abilitated CMSIS 5.5.0). I'm not even sur your project should use CMSIS, any ideas?
I'm curious if it goes well, because the author is connecting VDD to 5V and according to Datasheet of the LCD, the MIN Input High Voltage is 0.7VDD what is 3.5V, but as known the GPIOs only deliver 3.3V.
can i ask a question sir?....the backlight does not light up. But my lcd setup is in 4bit please i need help, plus my board is installed on a board that uses seperate supply from the data input...really need assisstance
Hi Sir, I watched both F1 and F4 videos. Could you please tell if the lcd.c and lcd.h files/code would be same for all stm32 versions, and just change that #include part?
Hi, I followed your guide but I've a problem with display: the left side is less visible than the right side. I tried with from 10 - 330 Ohm resistor but nothing has changed
One more question please sir. If we have done everything like this, and want to print some sensor data also in while(1), how would lcd code come then? for example, over here: ADC_Select_CH4(); HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); ADC_VAL_Voltages[0] = readValue5; readValue5 = HAL_ADC_GetValue(&hadc1); voltage1 =(float)readValue5/4095*16.5; HAL_ADC_Stop(&hadc1); Thankyou!
You can use Lcd_int(&lcd, x); // x need to be an integer If it is a float value, break into two integers One for integral and another one for decimal separated by an dot Use three lines of code as below Lcd_int(&lcd, x) Lcd_string(&lcd, ".") Lcd_int(&lcd, y)
Hi, Great tutorial..I tried this example for all LCD pins connected to PORTC with connections as below: PORTC0-->RS PORC2--->EN, PORTC3 ,C4,C5,C6 ----> D4 to D7 but,I am just getting boxes and no display on LCD.. but,if I change my pins to that as shown in example it works fine.. why is it not working for my pinouts that I am using?
Set those pins to GPIO_Output use below format for ports // Lcd_PortType ports[] = { D4_GPIO_Port, D5_GPIO_Port, D6_GPIO_Port, D7_GPIO_Port }; For example Lcd_PortType ports[] = { GPIOC, GPIOB, GPIOA, GPIOA }; use below format for pins // Lcd_PinType pins[] = {D4_Pin, D5_Pin, D6_Pin, D7_Pin}; For example Lcd_PinType pins[] = {GPIO_PIN_7, GPIO_PIN_6, GPIO_PIN_7, GPIO_PIN_6}; Lcd_HandleTypeDef lcd; use below format to create LCD // Lcd_create(ports, pins, RS_GPIO_Port, RS_Pin, EN_GPIO_Port, EN_Pin, LCD_4_BIT_MODE); For example lcd = Lcd_create(ports, pins, GPIOB, GPIO_PIN_5, GPIOB, GPIO_PIN_4, LCD_4_BIT_MODE); If still doesn’t work with your new pins, use a simple led blink on each pins to check for faulty pins You can also try with some other pins. Thanks
@@NizarMohideen Hello..I checked that because of improper wiring all the problems now all works fine..I would like to know how do you avoid wiring problems which go unnoticed and we keep checking the program..
Hello sir...! My 1st question:-That lcd.h and lcd.c files can use any type board...? Please reply and clarify me... 2nd question:- why you are take random pins like different port pins. Why not take same serial pins like.. PORT-B 0,1,2,3,4,5,6. Can you please clarify my doubts sir ......?
It should work with all STM32 boards You can use any pins you want as long as you put the pins in Lcd_PortType ports[] = { D4_GPIO_Port, D5_GPIO_Port, D6_GPIO_Port, D7_GPIO_Port }; Lcd_PinType pins[] = {D4_Pin, D5_Pin, D6_Pin, D7_Pin}; Lcd_create(ports, pins, RS_GPIO_Port, RS_Pin, EN_GPIO_Port, EN_Pin, LCD_4_BIT_MODE);
You can use without 100 Ohm resistor for only short period of time to test.
You must use a 100-330 Ohm resistor if you want to use for long time.🚦
Hey, I don't have resistor right now, so I connect my anode directly to 5V. Is it OK?
✅✅✅ working without any issue ..... I'm using with STM32G030 MCU .......... good thing compare to other library it print Integer directly with separate function without converting it into string. Thanks for reducing our work load.
Very good Video congratullations
Hi, that was a very good video, I tried doing it with a STM32L412 board, butI'm not sure why I'm getting a lot of error about CMSIS (even tho I abilitated CMSIS 5.5.0). I'm not even sur your project should use CMSIS, any ideas?
I'm curious if it goes well, because the author is connecting VDD to 5V and according to Datasheet of the LCD, the MIN Input High Voltage is 0.7VDD what is 3.5V, but as known the GPIOs only deliver 3.3V.
can i ask a question sir?....the backlight does not light up. But my lcd setup is in 4bit please i need help, plus my board is installed on a board that uses seperate supply from the data input...really need assisstance
im not getting it memory regions are not showing so what might be the mistake
Hi Sir,
I watched both F1 and F4 videos. Could you please tell if the lcd.c and lcd.h files/code would be same for all stm32 versions, and just change that #include part?
Yes. That is correct. Same files
Hi, I followed your guide but I've a problem with display: the left side is less visible than the right side. I tried with from 10 - 330 Ohm resistor but nothing has changed
can you make a video on how to do lcd.h and lcd.c with the help of registers
It was super helpful, thank you very much sir!
Glad to hear that!
There is an error message for "Project 'LCD' has no explicit encoding set". Can you please let me know how to figure out?
In STM32CubeIDE go to: Project -> Properties -> Resource -> Text file encoding -> Other, and select whatever encoding you like.
Thanks sir it was a great video it helped a lot ;)
Most welcome!
One more question please sir.
If we have done everything like this, and want to print some sensor data also in while(1), how would lcd code come then?
for example, over here:
ADC_Select_CH4();
HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1,1000);
ADC_VAL_Voltages[0] = readValue5;
readValue5 = HAL_ADC_GetValue(&hadc1);
voltage1 =(float)readValue5/4095*16.5;
HAL_ADC_Stop(&hadc1);
Thankyou!
You can use Lcd_int(&lcd, x); // x need to be an integer
If it is a float value, break into two integers
One for integral and another one for decimal separated by an dot
Use three lines of code as below
Lcd_int(&lcd, x)
Lcd_string(&lcd, ".")
Lcd_int(&lcd, y)
Hello you did it please ?
Hi Sir,
Firstly, thank you for the video.
It works for me but I want to do this with a temp value that I measure.
thank you very much 😉👍👍👍
Thank you too
Thank you Nizar ! Do you take classes also by any chance?
Hi, Great tutorial..I tried this example for all LCD pins connected to PORTC with connections as below: PORTC0-->RS PORC2--->EN, PORTC3 ,C4,C5,C6 ----> D4 to D7 but,I am just getting boxes and no display on LCD.. but,if I change my pins to that as shown in example it works fine.. why is it not working for my pinouts that I am using?
Set those pins to GPIO_Output
use below format for ports
// Lcd_PortType ports[] = { D4_GPIO_Port, D5_GPIO_Port, D6_GPIO_Port, D7_GPIO_Port };
For example
Lcd_PortType ports[] = { GPIOC, GPIOB, GPIOA, GPIOA };
use below format for pins
// Lcd_PinType pins[] = {D4_Pin, D5_Pin, D6_Pin, D7_Pin};
For example
Lcd_PinType pins[] = {GPIO_PIN_7, GPIO_PIN_6, GPIO_PIN_7, GPIO_PIN_6};
Lcd_HandleTypeDef lcd;
use below format to create LCD
// Lcd_create(ports, pins, RS_GPIO_Port, RS_Pin, EN_GPIO_Port, EN_Pin, LCD_4_BIT_MODE);
For example
lcd = Lcd_create(ports, pins, GPIOB, GPIO_PIN_5, GPIOB, GPIO_PIN_4, LCD_4_BIT_MODE);
If still doesn’t work with your new pins, use a simple led blink on each pins to check for faulty pins
You can also try with some other pins. Thanks
@@NizarMohideen Hello..I checked that because of improper wiring all the problems now all works fine..I would like to know how do you avoid wiring problems which go unnoticed and we keep checking the program..
Hi Sir, thanks for the tutorial. I have a question sir, I can display the value but why it doesn't have backlight sir?
Make sure both 3.3V and 5V power supply are properly connected and then rotate the potentiometer for brightness. Thanks
mine does not light either
Hello sir...! My 1st question:-That lcd.h and lcd.c files can use any type board...? Please reply and clarify me...
2nd question:- why you are take random pins like different port pins. Why not take same serial pins like.. PORT-B 0,1,2,3,4,5,6. Can you please clarify my doubts sir ......?
It should work with all STM32 boards
You can use any pins you want as long as you put the pins in
Lcd_PortType ports[] = { D4_GPIO_Port, D5_GPIO_Port, D6_GPIO_Port, D7_GPIO_Port };
Lcd_PinType pins[] = {D4_Pin, D5_Pin, D6_Pin, D7_Pin};
Lcd_create(ports, pins, RS_GPIO_Port, RS_Pin, EN_GPIO_Port, EN_Pin, LCD_4_BIT_MODE);
very good thank you (teşekkür ederim)
Nice video, can i use this code for nucleo F411RE?
Yes, you can
thank you!!
I learned copy-paste here.
teşekkür ederim
Nice sir
Thanks and welcome
I have some queries can u guide me only point out
You can email the question to nizarmohideen@hotmail.com
thanks man. i like it. if you have mail adress, i want to send a mail about stm32.