Тёмный

57. STM32CubeIDE LCD 1602 Display. I2C 16x2 with STM32F103C8T6 

MicroPeta by Nizar Mohideen
Подписаться 7 тыс.
Просмотров 17 тыс.
50% 1

STM32 Blue Pill for beginners
Code and diagram are at www.micropeta.com/video57

Опубликовано:

 

25 сен 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@NizarMohideen
@NizarMohideen 2 года назад
If itoa function gives you an error, use sprintf instead of itoa as shown below sprintf(snum,"%d", x); You need to include stdio.h for this function as shown below /* USER CODE BEGIN Includes */ #include "stdio.h" /* USER CODE END Includes */
@eduardodelarosaferrer2205
@eduardodelarosaferrer2205 2 года назад
I'veseen many videos and tutorials about 1602 Display, but this is , by far, the best of them.
@NizarMohideen
@NizarMohideen 2 года назад
Thank you. Thanks to the library creator JIHOON LEE (eziya)
@BechirZalila
@BechirZalila 2 года назад
Thank you. Excellent tutorials.
@NizarMohideen
@NizarMohideen 2 года назад
You are welcome!
@shrijithmjain2137
@shrijithmjain2137 2 года назад
Hello sir I have never missed any of your video, your content is amazing I have tried almost all projects, I would recommend you to do a bluepill project where MCU would send a live time data to http server or firebase using GSM(GPRS).
@NizarMohideen
@NizarMohideen 2 года назад
Great suggestion!
@shrijithmjain2137
@shrijithmjain2137 2 года назад
@@NizarMohideen I need your mail ID so that I could contact you, I'm doing a project in the http protocol please let me know how do i contact you sir.
@NizarMohideen
@NizarMohideen 2 года назад
nizarmohideen@hotmail.com
@Zurenio
@Zurenio 7 месяцев назад
Great...
@asifahmad4199
@asifahmad4199 Год назад
Thanks for your guide line. Please guide me how can I modified code for 20x4 lcd
@alinavaid9291
@alinavaid9291 7 месяцев назад
Hello. I am trying to connect an Geeek Pi LCD to NUCLEO-L053R8 using IC2 interface. I was wondering if the I2C address for this LCD will be the same as the LCD used in the example. I would really appreciate if we can connect, i am working on my senior design project.
@yasserlamari3619
@yasserlamari3619 2 месяца назад
i am using stm32f030f4p6 and I got problem in liquid_crystal_i2c.c in the syntaxe DWT..... (I changed the source to 0xx...instead of 4xx which means the problem is not here) so what is the problem
@METHEE.C
@METHEE.C Год назад
Can print float data type?.
@aissatoudieng8151
@aissatoudieng8151 2 года назад
Hello, I am doing a project on STM32 with ADLX345 and LCD display in I2C. can you please help me
@bigcatdairy
@bigcatdairy Год назад
I did it in the exact same way but nothing displayed lol, what could be wrong pl?
@AbuBokorSiddik-
@AbuBokorSiddik- 8 месяцев назад
How did you solve your problem?can you help me
@bigcatdairy
@bigcatdairy 8 месяцев назад
@@AbuBokorSiddik-i don't remember exactly, i remember just setup incubemx then told chatgpt to write the code then it worded
@fatiswealth7865
@fatiswealth7865 2 года назад
Hi, other than the Ground and Vcc, the other 2 pins does it matter which pin it is connected to? Must it be a ADC pin or just normal GPIO pins will do? :)
@NizarMohideen
@NizarMohideen 2 года назад
We need to use I2C pins only. If you use I2C1 (SCL - pin PB6 and SDA - pin PB7) If you use I2C2 (SCL - pin PB10 and SDA - pin PB11)
@hacker6695
@hacker6695 Год назад
i hope we can drag and drop the .C and .H Files to SRC and Include folder respectively ?
@NizarMohideen
@NizarMohideen Год назад
You can
@sahilmanihar9894
@sahilmanihar9894 2 года назад
Can you make a video on interfacing dht11 temperature and humidity sensor using STM32 and it's output showing on lcd 🙏🙏
@NizarMohideen
@NizarMohideen 2 года назад
Hi Sahil, It is very simple. Follow this video for LCD Displayand video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BK-bL9cMOSM.html for DHT11. For I2C speed ***DO NOT CHANGE*** Fast Mode (LCD works Standard mode 100000Hz) I have prepared the code for DHT11 with LCD1602 below /* USER CODE BEGIN Includes */ #include "liquidcrystal_i2c.h" #include "stdio.h" /* USER CODE END Includes */ /* USER CODE BEGIN 0 */ #define DHT11_PORT GPIOB #define DHT11_PIN GPIO_PIN_9 uint8_t RHI, RHD, TCI, TCD, SUM; uint32_t pMillis, cMillis; float tCelsius = 0; float tFahrenheit = 0; float RH = 0; uint8_t TFI = 0; uint8_t TFD = 0; char strCopy[15]; void microDelay (uint16_t delay) { __HAL_TIM_SET_COUNTER(&htim1, 0); while (__HAL_TIM_GET_COUNTER(&htim1) < delay); } uint8_t DHT11_Start (void) { uint8_t Response = 0; GPIO_InitTypeDef GPIO_InitStructPrivate = {0}; GPIO_InitStructPrivate.Pin = DHT11_PIN; GPIO_InitStructPrivate.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStructPrivate.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStructPrivate.Pull = GPIO_NOPULL; HAL_GPIO_Init(DHT11_PORT, &GPIO_InitStructPrivate); // set the pin as output HAL_GPIO_WritePin (DHT11_PORT, DHT11_PIN, 0); // pull the pin low HAL_Delay(20); // wait for 20ms HAL_GPIO_WritePin (DHT11_PORT, DHT11_PIN, 1); // pull the pin high microDelay (30); // wait for 30us GPIO_InitStructPrivate.Mode = GPIO_MODE_INPUT; GPIO_InitStructPrivate.Pull = GPIO_PULLUP; HAL_GPIO_Init(DHT11_PORT, &GPIO_InitStructPrivate); // set the pin as input microDelay (40); if (!(HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN))) { microDelay (80); if ((HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN))) Response = 1; } pMillis = HAL_GetTick(); cMillis = HAL_GetTick(); while ((HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN)) && pMillis + 2 > cMillis) { cMillis = HAL_GetTick(); } return Response; } uint8_t DHT11_Read (void) { uint8_t a,b; for (a=0;a cMillis) { // wait for the pin to go high cMillis = HAL_GetTick(); } microDelay (40); // wait for 40 us if (!(HAL_GPIO_ReadPin (DHT11_PORT, DHT11_PIN))) // if the pin is low b&= ~(1
@sahilmanihar9894
@sahilmanihar9894 2 года назад
@@NizarMohideen hello sir any library have to include for this project
@NizarMohideen
@NizarMohideen 2 года назад
Inside Core/Inc Folder github.com/eziya/STM32_HAL_I2C_HD44780/blob/master/Src/liquidcrystal_i2c.h Inside Core/Src Folder github.com/eziya/STM32_HAL_I2C_HD44780/blob/master/Src/liquidcrystal_i2c.c
@s7-theunknown834
@s7-theunknown834 7 месяцев назад
Error shows up in line no 73,74,165 on main.c saying that htim1 undeclared What should i do now? 🙏🏻
@flightandsimulationcenter5175
error: #253: expected a "," , why?
@vinodkinoni4863
@vinodkinoni4863 2 года назад
Very nice sir g
@vinodkinoni4863
@vinodkinoni4863 2 года назад
Plz send the the display module configuration
@NizarMohideen
@NizarMohideen 2 года назад
Thanks
@NizarMohideen
@NizarMohideen 2 года назад
What "display module configuration" you need. Please let me know
@kaxagvimraze6536
@kaxagvimraze6536 Год назад
I have a problem that LCD is not displaying. first line of display is on and that's it , do someone had same problem?
@AbuBokorSiddik-
@AbuBokorSiddik- 8 месяцев назад
How did you solve your problem?
@roopesh668
@roopesh668 Год назад
Sir I am using Keil and CubeMX. For me, the folder structure doesn't have Include folder. What to do?
@aliakbar4068
@aliakbar4068 Год назад
Open the C file and C header file in any notepad or wordpad , and in keil uv , in the application folder create the .c and .h file and name them accordingly and paste the content in it , it will resolve your issue
@alifioahmad_raihan
@alifioahmad_raihan 2 года назад
Sir, I have tried to follow step by step but when compile find an error : make: *** [Core/Src/subdir.mk:37: Core/Src/liquidcrystal_i2c.o] Error 1 How to fix it sir ?
@NizarMohideen
@NizarMohideen 2 года назад
Put liquidcrystal_i2c.h file inside Core/Inc folder Put liquidcrystal_i2c.c file inside Core/Src folder
@truca100
@truca100 4 месяца назад
hello, i have nothing on the lcd, i have only the light switch on and switch off!!!
@truca100
@truca100 4 месяца назад
finally i found my problem, the potentiometer on the driver 8574 was incorrectly adjusted from the factory. Now it works very well, thx :) Can i ask you to make a same vdo with a optocoupler sensor IR RPM, thx in advance ;)
@NizarMohideen
@NizarMohideen 4 месяца назад
Thanks
@NizarMohideen
@NizarMohideen 4 месяца назад
I made a video on STM32CubeIDE Optocoupler sensor module as RPM meter (Tachometer) with STM32F103C8T6. Link is below ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4MUIaXnK8yw.html
@renukadyawarkonda393
@renukadyawarkonda393 2 года назад
its not working
@NizarMohideen
@NizarMohideen 2 года назад
Make sure the LED jumper in back module is not missing
@H25639SRV
@H25639SRV 2 месяца назад
../Core/Inc/liquidcrystal_i2c.h(61): warning: #1295-D: Deprecated declaration HD44780_Clear - give arg types i have this error i don't know what to do :( but your video are very useful thank you so much sir
@NizarMohideen
@NizarMohideen 2 месяца назад
if you change void HD44780_Clear(); in the library to void HD44780_Clear(void); The compiler may not throw this error Add (void) inside the brackets and see
@H25639SRV
@H25639SRV 2 месяца назад
@@NizarMohideen thank you so much sir i will try it 🥰
@H25639SRV
@H25639SRV 2 месяца назад
@@NizarMohideen it worked! thank you sir and it only have the error ..\Core\Src\liquidcrystal_i2c.c(32): error: #253: expected a "," thank you so much for helping me sir
Далее
54. STM32CubeIDE Voltage Sensor with STM32F103C8T6
8:03
Этот Пёс Кое-Что Наделал 😳
00:31
29. STM32CubeIDE SD CARD. SPI with STM32F103C8T6
14:45
STM32 + OLED = Display Anything
18:01
Просмотров 17 тыс.
LCD via I2C in STM32 || CUBEIDE || PCF8574
12:22
Просмотров 77 тыс.
Writing Code That Runs FAST on a GPU
15:32
Просмотров 546 тыс.