LCD via I2C in STM32 || CUBEIDE || PCF8574

  Рет қаралды 81,243

ControllersTech

ControllersTech

Күн бұрын

Пікірлер: 226
@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 3 ай бұрын
Meeru files ela download chesaru?
@MamidipalliBujji
@MamidipalliBujji 3 ай бұрын
I tried a lot of times but the correct files are not downloaded
@Ngigi
@Ngigi 2 жыл бұрын
Such an amazing tutorial. I followed it and it worked on the first attempt. Thank you!
@sampoteste
@sampoteste 4 жыл бұрын
These demonstrations are just excellent. Thanks for your good work and Happy New Year.
@DERKONIG12345
@DERKONIG12345 10 ай бұрын
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 9 ай бұрын
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 9 ай бұрын
I see thanks@@ControllersTech
@wenceslaoacosta2601
@wenceslaoacosta2601 27 күн бұрын
I couldn't display anything until I put some pull-up resistors in both SDA and SCL pins of the STM32. THANK YOU!!!!
@DERKONIG12345
@DERKONIG12345 27 күн бұрын
@@wenceslaoacosta2601 Yeah you need both. That is because there is a common line, where all devices are connected, if some random device is pulling down, the Vcc of others can be shorted.There is a nice document from Texas Inst. explaining I2C.
@robertopascazi228
@robertopascazi228 4 жыл бұрын
Very good, clear and complete explanation. Thanks a lot!
@voeunkhoem9338
@voeunkhoem9338 3 жыл бұрын
From Cambodia... Thank you very much for good demonstration
@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?
@ihsanc5230
@ihsanc5230 Ай бұрын
For those having problem writing on the screen you might have to adjust the potentiometer on the PCF8574 IC board. That was the solution for me.
@florianthomashanisch9319
@florianthomashanisch9319 2 жыл бұрын
Great Video! Thanks a lot from Germany :D DANKESCHÖN!
@andrelabuschagne5747
@andrelabuschagne5747 3 жыл бұрын
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.
@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);
@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
@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 :)
@pinkuchauhan8247
@pinkuchauhan8247 4 жыл бұрын
You are the great man
@luizazeredo5197
@luizazeredo5197 4 жыл бұрын
Perfeito sua aula , obrigado por compartilhar conhecimento
@alirezamoosavian3143
@alirezamoosavian3143 3 жыл бұрын
thank you for your perfect toturial.
@GoracyKanal
@GoracyKanal 4 жыл бұрын
Great video
@AlexEduardoRR
@AlexEduardoRR 3 жыл бұрын
Thanks! Nice explanation!
@gautombose4172
@gautombose4172 4 жыл бұрын
Please SHOW where to get the Library Flies from. Surely it is very important to know this.
@eduardodelarosaferrer2205
@eduardodelarosaferrer2205 4 жыл бұрын
You are the best !!!
@tupoy_ytub_uberi_psevdonim
@tupoy_ytub_uberi_psevdonim 2 жыл бұрын
It's maximum simple, thank u :)
@grishque1193
@grishque1193 3 жыл бұрын
Lot of thanks!
@priyankakundu8867
@priyankakundu8867 3 жыл бұрын
can you provide the proteus file? or show me how proteus simulation works?
@MamidipalliBujji
@MamidipalliBujji 3 ай бұрын
Could you please tell me the name to search and get the correct file?
@MamidipalliBujji
@MamidipalliBujji 3 ай бұрын
I tried a lot of times but files are not yet downloaded
@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
@justanotherpoweraddict7918
@justanotherpoweraddict7918 4 жыл бұрын
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 4 жыл бұрын
In the lcd clear function, we send the command 0x01 to the display. Try increasing the delay after that command
@mehrdad-mixtape7970
@mehrdad-mixtape7970 3 жыл бұрын
Thank you so much :)
@mnane34
@mnane34 3 жыл бұрын
thanks a lot sir.
@andrewtitoff6167
@andrewtitoff6167 Жыл бұрын
doesn’t write anything in the second line… (
@kartikeyyendhe1840
@kartikeyyendhe1840 6 ай бұрын
Please could you share the library for the LCD
@ControllersTech
@ControllersTech 6 ай бұрын
Link to code is in the description.
@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
@srushtigavand2606
@srushtigavand2606 5 ай бұрын
lcd_data_string is not working.whaat to do ?it gives error implicit function declaration
@ControllersTech
@ControllersTech 5 ай бұрын
There is no function called lcd_data_string. It should be lcd_send_string
@FelypeFerreira0101
@FelypeFerreira0101 3 жыл бұрын
did someone set up this project on the proteus? I have some doubts in that part.
@METHEE.C
@METHEE.C 10 ай бұрын
Hi i need function on/off BACKLIGHT
@jhankhanajoshi2052
@jhankhanajoshi2052 3 жыл бұрын
Only lcd_send_string function is not working in my project. pls guide me
@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.
@michielspiritus7155
@michielspiritus7155 3 жыл бұрын
How to send custom characters like a pause icon or something?
@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 😁
@fevzibozkurt5794
@fevzibozkurt5794 2 жыл бұрын
Can we use with proteus ?
@ebad-ur-rehman5342
@ebad-ur-rehman5342 2 жыл бұрын
how to use these libraries without using HAL/cube ide
@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
@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
@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
@a.h.z2830
@a.h.z2830 3 жыл бұрын
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)
@riehdjcnxnxdien3439
@riehdjcnxnxdien3439 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@ControllersTech what about dma in this case ?
@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
@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
@beyhandagitan2246
@beyhandagitan2246 19 күн бұрын
Birebir aynısını uyguladım, sonuç olumsuz. (I applied your code, not working) Adresi de 27 veya 4E,3F hepsini denedim (I tried different slave address). LCD ekranı bile değiştim (I changed LCD) . 100000 Hz I2C frekansı aynı (I2C Clock Frequenct the same) F103C8 board aynı Clock frekansı aynı 72MHz, PLCK1 36Khz . What is the problem?
@beyhandagitan2246
@beyhandagitan2246 19 күн бұрын
I added PULL UP resistor for I2C lines, no any character on display
@Pk-sw8ip
@Pk-sw8ip 2 жыл бұрын
The Link is not working i want the I2C LCD library files
@vinodkinoni4863
@vinodkinoni4863 2 жыл бұрын
nice
@shinigamimorax357
@shinigamimorax357 4 жыл бұрын
Thank you very much! You are helpful person.
@DrQuyetNguyen
@DrQuyetNguyen 4 ай бұрын
where do i find the i2c-lcd library files?
@ControllersTech
@ControllersTech 4 ай бұрын
Link to download the project is in the description
@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
@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.
@MondalSubhendu
@MondalSubhendu 2 ай бұрын
how can i got I2c libraries
@ControllersTech
@ControllersTech 2 ай бұрын
Always read the description of the tutorial videos.
@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
@m.nauman7801
@m.nauman7801 4 жыл бұрын
Download Link is broken. Kindly update the download link..
@ControllersTech
@ControllersTech 4 жыл бұрын
it's updated now..
@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
@muhammadalfahrezi1745
@muhammadalfahrezi1745 3 жыл бұрын
Why is my lcd not displaying text? can anyone help me?
@filestrec
@filestrec 11 ай бұрын
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 11 ай бұрын
The files are where I copied them, in the src and inc folders.
@busraercan246
@busraercan246 4 жыл бұрын
How can I set the display contrast?
@ControllersTech
@ControllersTech 4 жыл бұрын
Rotate the potentiometer at the back of the i2c device
@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.
@roopesh668
@roopesh668 2 жыл бұрын
Hi! I am using HW-061. What is the address for that? I am not able to find datasheet
@ControllersTech
@ControllersTech 2 жыл бұрын
That is not a real thing. It's just LCD attached to pcf8574. So the address will be same. Try either 0x4E or 0x7E
@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 4 жыл бұрын
What's the i2c device ? The addresses are different for different pcf devices.
@beekeepinginuzbekistan1862
@beekeepinginuzbekistan1862 4 жыл бұрын
@@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 4 жыл бұрын
@@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.
@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 }
@Steven_Bennett_YT
@Steven_Bennett_YT 4 жыл бұрын
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 4 жыл бұрын
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
@savinogiovannimuscio2953
@savinogiovannimuscio2953 5 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
@@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 5 ай бұрын
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.
@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..
@seyitkont
@seyitkont Ай бұрын
Bro I2C Library ? pleasee
@ControllersTech
@ControllersTech Ай бұрын
Link is in the description
@50_fadhil63
@50_fadhil63 2 жыл бұрын
Can you build this in Proteus? Cause i cant run it, the lcd wont respon
@nguyenhuyhoang8866
@nguyenhuyhoang8866 10 ай бұрын
Have you fixed this error? I ran into the same problem and don't know how to fix :((((((
@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?
@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.
@ahmetefeakyazi
@ahmetefeakyazi Жыл бұрын
@@ControllersTech Hi, your website seems to be down unfortunately. I can't access the code.
@ControllersTech
@ControllersTech Жыл бұрын
It's fixed now
@ahmetefeakyazi
@ahmetefeakyazi Жыл бұрын
@@ControllersTech Oh, thank you for fixing and your fast response 🙂🙂
@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.
@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 )
@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
@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.
@50_fadhil63
@50_fadhil63 2 жыл бұрын
Is this build can run in stm32f4?
@ControllersTech
@ControllersTech 2 жыл бұрын
Yes
@galvanomondo6453
@galvanomondo6453 3 жыл бұрын
can i use with stm32f0 ?
@ControllersTech
@ControllersTech 3 жыл бұрын
Yes
@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
@kiausiniukova2842
@kiausiniukova2842 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
Use sprintf to convert.. You have to do the same for every display you use, or whenever you transfer data..
@kiausiniukova2842
@kiausiniukova2842 3 жыл бұрын
@@ControllersTech i see, thank you
@MamidipalliBujji
@MamidipalliBujji 3 ай бұрын
How can i download those files?
@ControllersTech
@ControllersTech 3 ай бұрын
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 3 ай бұрын
Tqq sir
@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.
@anhtaio4128
@anhtaio4128 4 жыл бұрын
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
@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"
@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 :)
@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.
@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
60. STM32CubeIDE LCD 1602 Display. Parallel 16x2 with STM32F446RE
9:47
MicroPeta by Nizar Mohideen
Рет қаралды 29 М.
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 11 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 60 МЛН
Using I2C for any device on STM32 with HAL | VIDEO 26
37:51
Matej Blagšič
Рет қаралды 78 М.
LCD1602/LCD2004. Подключаем к Stm32 по i2c.
29:43
Олег Волков
Рет қаралды 11 М.
STM32 HAL with CubeMX: Tutorial 42 - I2C LCD16x2 driver
8:25
Mutex Embedded
Рет қаралды 23 М.
DS3231 RTC Module and STM32 || cubeide || I2C-LCD
18:17
ControllersTech
Рет қаралды 28 М.
57. STM32CubeIDE LCD 1602 Display. I2C 16x2 with STM32F103C8T6
7:24
MicroPeta by Nizar Mohideen
Рет қаралды 18 М.
#4 CubeMx ile STM32F103 Programlama - 16x2 LCD Kütüphanesi
18:06
Gömülü Mühendis
Рет қаралды 20 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
Datasheets: 16x2 LCD By Hand (No microcontroller)
26:35
Mitch Davis
Рет қаралды 101 М.
A simple BIOS for my breadboard computer
21:53
Ben Eater
Рет қаралды 344 М.
The RS-232 protocol
26:10
Ben Eater
Рет қаралды 843 М.
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 11 МЛН