Тёмный

LCD via I2C in STM32 || CUBEIDE || PCF8574 

ControllersTech
Подписаться 39 тыс.
Просмотров 77 тыс.
50% 1

Purchase the Products shown in this video from :: controllerstech.store
________________________________________________________________________________________
Do not use the address 0x27. This is not arduino. STM32 uses 8 bits for the address (7 address + 1 read/write bit), while Arduino uses 7.
Check the datasheet to check the proper address along with the write/read bit.
To download the code, goto controllerstech.com/i2c-lcd-i...
Check out more VIDEOS on MODULES/SENSORS with STM32 • STM32 and SENSORS/MODULES
Check out more VIDEOS on I2C with STM32 • STM32 I2C
________________________________________________________________________________________
****** SUPPORT US BY DONATING*****
paypal.me/controllertech
******Join the Membership******
/ @controllerstech
Join the Discord Server / discord
Join the Telegram Group t.me/controllerstechdiscuss
Follow me on Instagram / controllerstech
For more info, visit www.controllerstech.com

Наука

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

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 216   
@sampoteste
@sampoteste 4 года назад
These demonstrations are just excellent. Thanks for your good work and Happy New Year.
@Ngigi
@Ngigi 2 года назад
Such an amazing tutorial. I followed it and it worked on the first attempt. Thank you!
@dalevanderzee4086
@dalevanderzee4086 3 года назад
I just tried the this and followed your instructions precisely. It worked flawlessly! You taught me something new as I am new to this. Thank you.
@MamidipalliBujji
@MamidipalliBujji 23 дня назад
Meeru files ela download chesaru?
@MamidipalliBujji
@MamidipalliBujji 23 дня назад
I tried a lot of times but the correct files are not downloaded
@robertopascazi228
@robertopascazi228 3 года назад
Very good, clear and complete explanation. Thanks a lot!
@florianthomashanisch9319
@florianthomashanisch9319 2 года назад
Great Video! Thanks a lot from Germany :D DANKESCHÖN!
@voeunkhoem9338
@voeunkhoem9338 2 года назад
From Cambodia... Thank you very much for good demonstration
@AlexEduardoRR
@AlexEduardoRR 3 года назад
Thanks! Nice explanation!
@pablomoviespower
@pablomoviespower 4 года назад
Thanks bro! It was very useful for me! Tienes un nuevo un suscriptor desde Ecuador, gracias (You have a new suscriptor from Ecuador, Thanks)!!
@jorgejacome4269
@jorgejacome4269 4 года назад
saludos compatriota
@alirezamoosavian3143
@alirezamoosavian3143 3 года назад
thank you for your perfect toturial.
@andrelabuschagne5747
@andrelabuschagne5747 2 года назад
The code that I downloaded from your link had 0x20 instead of 0x28 for the initialization of the screen. This then initializes only the top row of the screen and not both rows. So if anyone else is having the problem where just the first line of the screen is working, just change the 0x20 to 0x28 in the initialization of the display.
@GoracyKanal
@GoracyKanal 4 года назад
Great video
@pinkuchauhan8247
@pinkuchauhan8247 4 года назад
You are the great man
@luizazeredo5197
@luizazeredo5197 4 года назад
Perfeito sua aula , obrigado por compartilhar conhecimento
@DERKONIG12345
@DERKONIG12345 7 месяцев назад
For a quick tip, always consider pull ups with I2C, sometimes you struggle hours long with an empty LCD, but it turns out that the problem is open drain STM32 pins with no pull ups... Besides some modules have the address 0x27 not 0x4E, by the way thanks for the video...
@ControllersTech
@ControllersTech 6 месяцев назад
0x27 and 0x4E are same. The former is a 7 bit address wheras the latter is 8 bit wide including the write bit. 0x27
@DERKONIG12345
@DERKONIG12345 6 месяцев назад
I see thanks@@ControllersTech
@eduardodelarosaferrer2205
@eduardodelarosaferrer2205 4 года назад
You are the best !!!
@tupoy_ytub_uberi_psevdonim
@tupoy_ytub_uberi_psevdonim Год назад
It's maximum simple, thank u :)
@grishque1193
@grishque1193 3 года назад
Lot of thanks!
@gautombose4172
@gautombose4172 3 года назад
Please SHOW where to get the Library Flies from. Surely it is very important to know this.
@mehrdad-mixtape7970
@mehrdad-mixtape7970 3 года назад
Thank you so much :)
@taylorsailing1122
@taylorsailing1122 Год назад
Hi, thanks for the tutorial. I am using the Nucleo-F303RE and had to change the void lcd_init (void) delays on the LCD that I am using. Then everything works well. void lcd_init (void) { // 4 bit initialisation HAL_Delay(50); // wait for >40ms lcd_send_cmd (0x30); HAL_Delay(15); // wait for >4.1ms lcd_send_cmd (0x30); HAL_Delay(15); // wait for >100us lcd_send_cmd (0x30); HAL_Delay(15); lcd_send_cmd (0x20); // 4bit mode HAL_Delay(15);
@TomaszSynoradzki
@TomaszSynoradzki 3 года назад
Default bus addresses for popular i2c LCD modules (if A0 A1 A2 pads unsoldered): (0x27
@leanh1203
@leanh1203 3 года назад
He's already mentioned in the description. If you are using STM32 it won't work because STM32 I2C uses the LSB of the slave address to decide to enter Transmitter or Receiver.
@FelypeFerreira0101
@FelypeFerreira0101 3 года назад
@@leanh1203 did it worked for you? it's not working for me.
@leanh1203
@leanh1203 3 года назад
@@FelypeFerreira0101 me too. I'm struggling with the code man :( but the slave address is sure not 0x27 or 0x3F if you are using stm32 as i said above.
@imanel-bawab6406
@imanel-bawab6406 2 года назад
@@leanh1203 I am using STM32L4+ what address should I use?
@mnane34
@mnane34 3 года назад
thanks a lot sir.
@priyankakundu8867
@priyankakundu8867 3 года назад
can you provide the proteus file? or show me how proteus simulation works?
@FelypeFerreira0101
@FelypeFerreira0101 3 года назад
did someone set up this project on the proteus? I have some doubts in that part.
@michielspiritus7155
@michielspiritus7155 3 года назад
How to send custom characters like a pause icon or something?
@justanotherpoweraddict7918
@justanotherpoweraddict7918 3 года назад
I have one problem following this code. When I attempted to run it up to the lcd_clear() calls, the display still has a bunch of jibberish characters on it. The for loop does have a continuous character print (though not quite what I expected) so I believe that, in principle, this code does work to an extent. I found it strange since based on what understanding I could glean from the HD44780U LCD datasheet so far, the code is consistent with the datasheet.
@ControllersTech
@ControllersTech 3 года назад
In the lcd clear function, we send the command 0x01 to the display. Try increasing the delay after that command
@jhankhanajoshi2052
@jhankhanajoshi2052 3 года назад
Only lcd_send_string function is not working in my project. pls guide me
@shinigamimorax357
@shinigamimorax357 3 года назад
Thank you very much! You are helpful person.
@MamidipalliBujji
@MamidipalliBujji 23 дня назад
Could you please tell me the name to search and get the correct file?
@fvgm
@fvgm Год назад
Supposing that you are supplying the hole LCD module (LCD + PFC) with 5v, do we need a level shifter to 3v3 for the I2c lines?
@ControllersTech
@ControllersTech Год назад
No
@METHEE.C
@METHEE.C 7 месяцев назад
Hi i need function on/off BACKLIGHT
@imanel-bawab6406
@imanel-bawab6406 2 года назад
Can I get some help for STM32L4+? I am using the PCF8574 so I am using SLAVE ADDR 0x4E like you did. However the code is not showing anything on the screen. Is there anything else I have to change for my STM?
@ControllersTech
@ControllersTech 2 года назад
Try 0x7E
@ebad-ur-rehman5342
@ebad-ur-rehman5342 2 года назад
how to use these libraries without using HAL/cube ide
@MamidipalliBujji
@MamidipalliBujji 23 дня назад
I tried a lot of times but files are not yet downloaded
@vinodkinoni4863
@vinodkinoni4863 Год назад
nice
@dioadadosite4516
@dioadadosite4516 Год назад
Hola, tengo un STM32F411E, hice el programa con el display lcd-i2c usé la librería esta y todo bien, pero al darle Debug, no me presenta nada en la pantalla. que puede ser?.. se que el video es de 3 años, pero me está sirviendo y soy otro nuevo seguidor
@juanfigueroa952
@juanfigueroa952 3 года назад
its works, but i am having problems with the brightness and it is not the potentiometer, where should i change it?
@ControllersTech
@ControllersTech 3 года назад
It's potentiometer only. There is nothing else. Make sure the vcc is 5v
@shubhampatil3254
@shubhampatil3254 3 года назад
The connection is correct. I also checked the device address using for loop. Its 0x4E. But when I send some string it just displays blank screen. LCD glows but nothing is displayed. Do I need to adjust the contrast ? Or the problem is something else ?
@ControllersTech
@ControllersTech 3 года назад
Try changing the contrast.. Also try with 0x7E address (for pcf8574A)
@sezerkaya3573
@sezerkaya3573 3 года назад
HELLOO I HAVE SAME PROBLEMS. HOW TO FIX ?? CAN U HELP MEE
@fevzibozkurt5794
@fevzibozkurt5794 Год назад
Can we use with proteus ?
@RedExtremeYT
@RedExtremeYT Год назад
I really can't send any strings. It does send the ASCII values but the lcd_send_string doesn't work, it just doesn't show anything. Please help, I know its late but I hope you are still here :)
@Pk-sw8ip
@Pk-sw8ip 2 года назад
The Link is not working i want the I2C LCD library files
@lorenzolastrucci6790
@lorenzolastrucci6790 4 года назад
Hi, where can i download the libraries u include in the project? i2c-lcd.h?
@ControllersTech
@ControllersTech 4 года назад
Go to the link in the description and download the zip file. Libraries are in their respective folders
@SYNMaN28
@SYNMaN28 4 года назад
Great turorial, but I need to set the I2C address to 0x7E whit the same pcf8574 configuratión A1, A2 and A3 to high. I read in another tutorial I need to shit left one bit. If I set the address to 0x4E the code not run. I not understand this happens. I use the blue pill board too.
@ControllersTech
@ControllersTech 4 года назад
Default address of pcf8574 is 0x4E ( 7 bit address + write bit). It will work with this address. If your device worked with 0x7E, than you have PCF8574A... And not the pcf8574 Look at the datasheet for the address..
@SYNMaN28
@SYNMaN28 4 года назад
​@@ControllersTech Yes, is the PCF8574A, you are in the correct. Thanks for the aclaration.
@yusufhzal3780
@yusufhzal3780 4 года назад
Master i can't send command variable on lcd it is not appearing.When i using f103 i included stdio.h and i used sprintf but it is not appearing but also it is apperaring when i use f407 discovery please help me
@ControllersTech
@ControllersTech 4 года назад
What i2c device u have ? Is it pcf8574 or 8574AT ? Also try to change the contrast by rotating the potentiometer on the pcf..
@KJBtheMosFett
@KJBtheMosFett 4 года назад
I can't figure out in the interface how to upload the code to the board....
@ControllersTech
@ControllersTech 4 года назад
You have to click the debug button
@muhammadalfahrezi1745
@muhammadalfahrezi1745 3 года назад
Why is my lcd not displaying text? can anyone help me?
@quioan6978
@quioan6978 2 года назад
How can I display ADC value or temperature on lcd when I use this library
@ControllersTech
@ControllersTech 2 года назад
Read the adc Convert to string using sprintf Send to display using lcd send string
@mehmetkaradag6968
@mehmetkaradag6968 2 года назад
Hi sir although i performed the LCD as you exactly had done , it is displaying Meaningless symbols such as "?,! etc.". How can i fix it ??
@ControllersTech
@ControllersTech 2 года назад
Try resetting it.. or disconnect the lcd power and connect it back. Sometimes it does that.. Make sure you are using the pull up resistors on the scl and sda lines
@kartikeyyendhe1840
@kartikeyyendhe1840 3 месяца назад
Please could you share the library for the LCD
@ControllersTech
@ControllersTech 3 месяца назад
Link to code is in the description.
@hasandurna9058
@hasandurna9058 Год назад
I am working with STM32f4 Discovery card and I need lcd header and source library files for this card. Can you help me ?
@ControllersTech
@ControllersTech Год назад
Link is in the description..
@hasandurna9058
@hasandurna9058 Год назад
@@ControllersTech Thanks for your quick reply. I used these files in my project but I could not see anything on the 2x16 LCD screen.
@hitarthladani5075
@hitarthladani5075 3 года назад
I performed the lcd i2c exactly you have done and with slave address 0x4E and 0x7E still the lcd display showing me black rectangles and not displaying the string that I have written in code.
@hitarthladani5075
@hitarthladani5075 3 года назад
So kindly me sir
@ControllersTech
@ControllersTech 3 года назад
Reduce the contrast using that potentiometer on the PCF8574
@hitarthladani5075
@hitarthladani5075 3 года назад
I also performed that several times
@hitarthladani5075
@hitarthladani5075 3 года назад
It’s problem my side your code perfectly right thank you sir.
@srushtigavand2606
@srushtigavand2606 2 месяца назад
lcd_data_string is not working.whaat to do ?it gives error implicit function declaration
@ControllersTech
@ControllersTech 2 месяца назад
There is no function called lcd_data_string. It should be lcd_send_string
@a.h.z2830
@a.h.z2830 2 года назад
decent video , but you should have spent more time explaining the configuration of the I2C in cube and the code download link is broken ( even the webpage on your website concerning the lcd i2c)
@Bob-Is-A-PotterNow
@Bob-Is-A-PotterNow Год назад
I do appreciate all the work that goes into your tutorials, both the coding effort and the video editing. The one problem I ran into, which took more than a day to sort out, was the lcd_init function, which indicates using 0x30 and 0x20 as commands. According to the specs, and my experience, those commands should be 0x3 and 0x2. For a noob such as myself, simple typos can be quite the challenge. A second discovery, not directly related to your tutorial: When I wanted to port the code to a Nucleo-103R8, I was mis-led by the Arduino pinouts and notations on the motheboard for SCL and SDA. It again took more than a few hours to discover those pins ONLY WORK when coding with the Arduino IDE wire library. To work directly with the STM32 mcu, the outer set of pins must be used. The code for the display will not work with the Arduino headers. It seems that that aspect of the Arduino shield vs the mcu pinout is not well documented, or at least I couldn't easily find such documentation. Again, thank you for your efforts, they are much appreciated and I have learned a lot from your tutorials.
@Bob-Is-A-PotterNow
@Bob-Is-A-PotterNow Год назад
Edit to the above: The init code is not a typo - rather it seems that my LCD, not from waveshare, required the edits. Apologies for the implication regarding the correctness of the code!
@ControllersTech
@ControllersTech Год назад
Alright it's nice that you understood the first point you made. Regarding the second point, everything works well with the Arduino pinouts. There are 3 sets of pins on the right side of the nucleo boards. The arduino header and the very next male header are interconnected. I never use the male headers on anucleo boards (except when I have to use the pins that are on the very extreme) and I never had such problem that something is not working with those pins.
@Bob-Is-A-PotterNow
@Bob-Is-A-PotterNow Год назад
@@ControllersTech Looking at the schematic for MB1136 pin 10 on CN5 (marked for Arduino as SCL/D15 on the pcb) is directly connected to pin 3 on CN10, but that is not valid for I2C_1 use by the mcu. Pin 3 on CN5 (marked on the PCB as PWM/CS/D10)is a direct connect to pin 17 on CN10, which is valid for I2C_1. What I found confusing/misleading was the Arduino notation regarding SCL. In both cases, the code and the physical connections, it still all goes back to RTFM! Thanks for your quick reply. Much more to learn... BTW - I believe I found the alternative init command code parameters in the Hitachi docs for the LCD, which I bought close to two years ago and I did not know who the manufacturer was. I continue to look forward to watching and learning more on your channel regarding both the STM32 and ESP32 devices. Best 😁
@memo9768
@memo9768 4 года назад
How can i know which handler is for my I2c? i'm using PCF8574 but the SLAVE ADDRESS is 0x27 or 0x3F.
@ControllersTech
@ControllersTech 4 года назад
U have to select the i2c while setting up the cubemx. Slave address for pcf8574 is 0x4E..
@memo9768
@memo9768 4 года назад
@@ControllersTech Done my i2c is PCF8574T therefore for stm32 model that I'm using the address is 0x7F. Now it works thank u
@imanel-bawab6406
@imanel-bawab6406 2 года назад
@@memo9768 Can you explain more? I am using STM32L4+ and PCF8574T as well. What were all the changes you made to the original code?
@jasonyu9279
@jasonyu9279 3 года назад
HI, I still can't understand why the data_t needs to OR(|) with 0x08 in cmd function.
@ControllersTech
@ControllersTech 3 года назад
Coz the backlight is connected to that pin and if we don't send 0x08 everytime, the backlight will turn off
@jasonyu9279
@jasonyu9279 3 года назад
@@ControllersTech ok I got it, thank you very much.
@beekeepinginuzbekistan1862
@beekeepinginuzbekistan1862 4 года назад
LCD screen is not dislaying the right text. it is just showing some symbols and slash lines. What kind of problem could it be? Thanks in advance.
@ControllersTech
@ControllersTech 3 года назад
What's the i2c device ? The addresses are different for different pcf devices.
@beekeepinginuzbekistan1862
@beekeepinginuzbekistan1862 3 года назад
@@ControllersTech i2c device is pcf8574T. I tried more than 30 different addresses, found from documentations and also from comments to this video. It is showing some symbols with address 0x4E & 0x4F
@beekeepinginuzbekistan1862
@beekeepinginuzbekistan1862 3 года назад
@@ControllersTech I found mistake in my code. So the problem was about calling initialization function of your library actually before i2c1 initialization. However this does not throwed any errors. Now it is working. Hope this comment might be useful for someone. Thanks.
@maticursic9431
@maticursic9431 4 года назад
I have a problem, light on lcd is on, but there is nothing written.. I have STM32L476 and I'm not sure about the slave address. Can you help me?
@ControllersTech
@ControllersTech 4 года назад
What i2c device you have ?
@maticursic9431
@maticursic9431 4 года назад
@@ControllersTech Lcm1602
@ControllersTech
@ControllersTech 4 года назад
That's the LCD. Are you connecting it via any i2c device, like pcf8574 or something
@maticursic9431
@maticursic9431 4 года назад
Yes, it says YwRobot iic v1 (the same with gnd, vcc, sda and slc)
@ControllersTech
@ControllersTech 4 года назад
You have to be more specific. Read the top on the IC. It must be something like pcf8574 or similar.. Telegram me @controllerstech
@jayasharma4208
@jayasharma4208 4 года назад
Sir, i am using UART/I2C adaptor (atmel) with 16x2 lcd, & I tried to detect its i2c port in arduino which shows 0x63, will it remain same in stm32?, In STM32 After debugging and running there are no errors, The lcd glows but do not display text. Board-f030r8
@ControllersTech
@ControllersTech 4 года назад
What's the i2c device ? Check the id on the IC.. try using the address (0x63
@jayasharma4208
@jayasharma4208 4 года назад
@@ControllersTech Thank you for replying, i2c id is not clearly mentioned. But it will be helpful if i can observe values on serial monitor for stm32F0 board( i read somewhere live expressions are not supported by F0 boards )
@savinogiovannimuscio2953
@savinogiovannimuscio2953 2 месяца назад
Hi every ones. My LCD 16x02 is working on arduino, my STM32 NUCLE U575ZI-Q is working on the default project, the I2C on the LCD has PCF8574T and all three A0 A1 A2 are opened, I tried all address combination but nothig to do, i see only the light on LCD related the 5 Vdc, no sentence and nothibg nothing. Please help me
@ControllersTech
@ControllersTech 2 месяца назад
No need to try different combinations. The address will be 0x4E or 0x7E (what's the address used with arduino ?). Sometimes reseting the board 2 3 times can make it work.
@savinogiovannimuscio2953
@savinogiovannimuscio2953 2 месяца назад
@@ControllersTech Hi and tks for replay to me. I tried many times with the adress 0x4E and 0x7E as well, also reset i did. The adress 0x27 on arduino is working very good.
@ControllersTech
@ControllersTech 2 месяца назад
The 8 bit equivalent address for 0x27 is 0x4E, so use this address. Check the i2c clock, make sure it is 100KHz. Also make sure you are using correct value for the external crystal. Try connecting the pull up resistors on the SCL and SDA lines.
@riehdjcnxnxdien3439
@riehdjcnxnxdien3439 10 месяцев назад
I used HAL_I2C_Master_Transmit_IT replace for HAL_I2C_Master_Transmit and it doesn't work.can you tell me why?
@ControllersTech
@ControllersTech 10 месяцев назад
Don’t use interrupt. It doesn’t do any good in this case. The data need to sent in sequence and the next transfer should only start when the previous one is finished.
@riehdjcnxnxdien3439
@riehdjcnxnxdien3439 10 месяцев назад
@@ControllersTech what about dma in this case ?
@emregulmez9695
@emregulmez9695 3 года назад
I have STM32F407VG discovery board, I did all thıngs same, and I already change slave base adress to 0x27 . Am I need to change anything else? When I try debug and play, nothing running on the lcd
@emregulmez9695
@emregulmez9695 3 года назад
But I try to find base address for my I2c module. I find a 0x27. How I will configure it ?
@emregulmez9695
@emregulmez9695 3 года назад
And I changed to LCD_Driver main library to #include "stm32f4xx_hal.h"
@ControllersTech
@ControllersTech 3 года назад
What module you have ?
@emregulmez9695
@emregulmez9695 3 года назад
@@ControllersTech PCF8574
@emregulmez9695
@emregulmez9695 3 года назад
Sir I found it , from datasheet . It sould be 0x4F. Now ıts working. And module :PCF8574; PCF8574A
@roopesh668
@roopesh668 Год назад
Hi! I am using HW-061. What is the address for that? I am not able to find datasheet
@ControllersTech
@ControllersTech Год назад
That is not a real thing. It's just LCD attached to pcf8574. So the address will be same. Try either 0x4E or 0x7E
@kiausiniukova2842
@kiausiniukova2842 2 года назад
hey, when i try to use send data comand, lcd prints random symbol, why does it prints only ASCI ? shouldnt send data let me send variable value to lcd?
@ControllersTech
@ControllersTech 2 года назад
Ask it to the manufacturers of the LCD.. 😜 Anyway, you can use sprintf to convert the data to string and then send it..
@kiausiniukova2842
@kiausiniukova2842 2 года назад
@@ControllersTech so if I want to print my variable, for example uint8_t i which will increment every second and want to see numbers increase, its not possible with this library? lcd_send_data only send char or strings in this library?
@ControllersTech
@ControllersTech 2 года назад
Use sprintf to convert.. You have to do the same for every display you use, or whenever you transfer data..
@kiausiniukova2842
@kiausiniukova2842 2 года назад
@@ControllersTech i see, thank you
@whatsout837
@whatsout837 Год назад
excuse me, how to connect PCF8574 to STM32F103C8 like SDA, SCL, INT in proteus. how is that?
@ControllersTech
@ControllersTech Год назад
Check out this page. controllerstech.com/i2c-lcd-in-stm32/ In the connection, i have shown the proteus picture.
@enginar4900
@enginar4900 Год назад
@@ControllersTech Hi, your website seems to be down unfortunately. I can't access the code.
@ControllersTech
@ControllersTech Год назад
It's fixed now
@enginar4900
@enginar4900 Год назад
@@ControllersTech Oh, thank you for fixing and your fast response 🙂🙂
@busraercan246
@busraercan246 4 года назад
How can I set the display contrast?
@ControllersTech
@ControllersTech 4 года назад
Rotate the potentiometer at the back of the i2c device
@50_fadhil63
@50_fadhil63 2 года назад
Can you build this in Proteus? Cause i cant run it, the lcd wont respon
@nguyenhuyhoang8866
@nguyenhuyhoang8866 7 месяцев назад
Have you fixed this error? I ran into the same problem and don't know how to fix :((((((
@anhtaio4128
@anhtaio4128 3 года назад
Failed to start GDB server Failed to start GDB server Error in initializing ST-LINK device. Reason: (18) Could not verify ST device! Abort connection. Help me pro?
@041-sutanfarhana.9
@041-sutanfarhana.9 3 года назад
Check your ST-Link wiring. And you should upgrade the driver too if necessary
@tejalgadad4496
@tejalgadad4496 Год назад
I had a doubt can anyone please help me..the PCF8574 & LCD module are supplied 5V via the STM32 controller right? And since STM32 runs on 3.3V the SCL &SDA lines would carry 3.3V as well so then isn't this harmful for the PCF8574 IC as its supply voltage is 5V but the clock and data lines bring 3.3V
@ControllersTech
@ControllersTech Год назад
The PCF takes care of it. Don't worry about that
@tejalgadad4496
@tejalgadad4496 Год назад
@@ControllersTech Thank you so much for replying. Can you please give me details on where I can find this information in the datasheet. Also it means that STM32 will also be safe along with PCF8574?
@tejalgadad4496
@tejalgadad4496 Год назад
@@ControllersTech I came across a thread on a forum where there was mention of ViH of PCF which is 0.7 times VCC(5V in your video) according to datasheet i.e. ViH = 3.5v. So if we use 3.3v sda and scl lines from stm32 then 3.3v does not cross the ViH which is 3.5v which sounds convincing but then again i donot know how it worked for you in the video. I was thinking of using bidirectional level shifter in the circuit between SDA and SCL lines.
@stevenbennett6123
@stevenbennett6123 3 года назад
Very helpful video but can you explain why you say to not use address 0x27, my LCD uses the PCF8574T and its I2C address is 0x27?
@ControllersTech
@ControllersTech 3 года назад
Because 0x27 is not the address. You must be taking the reference from the Arduino, it uses the upper 7 bits for addressing and the 0th bit (R/W) bit is take care of later in the code. STM or any other mcu uses the full 8 bits for the address. Which includes the R/W bit also.
@041-sutanfarhana.9
@041-sutanfarhana.9 3 года назад
@@ControllersTech so if I use the PCF8547T, what address should be choosed?
@ControllersTech
@ControllersTech 3 года назад
The datasheet says the address is 0x4E... So you use the same..
@041-sutanfarhana.9
@041-sutanfarhana.9 3 года назад
@@ControllersTech thank you. Your reply helps me a lot for my study
@thomaswang3281
@thomaswang3281 2 года назад
PCF8675T i2c address is 0x4e
@DrQuyetNguyen
@DrQuyetNguyen Месяц назад
where do i find the i2c-lcd library files?
@ControllersTech
@ControllersTech Месяц назад
Link to download the project is in the description
@me3dnone107
@me3dnone107 4 года назад
Your lcd_clear function is superfluous. The lcd controller already has a command (0x01) to clear. Thus you'd better use "lcd_send_cmd (0x01);" The comments in lcd_send_data regarding rs are wrong. (is: "rs=0", should be: "rs=1")
@ControllersTech
@ControllersTech 4 года назад
Yeah (0x01) clears the screen but i have had a lot of issues with it. That's why i wrote that one. And about 'rs', it's value is '1' while sending data. I might have forgot to modify the comment section, but it is '1'. You can see that in the command that we send. If it's'0', the data won't display at all.
@m.nauman7801
@m.nauman7801 4 года назад
Download Link is broken. Kindly update the download link..
@ControllersTech
@ControllersTech 4 года назад
it's updated now..
@liamferro7123
@liamferro7123 2 года назад
it’s work very fine, good job. Can you help me to print the value of the potentiometer linked on ADC please?
@ControllersTech
@ControllersTech 2 года назад
Convert the value to string using sprintf, and then print the string
@liamferro7123
@liamferro7123 2 года назад
@@ControllersTech thank you for your answer but iam in the begining and need more practise..... HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,HAL_MAX_DELAY); potentiometer=HAL_ADC_GetValue(&hadc1); char buffer[4]; lcd_send_string ("potentiometer="); sprintf (buffer, "%d", potentiometer); lcd_send_string(buffer); but it doesnt work
@ControllersTech
@ControllersTech 2 года назад
1. Make sure the adc is working.. 2. Declare the buffer as global and check in the live expression if it is updating with the value 3. I am guessing that the potentiometer is not an integer variable so make sure you use the formatting correct for sprintf
@liamferro7123
@liamferro7123 2 года назад
@@ControllersTech now the value of potentiometer is shown in display but it is not updating in real time, i need to reset a processor to update a value right now. How can do to be updating in real time. Thank you sir, you are helpfull
@ControllersTech
@ControllersTech 2 года назад
You have to put the code in while loop.. Also make sure you stop the adc in the end.. While (1) { Start Poll Getvalue Print Stop }
@andrewtitoff6167
@andrewtitoff6167 10 месяцев назад
doesn’t write anything in the second line… (
@zepovinho8066
@zepovinho8066 3 года назад
can you tell me what adress should i use with i2c2 and not i2c1?
@ControllersTech
@ControllersTech 3 года назад
Adress is for the device. It's same no matter what i2c you use
@zepovinho8066
@zepovinho8066 3 года назад
@@ControllersTech I'm using i2c2 without changing nothing that you did and my lcd 16x2 is only green nothing more, not a single sentence or values is showing up in the screen Any ideia what it could be?
@zepovinho8066
@zepovinho8066 3 года назад
@@ControllersTech when I say address I'm referring to the salve address
@filestrec
@filestrec 8 месяцев назад
and where do i get the .c and .h, cmon, the folder you make us download is not the same folder you copy those files from
@ControllersTech
@ControllersTech 8 месяцев назад
The files are where I copied them, in the src and inc folders.
@thinhphan7622
@thinhphan7622 4 года назад
Why does my code only run at 8MHz frequency?
@ControllersTech
@ControllersTech 4 года назад
Maybe your clock selection is wrong..
@DanielPerez-gy1qq
@DanielPerez-gy1qq Год назад
Do you find the error? i have the same error:(
@jimidjoriginal9295
@jimidjoriginal9295 3 года назад
Link for libraries does not work, please help, i really need those libraries :(
@ControllersTech
@ControllersTech 3 года назад
Link is alright. What's not working ? Can u share some details
@jimidjoriginal9295
@jimidjoriginal9295 3 года назад
@@ControllersTech This link: controllerstech.com/i2c-lcd-in-stm32/ this links says Content Encoding Error when i try to open it
@ControllersTech
@ControllersTech 3 года назад
Use chrome Or try this support.mozilla.org/en-US/questions/1163431
@jimidjoriginal9295
@jimidjoriginal9295 3 года назад
@@ControllersTech Chrome just shows a blank page, and any solution i tried for Firefox does not work :/
@jimidjoriginal9295
@jimidjoriginal9295 3 года назад
​@@ControllersTech I found another way to download the libraries and they work perfect, thank you so much, also nice tutorials, keep up the good work :)
@galvanomondo6453
@galvanomondo6453 3 года назад
can i use with stm32f0 ?
@ControllersTech
@ControllersTech 3 года назад
Yes
@kaixer9312
@kaixer9312 3 года назад
can I use this coding for stm32f446re?
@ControllersTech
@ControllersTech 3 года назад
Yes.. i myself have used with 446RE
@kaixer9312
@kaixer9312 3 года назад
@@ControllersTech can i set the coding to do. For example: at first lcd will display "Hello World" then after 3 sec it will display another word for example "Bye". If it possible how can i do it?
@ControllersTech
@ControllersTech 3 года назад
Just like u said First send the string "hello world" Hal delay (3000) Now clear the display Send the string "bye"
@yunusemreuzmez8308
@yunusemreuzmez8308 4 года назад
The library in the video and the library in your website are different.And it doesn't work
@ControllersTech
@ControllersTech 4 года назад
I keep making changes to the library, though the functions remains same. The library works very well. What device you have and what slave address r u using ?
@yunusemreuzmez8308
@yunusemreuzmez8308 4 года назад
@@ControllersTech my slave adress is 0x27 when i build project ide finds errors on library
@ControllersTech
@ControllersTech 4 года назад
Why is slave address 0x27 ? Did you read the datasheet of the device that you are using ? Use 0x4E
@yunusemreuzmez8308
@yunusemreuzmez8308 4 года назад
Controllers Tech Yeah.I take that from datasheet. I tried 0x4E too.I am using Atollic when i pressed build button it finds errors on library and i dont undertand what are the reasons of errors.If you want i can share that.Thanks for your answers.
@ControllersTech
@ControllersTech 4 года назад
What is the error ? Can u post the output of console
@busybee3627
@busybee3627 4 года назад
Where to get i2c-lcd.x files?
@ControllersTech
@ControllersTech 4 года назад
Download the code. The files are in src and inc folders
@busybee3627
@busybee3627 4 года назад
@@ControllersTech Thank you. Where these files originally come from? Is there shared library for STM32?
@ControllersTech
@ControllersTech 4 года назад
Nope... I wrote those.
@MamidipalliBujji
@MamidipalliBujji 23 дня назад
How can i download those files?
@ControllersTech
@ControllersTech 23 дня назад
Go to the link in the description, scroll down to the end of the post, click download to download the zip file. The files are inside the core>src and core>inc folders.
@MamidipalliBujji
@MamidipalliBujji 23 дня назад
Tqq sir
@Doile911
@Doile911 4 года назад
The oly thing i see is white bricks in the first row.
@ControllersTech
@ControllersTech 4 года назад
Reduce contrast. Also check the device address, and make sure you are not using the arduino one.
@Doile911
@Doile911 4 года назад
@@ControllersTech Thanks! fixed! :D now i only have to fix the issue with the dht11, for some reason it doesnt display data (i watched your other video on that matter as well).
@ControllersTech
@ControllersTech 4 года назад
You have to first check if the dht11 is getting data or not. Either use debugger or blink led or something
@Doile911
@Doile911 4 года назад
@@ControllersTech alright, i will, thanks
@maulidakhusnulaqib9975
@maulidakhusnulaqib9975 4 года назад
hai
@zapatazapata6414
@zapatazapata6414 3 года назад
why dont you just use your own voice man, this is quite cringy
@50_fadhil63
@50_fadhil63 2 года назад
Is this build can run in stm32f4?
@ControllersTech
@ControllersTech 2 года назад
Yes
Далее
RTC in STM32 || LCD 16x2 || HAL || CubeMx
16:31
Просмотров 53 тыс.
Conquering fears and slippery slops on two wheels!
00:18
Yeni Özbək Mahnisi Yoxsa Vefali Reqsi? 😍
00:36
Просмотров 1,8 млн
D3 Ваз 2107 Не умри от зависти!
18:57
Strawberry Cat?! 🙀 #cat #cute #catlover
00:42
Просмотров 3,6 млн
Serial LCD - I2C Backpack
13:23
Просмотров 161 тыс.
Datasheets: 16x2 LCD By Hand (No microcontroller)
26:35
DS3231 RTC Module and STM32 || cubeide || I2C-LCD
18:17
I built my own graphics card
15:34
Просмотров 1,4 млн