On displays with resolution more then 256pixels , declaration of cursor_x or (and) cursor_y must be changed to uint16_t instead uint8_t , otherwise when printing on cursor position above 255 text will be unexpected wrapped.
I think the translation of the databyte could be a done by 256 bytes lookup table which could be final translation everyone possible byte to output data. This same for data input.
What is your supply connection? 3v3 or 5volts? I use the same display but have only white screen after sending some DrawPixel cmd.. then connected it to the scope and noticed that commands ( D/C marked as Rs ) has wrong volltage level instead of being low when sending command has some strange voltage 1.5v but when i disconnected that pin from the display the state is correct. The ground is common so in my point the roblem lays on the voltage levels. I connected 5v and 3.3 to correponding pins on display but i have doubts if that 3.3v is reference for logic interface. Now i will test it with 3v3 voltage provided to 5v pin but need to wait for that ( iam away from home now ) anyway your video proved that this Arduino shild can be connected to stm cmos voltages..
Nice job. I have a screen similar to that, I would like to know if that same lcd can be used with the spi interface, since the parallel one looks a bit slow
I'm using the STM32 NUCLEO-L476RG. The readID() function isn't reading the ID of my display. Its is a Newhaven TFT (128x160) with a ILI9163 driver. Any clues as to why I'm not able to read the ID?
I'm trying to adapt the code for the SSD1963, but with no success so far....it says on the "user_setting.h" that the SSD1963 only works with 16bits bus....any helps?
.h files are for user definitions and function prototypes etc... Move this code from user_setting.h and place it over or under main function. void delay (uint32_t time) { __HAL_TIM_SET_COUNTER(&htim1, 0); while ((__HAL_TIM_GET_COUNTER(&htim1))
Hi! Thanks for the code :D. Are you planning to extend the library to use the Touch capabilities of some displays? Also, do you have an example for a bitmap code? I tried uploading some bitmaps from a previous project, but they don't seem to be working :/
@@morosz1159 Yes. I don't remember how I figured it out though. Moved to Nextion and DWIN screens anyway coz they're so much easier to use and have powerful onboard processors.
Just define that function in some *.c file (like main.c or tft.c) and use the keyword "extern" here in the usersetting.h file (extern void delay (bla bla)).
I am using Nucleo-F446RE board so it already have the Arduino comparable connector and also I am using IL9341 LCD driver. I edited the code using Cube ide. Done the pin clearing and data writing as per your suggestion.Code compile without any error but it is only showing white screen.Could you please help me on this.
@@231ara I have the same problem.. i am using tft ILI9341 with nucleo F767ZI. i have no error but only white screen. do u have any suggestions please ?
Hello, This tutorial working for ILI9341 for Nucleo H743ZI,but only for printing figures. Unfortunatley it not working for printing text, could you help, maby you have link to newest tft.c file with setting for ILI9341 ?
Hi, I had the same problem with H745ZI-Q, and I figured out, that it's problem caused by "pgm_read_xxxx()" macros. I changed for example: "uint8_t *bitmap = (uint8_t *)pgm_read_pointer(&gfxFont->bitmap);" to "uint8_t *bitmap = (uint8_t *)gfxFont->bitmap;". i did it only in functions "write" and "drawChar" in tft.c. Now it works well for me.
You mean like a screenshot. Well i don't know for sure but you can weite the data simultaneously on screen and sd card. Otherwise if you have a controller with enough memory to store the entire frame buffer, you can just copy that frame buffer to a file in sd card.
Yes you’re right .. i tried all your videos to configure my ILI9225 with LVGL and doesn’t work for me :( i tried a lot and my last advancement is that i make it work but drawing things using lcgl with Draw pixel function.. which mean my display is really really slow and i can’t make it work using draw bitmap :( i also send you an email and messages in discord .. please help if you can
I had tried this code on stm32f103rb nucleo board with necessary changes.but the code doesnt worked on it.can you please suggest me the required changes and considerations to run this code on my board. Also,i have a doubt in the case of read pin configuration,whether it need to configure as input or output pin
You can first try to use the f103c8 code directly without changing anything. Use the same pins as i have used in the code. Connect the tft on the breadboard. Once it works out, than you can try to go for the pins according to your board..
@@ControllersTech i have tried it.but it didnt work can u please give me the clarification regarding the read pin,whether it need to configure as input or output pin..since in some other codes, it had configured as output pin.
What read pin ? If you are talking about the data pins, than they will be configured as output or input based on the situation. The code will automatically do that. You can set it to whatever you want in the cubemx
Hello sir. I am using ILI9341 (8 bits LCD shield) with STM32F103C8T6 and ILI9341 (16 bits LCD shield) using STM32F407ZGT6 board. In both boards I managed to install your driver using STM32CubeIDE and STM32CubeMX. Now what I want to do is to install the touch screen interface. Where I can find the drivers (XPT 2046) using HAL library for these boards (BluePills and BLACK-F407ZG)? I appreciated very much your work with this interface. Many Thanks.
I ported that code from the mcufriend's. I think you should look into that. I can't help much about this as i have dropped my plan for these LCDs. I will be using nextion HMI display now onwards for any application that requires it.
It is posible to change the tft pin? I'd try to change PA5 to PB7 pin because i need 3 more ADC pin. After change device pinout and write in user_setting.h, that give me error hard fault interrupt. May everybody in here ever tried to change tft pin? Please leave comment, thanks lot
I miss that important step. So the solution if we want to change that pin. First to do is change microcontroller pin in stm32 pin planner. Second change clear pin configuration 7:17. Last is change data pin read configuration 11:42.
I port this code from mcufriend library. Made some changes to make it as simple as i can. But i couldn't find a workaround for read or write. Just watch the video carefully at that point, it's not that difficult to get. You can make it simple by connecting pins according to their respective positions for eg LCD_D0 to PA_0 and LCD_D7 to PA_7
@@ControllersTech Ok thank you for reply. I'm coming from Arduino 8 bit programming. So STM32's BSRR register a bit confusing. Actually maybe it's more easy to use BRR register for reset a bit on port. I guess I need to leave Arduino IDE and focus on STM32 Cube IDE :)
@@ControllersTech plz help me sir nothing is on display only white screen is coming,, I uncomment the define support 9342 and change screen size in user setting, what other thing I can do?
Thanks, im trying to do same thing but without HAL ( i just don't like using it). Its a very good tutorial
On displays with resolution more then 256pixels , declaration of cursor_x or (and) cursor_y must be changed to uint16_t instead uint8_t , otherwise when printing on cursor position above 255 text will be unexpected wrapped.
I think write_8 and read_8 macro waste too many clock and defeat the purpose of parallel interface itself to achieve faster data throughput.
I think the translation of the databyte could be a done by 256 bytes lookup table which could be final translation everyone possible byte to output data. This same for data input.
This is great!! I was looking for such a library from such a long time!! Thanx a lot
What is your supply connection? 3v3 or 5volts? I use the same display but have only white screen after sending some DrawPixel cmd.. then connected it to the scope and noticed that commands ( D/C marked as Rs ) has wrong volltage level instead of being low when sending command has some strange voltage 1.5v but when i disconnected that pin from the display the state is correct. The ground is common so in my point the roblem lays on the voltage levels. I connected 5v and 3.3 to correponding pins on display but i have doubts if that 3.3v is reference for logic interface. Now i will test it with 3v3 voltage provided to 5v pin but need to wait for that ( iam away from home now ) anyway your video proved that this Arduino shild can be connected to stm cmos voltages..
Thx man, did it in an ILI9486 using a nucleo f401re and worked well.
What value did you select for "define SUPPORT"?
@@Shubhamjain94 use 0x9486 as the device ID, still it will work with some errors in word wrapping.
Thanks a lot sir, but why my text running so slowly ? i use printnewtstr and fillRect functions, like blinking . And Why we need timer 1 ?
You are a legend.
Thankyou very much
Can you make an application on touch by drawing a rectangle like button?
Maybe soon...
sorry but, the library is the same if i use "driver ILI9225" for LCD?
does it work for you please ?
@@mohamedmenacer2468 sorry, but i use st7735 instead :( ...
some other youtuber make video with st7735 ic drive , so i used that
Okey, Thank you for replying 🙏🏻
please im using ILI9225 and it doesn't work .. ILI9225 doesn't have a lot of pins just CS DC and RESET .. help
i am using cube MX with keilc v5 and i have 30 error. they are expected a ";" how can i fix it? thank you
Use cubeide
Nice job. I have a screen similar to that, I would like to know if that same lcd can be used with the spi interface, since the parallel one looks a bit slow
Not this one. But there are displays similar to this which can be used..
I am getting make file error. It is showing multiple declarations for "void delay()" in user_setting.h
mee too, i have copied and pasted the .h and .c files multiple times but it did not work
__ tft.c contains the header -> #include "user_setting.h" //multiple declaration
Use cubeide
Same happens to me and i am using the cubeide, maybe it's missing something in the code?
@@nicolasmiller4659 @Nicolas Miller In main.c delete #include "user_settings.h" header //multiple declaration _cubemx - truestudio
Another great work Thanks for that. Is it possible to use the screen with 90 degree rotation? Kind of landscape mode.
Yes it does. There is a function "set rotation"
When I use expressions to find ID value, it says Target not available. Any fixes?
How to use FSMC and DMA for lcd?
I tried to build the project with keil but i am having a lot of errors. Does anyone know why?
same
@@maulanawahyudi7127 it seems that the project only works with cubeIDE
@@FunSpark-Horizon Have you tried it sir?
@@maulanawahyudi7127 Yes I did. It works with cubeIDE
@@FunSpark-Horizon that's work sir, but how i can clear the text ?
I'm getting a error during my debug, the debugger shows me that the width is wrong
I'm using the STM32 NUCLEO-L476RG. The readID() function isn't reading the ID of my display. Its is a Newhaven TFT (128x160) with a ILI9163 driver.
Any clues as to why I'm not able to read the ID?
If you have an arduino, i suggest use that to try mcufriend library in that. If it doesn't work with that, it won't work here also..
It does not work for me.
Hai i am using 3.2 tft display ili9325 and xpt 2046 will this driver work for that?
I'm trying to adapt the code for the SSD1963, but with no success so far....it says on the "user_setting.h" that the SSD1963 only works with 16bits bus....any helps?
i don't have the display so can't confirm about this.
Hi
Thank you for your useful training
The program works properly, only the texts are mirrored !!!
Help if possible
stm32f103c8t
Ili9325
That's a pretty theme. what OS are you running?
I guess i was using deepin that time..
it says multiple defination of delay
have you found the solution for this?
@@tomdehaan3349 go to the site in the discription and you will find a comment regarding this
.h files are for user definitions and function prototypes etc...
Move this code from user_setting.h and place it over or under main function.
void delay (uint32_t time)
{
__HAL_TIM_SET_COUNTER(&htim1, 0);
while ((__HAL_TIM_GET_COUNTER(&htim1))
Hi! Thanks for the code :D. Are you planning to extend the library to use the Touch capabilities of some displays? Also, do you have an example for a bitmap code? I tried uploading some bitmaps from a previous project, but they don't seem to be working :/
Nope.. not planning anything on the tft. It's too much work for nothing.
@@ControllersTech and which display technology would you recommend to use in projects then? :o
Use some hmi display. I personally use nextion display. Costs a bit high but worth it
@@ControllersTech which one exactly?
There's a problem. CubeIDE counts the definition of delay() function in user_settings as a redefinition. Idk why.
Plz read other comments
where you able to figure this out?
I know its been two years lol
@@morosz1159 Yes. I don't remember how I figured it out though. Moved to Nextion and DWIN screens anyway coz they're so much easier to use and have powerful onboard processors.
Just define that function in some *.c file (like main.c or tft.c) and use the keyword "extern" here in the usersetting.h file (extern void delay (bla bla)).
I am using Nucleo-F446RE board so it already have the Arduino comparable connector and also I am using IL9341 LCD driver. I edited the code using Cube ide. Done the pin clearing and data writing as per your suggestion.Code compile without any error but it is only showing white screen.Could you please help me on this.
Join the telegram channel. I have pinned a post there. It have the tft code with lvgl for 446re
@@ControllersTech It is working.Thank you very much
@@231ara I have the same problem.. i am using tft ILI9341 with nucleo F767ZI. i have no error but only white screen. do u have any suggestions please ?
Hello, This tutorial working for ILI9341 for Nucleo H743ZI,but only for printing figures. Unfortunatley it not working for printing text, could you help, maby you have link to newest tft.c file with setting for ILI9341 ?
Hi, I had the same problem with H745ZI-Q, and I figured out, that it's problem caused by "pgm_read_xxxx()" macros. I changed for example: "uint8_t *bitmap = (uint8_t *)pgm_read_pointer(&gfxFont->bitmap);" to "uint8_t *bitmap = (uint8_t *)gfxFont->bitmap;". i did it only in functions "write" and "drawChar" in tft.c. Now it works well for me.
Can you please make a video to interface ov7670 camera module with stm32f103c8t6 ?
Buddy, I don't have the module at the moment. When I do, I'll definitely do it.
Cool no problem,I will wait for it
my TFT controller is ILI9341, what changes should i make to your code?
You have to make a lot of changes. Watch the video carefully. Everything is explained
@@MrSkunku Hi! Did you make it work?
Why is very slow?
Thank you.
Muy buen video, puedes realizar un video para el manejo de pantalla ili9341. Gracias
hello do you have tutorial TFT ILI9325 parallel mode for in Keil stm32F103C8
Is it possible to save the display screen on an SD card as an image? If yes then how can we do it
You mean like a screenshot.
Well i don't know for sure but you can weite the data simultaneously on screen and sd card. Otherwise if you have a controller with enough memory to store the entire frame buffer, you can just copy that frame buffer to a file in sd card.
Thanks a lot
Does it works with xpt2046?
Hello sir, I am using ILI9225 with STM32F446RE will the same code work ??
If not what changes has to be made
Look in the #define support part. If it's there then it should work
@@ControllersTech yess it's there but what about all others pins ? for my ILI9225 i have only CS DC RST SDI and CLK
This library is for parallel displays. Yours is SPI based.
Yes you’re right .. i tried all your videos to configure my ILI9225 with LVGL and doesn’t work for me :( i tried a lot and my last advancement is that i make it work but drawing things using lcgl with Draw pixel function.. which mean my display is really really slow and i can’t make it work using draw bitmap :( i also send you an email and messages in discord .. please help if you can
@@ControllersTech ..
How do you make your voice
I had tried this code on stm32f103rb nucleo board with necessary changes.but the code doesnt worked on it.can you please suggest me the required changes and considerations to run this code on my board.
Also,i have a doubt in the case of read pin configuration,whether it need to configure as input or output pin
You can first try to use the f103c8 code directly without changing anything. Use the same pins as i have used in the code. Connect the tft on the breadboard. Once it works out, than you can try to go for the pins according to your board..
@@ControllersTech i have tried it.but it didnt work
can u please give me the clarification regarding the read pin,whether it need to configure as input or output pin..since in some other codes, it had configured as output pin.
What read pin ?
If you are talking about the data pins, than they will be configured as output or input based on the situation. The code will automatically do that. You can set it to whatever you want in the cubemx
Were you able to make it work? I'm stuck on the same board.
Add touchgfx to this board
There are error in tft.c file. I'm trying to learn how to write code for stm32f4 -> LCD can you please send me a link from where should i start.
Use cubeide..
@@ControllersTech I'm using cube id. but there are error in tft.c file
What errors ?
@@ControllersTech "Expected declaration or statement at the end of the input" at multiple functions
Hello sir. I am using ILI9341 (8 bits LCD shield) with STM32F103C8T6 and ILI9341 (16 bits LCD shield) using STM32F407ZGT6 board. In both boards I managed to install your driver using STM32CubeIDE and STM32CubeMX. Now what I want to do is to install the touch screen interface. Where I can find the drivers (XPT 2046) using HAL library for these boards (BluePills and BLACK-F407ZG)? I appreciated very much your work with this interface. Many Thanks.
I ported that code from the mcufriend's. I think you should look into that. I can't help much about this as i have dropped my plan for these LCDs. I will be using nextion HMI display now onwards for any application that requires it.
It is posible to change the tft pin?
I'd try to change PA5 to PB7 pin because i need 3 more ADC pin. After change device pinout and write in user_setting.h, that give me error hard fault interrupt.
May everybody in here ever tried to change tft pin? Please leave comment, thanks lot
The process to change the pins is explained in the video. It's very complex, so watch carefully.
I miss that important step. So the solution if we want to change that pin.
First to do is change microcontroller pin in stm32 pin planner.
Second change clear pin configuration 7:17.
Last is change data pin read configuration 11:42.
WHY IS YOUR BACKGROUND BLACK?
buddy it is them.
now i am using TFT 3.5 inches arduino Shield, So can i use your library for its, thank you.
Depends on the driver of the display..
See the supported drivers in the code
@@ControllersTech thank you
@@ControllersTech I used arduino to scan its ID, it is 0x9486.
@@ControllersTech I also used Same Arduino Uno shield 3.5 tft display driver ic 9486 but it's read wrong I'd 38022 . What can I do plz help me.
how can we add touch to this?
You can.. i didn't tried..
@@ControllersTech do i need to read the port or i need to read control pins, any idea?
Depends on how it's connected. I guess reading pins is more convenient
Make your intro smooth 😌
Will this work for the stm32h747?
Don't you already have a display attached on the board ?
@@ControllersTech I do. I was more interested in how to use my boards. I have the fdis4cam. Can you do a tutorial on dcmi to ltcd ?
Your display is different. This won't work..
Use the LTDC to interface the display.
I can't do dcmi, since my board don't have the connection..
Nothin annoying. The background music ist very low and the voice is very comprensible. I cannot recognize any robot voice.
Very confusing read and write macros !
Yes they are
@@ControllersTech Could you make it easier ? For example is it possible to put lables on Pins on Cube Graphical setup ?
I port this code from mcufriend library. Made some changes to make it as simple as i can. But i couldn't find a workaround for read or write.
Just watch the video carefully at that point, it's not that difficult to get.
You can make it simple by connecting pins according to their respective positions for eg LCD_D0 to PA_0 and LCD_D7 to PA_7
@@ControllersTech Ok thank you for reply. I'm coming from Arduino 8 bit programming. So STM32's BSRR register a bit confusing. Actually maybe it's more easy to use BRR register for reset a bit on port. I guess I need to leave Arduino IDE and focus on STM32 Cube IDE :)
Disliked for the annoying music and the robot voice
sorry couldnt watch.. intro yikes lol
hello hello help me i want to use in Keil this code tft ili9325 parallel 8bit how migration to Keil or how to write in Keil please help me
I use your all code for ili9486 uno shield 3.5 TFT and connection same as yours but it read wrong I'd it read 38022 and not work plz help me
38022 is decimal = 0x9486 in hex
Ok but nothing is on display only white screen
@@ControllersTech plz help me sir nothing is on display only white screen is coming,, I uncomment the define support 9342 and change screen size in user setting, what other thing I can do?
@@skvalavideo Hello, I will test the same display tomorrow. And I think that I have a clue. try to uncomment SUPPORT_B509_7793.
@@elmirakassymova380 i did it and no results...did u solve it?