Connect an SPI TFT with Touchscreen to your Arduino - ILI9341 LCD with XPT2046 Touch screen

You can get buy some really cheap LCD and touchscreen modules from places like eBay. They're actually great devices that let you add a display to your Arduino and microcontroller projects for under £10. But they don't come with any documentation so they can be a bit tricky to get working if you've never used them before.
In this video I'll walk you through the connections and software needed to get them working. My screen is a generic, red, Chinese sourced device using the very common combination of an ILI9341 based LCD module with a touchscreen driven by the XPT2046 touch controller.
You can easily get hold of one of these touchscreens at Amazon or eBay.
Amazon: amzn.to/39ZyWMD
eBay : ebay.us/sOCSyI
Make sure you visit the project pages on my website for circuit diagrams and breadboard layouts, along with more information and details.
bytesnbits.co.uk/spi-lcd-setu...
ILI9341 Library
github.com/adafruit/Adafruit_...
XPT2046 Library
github.com/PaulStoffregen/XPT...
Adafruit GFX Library
github.com/adafruit/Adafruit-...
Adafruit LCD tutorial
learn.adafruit.com/adafruit-2...
Adafruit GFX Library Tutorial
learn.adafruit.com/adafruit-g...

Пікірлер: 352

  • @mellee3436
    @mellee3436 Жыл бұрын

    Thanks very much for this. After literally thousands of experiments/hours (over a year or so) with Arduino Uno and ILI9341 I finally got it working, thanks to this excellent video. The voltage dividers were my problem. I used 4.7K and 10K resistors in my setup. Thanks again.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Great to hear you've got your project working.

  • @mellee3436

    @mellee3436

    Жыл бұрын

    @@BytesNBits I'm using the ILI9341 FAST driver for experiments now..

  • @rondivecchia4561
    @rondivecchia45613 ай бұрын

    Very informative! Thank you for taking the time to put this together. It is much appreciated.

  • @BytesNBits

    @BytesNBits

    3 ай бұрын

    Glad it was helpful!

  • @gammacount1328
    @gammacount13282 жыл бұрын

    Great job! Very clear and comprehensive explanations. Thank you.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Glad it was helpful!

  • @DavidTLutz
    @DavidTLutz Жыл бұрын

    Thanks for a GREAT tutorial! I spent 2 several hour periods trying to figure out why I could never get anything but a white screen. I checked all connections several times. I finally fired up the oscilloscope and found that I only had 1.1V on the clock signal. Checking my voltage divider I discovered that a 10K resistor had snuck into my 2.2K resistors. That one got used for the clock signal. Once replaced everything worked fine. Lesson: once you run out of big options as the problem, try the little ones - maybe try them first. 🙂

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. That's a really awkward 'bug' to have to find. Glad it all worked in the end.

  • @dankclee
    @dankclee Жыл бұрын

    Thank you for publishing this video!!

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Glad it was helpful!

  • @robconnelly202
    @robconnelly2023 жыл бұрын

    Super helpful and very clear. You just saved me boatloads of time.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Glad it helped!

  • @Harry-Powney
    @Harry-Powney3 жыл бұрын

    Thank you for your efforts, this has helped me enormously. I look forward to your future videos

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Glad it was helpful!

  • @accci4551
    @accci4551Ай бұрын

    Thx for publishing this video! now I know wha the LED at the display is

  • @BytesNBits

    @BytesNBits

    Ай бұрын

    Great!

  • @stijndepuysseleir2499
    @stijndepuysseleir2499 Жыл бұрын

    Thanks for pointing out the HIGH values for the CS pin. From white to working...

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Glad it was helpful!

  • @danielfromca
    @danielfromca2 жыл бұрын

    Thanks so much for this really great & well explained tutorial. Definitely helped me understand better how to connect the display to an Arduino & how they work together.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Glad it helped!

  • @mahlodibogashu5211
    @mahlodibogashu52113 жыл бұрын

    Thank I just got the exact lcd and i will be following up thanks for your effort sir.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    You are welcome

  • @johnvine5731
    @johnvine57312 жыл бұрын

    Another thumbs up here. That was a great help. Thanks very much for your kind efforts.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Glad it helped

  • @jefferyosei101
    @jefferyosei101Ай бұрын

    Thank you so much, this is EXACTLY what i needed!

  • @BytesNBits

    @BytesNBits

    Ай бұрын

    Glad it was helpful!

  • @MOHJH59
    @MOHJH592 жыл бұрын

    So detailed needed instruction...thank you so much...

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Glad it was helpful!

  • @drlerkan
    @drlerkan3 жыл бұрын

    You really explained it very well. I found answers to many questions. thanks. I subscribed for your other important information :)

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Thanks for the sub! I hope you find my other videos useful.

  • @trombonista92
    @trombonista922 жыл бұрын

    very high production quality ,

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Thanks.

  • @makermatrix9815
    @makermatrix98153 жыл бұрын

    Fantastic. Glad I found your channel.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Thanks. I hope you find it useful.

  • @BilalAhmad-dd3eu
    @BilalAhmad-dd3eu Жыл бұрын

    Greatly explained. Thank you.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Glad it was helpful!

  • @PavolFilek
    @PavolFilek Жыл бұрын

    Beautiful explanation.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Thanks. Hope it helped.

  • @BartdeBoisblanc
    @BartdeBoisblanc Жыл бұрын

    This and your video on how to modify the Adafruit and Touchscreen sketches are great quite helpful. By the way I think that game is called breakout. Pong usually has two players with paddles.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. You're absolutely right. Just me talking off the top of my head!

  • @tiagosilva2196
    @tiagosilva21963 жыл бұрын

    Great Video!! A real lifesaver!! Thanks so much!!

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    You're welcome!

  • @activ8me3
    @activ8me32 жыл бұрын

    I really like your style. You are not a snob maker - like most. Wow.

  • @activ8me3

    @activ8me3

    2 жыл бұрын

    ... and I liked your reference to adafruit. The tiny Ai corp that my daughter and are startuping is going north too.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi Armin. Thanks. I try to keep it real. Good luck with the new venture.

  • @makermatrix9815
    @makermatrix98153 жыл бұрын

    I learned that you don't need to burn another pin on the Uno to get the TFT Reset function working on these screens. It can piggyback off the Uno's Reset pin, which is otherwise useless unless you plan to get into HVSP tools to recover the chip afterwards. The bit of magic that allows this is to tell the library to use a negative number for TFT_RST. This activates a software TFT Reset function, removing the need for a separate digital pin from the MCU. This only appears to be documented in the library code itself. I've also seen it documented that you can hook TFT Reset to a pullup, but I was not able to make that work. Piggybacking on the Uno RST pin is working great on three different screens I've got here, though.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. Thanks for the tip. I'll try that out. Always good to save a pin for later :)

  • @atihrot755
    @atihrot755 Жыл бұрын

    Thank you for your advice. I wish you a nice rest of the bottom. This screen gave me a hard time. I like watching your works, I'm always learning something. Keep up the good work and good luck. Could you post some codes for the clock or the weather station. Or some games. Thank you.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Glad you're enjoying the channel. Lots of projects to come. Just trying to find time to make them!

  • @coby1kenobii
    @coby1kenobii3 жыл бұрын

    Great video, thanks!

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hope you found it useful!

  • @srideepaindu818
    @srideepaindu8187 ай бұрын

    Worked like a Charm :D... Thanks

  • @BytesNBits

    @BytesNBits

    7 ай бұрын

    Glad it helped

  • @epicdaniel508
    @epicdaniel50810 ай бұрын

    Great video!

  • @BytesNBits

    @BytesNBits

    10 ай бұрын

    Glad you enjoyed it

  • @tothlaszlo8008
    @tothlaszlo80083 ай бұрын

    Thank you the video! Its verry big help to understanding! 👍

  • @BytesNBits

    @BytesNBits

    3 ай бұрын

    You are welcome!

  • @jimdesposito9433
    @jimdesposito9433 Жыл бұрын

    Great tutorial, thank you! BTW, you can use an Arduino Nano, or probably any other Arduino board, as long as you select the right one in the 'boards' drop-down.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Thanks for the info!

  • @56NeilWatson
    @56NeilWatson2 жыл бұрын

    Thanks (name?) for this tutorial. I have need of a touch screen for another project someone has done which I'm copying. I thought I'd have a play first to get familiar with it first and have learnt a few things. I went down the road of using a TXSO108E level shifter board which works really well.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. The level shifters are much better than the resistor dividers.

  • @RealDevastatia
    @RealDevastatia11 ай бұрын

    You have neat handwriting. :D

  • @BytesNBits

    @BytesNBits

    11 ай бұрын

    Thank you! 😊

  • @michaeldutsonlandscapephot2184
    @michaeldutsonlandscapephot21842 жыл бұрын

    Excellent video Bob,. Probably about the clearest and most understandable ones on KZread; very nicely done. Thanks for taking the time to post this. I've now placed an order for a similar 4" screen which I will be using as the settings and data readout interface on a replacement range cooker controller I'm building. A bit of a learning curve, but such is life. I understand that bitmap images can be installed on the SD card and then uploaded on screen - did you try this at all?? I was hoping to use a bitmap image created in Photoshop and then use the touchscreen co-ordinates to see when a particular 'button' is pressed. Not sure how data readout would work with a bitmap image background though.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi Michael. Thanks for the comments. Sounds like a great project! I did make a few videos in the series on the touch panel and SD card. Have a look at these... SD card - kzread.info/dash/bejne/eH1r27p9mZDMe6Q.html Simple SD card images - kzread.info/dash/bejne/k4p3ua6kYZPZcdo.html Writing your own image handler - kzread.info/dash/bejne/l6ye3KmGiJfModY.html Have fun!

  • @michaeldutsonlandscapephot2184

    @michaeldutsonlandscapephot2184

    2 жыл бұрын

    @@BytesNBits Cheers Bob. It's a dark evenings project for me. I'm struggling to get parts for the range cooker in the kitchen, and those I can get are priced at well over 200 quid to overhaul the full control system. It's a no brainer to do it using modern components which offer far more accuracy and options. Your videos certainly help in making the new controller have the Wife Acceptance Factor. 👍🏻

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    @@michaeldutsonlandscapephot2184 Great. I like the 'Wife Acceptance Factor' idea. That sounds like a hard target to reach.

  • @michaeldutsonlandscapephot2184

    @michaeldutsonlandscapephot2184

    2 жыл бұрын

    @@BytesNBits WAF is generally an unachievable goal! 🙄

  • @nielspaulin2647
    @nielspaulin2647 Жыл бұрын

    EXCELLENT

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Thanks

  • @Venaber
    @Venaber11 ай бұрын

    thanks

  • @BytesNBits

    @BytesNBits

    11 ай бұрын

    You're welcome!

  • @viktorhugo8252
    @viktorhugo8252 Жыл бұрын

    @ 8:35, If there is no voltage regulator on the TFT you have to use 3,3Voltage for VCC and LED

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Thanks for spotting that.

  • @williampowell7518
    @williampowell75182 жыл бұрын

    Great tutorial. I am a novice with mcirocontrollers but I am trying to use the SD card slot but unsure of the physical connections to use. for the sd card slot there is a sd_cs,sd_mosi,sd_miso & sd_sck

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. The mosi, miso and sck connections are the SPI bus so you just run the same connections as you're using on the LCD side. The cs (chip select) needs to run back to a separate output pin on the Arduino to allow it to select what device it wants to talk to on the SPI interface.

  • @mellee3436

    @mellee3436

    9 ай бұрын

    Most software wants SD_CS to be pin 5 on esp32.

  • @Benqo
    @Benqo3 жыл бұрын

    Hi, I have found some tutorials with just 10k resistors between the screen and Adruino´s pins instead of the voltage dividers. Which alternative is better?

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. It's sort of a personal choice, both will work. The best solution is actually to use logic level converters. They are also a neater package to connect up!

  • @Gouzation
    @Gouzation2 жыл бұрын

    Hi, Great video i was just wondering if this is the same screen that you used in your retropie GPIO gamepad video?

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Yes, it is

  • @maruanuar
    @maruanuar3 жыл бұрын

    Hey great video ! Was wondering if you could share the software you used to draw the circuits at minute 9:56 ?

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. I used Fritzing (fritzing.org/) for this project.

  • @sudheerillipilli4691
    @sudheerillipilli46912 жыл бұрын

    Sir, hardware spi settings are enough for speeding of screen or any other things need ? Nice explanation.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    There are a number of ways of speeding up the screen but most need a more powerful microcontroller board. I've done some tutorials for the Raspberry Pi which will give you some ideas.

  • @danielsolis321
    @danielsolis3213 жыл бұрын

    thanks a lot¡

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    You're welcome!

  • @traflaw8286
    @traflaw82862 ай бұрын

    hello sir, i managed to make the lcd work using the calibration code u made, but when i tried it again the next day, it won't display anymore. I didn't touch the wirings.

  • @BytesNBits

    @BytesNBits

    2 ай бұрын

    That's a strange one. Not sure what to say if it was all working. Have you checked in case a wire has come loose.

  • @TomasCarrascoFerrarezi
    @TomasCarrascoFerrarezi Жыл бұрын

    Awesome tutorial, just a question, is this library compatible with the ILI9486 chip? i'm looking for a bigger screen and they all seem to run on this chip

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    No. The Adafruit driver only supports a small range of chips - have a look in the source code notes at the top of the listing. You'll need to find a suitable driver. Have a look at this project - www.engineersgarage.com/arduino-ili9486-driver-3-5-inch-tft-lcd-touch-screen/. The drivers are often compatible with the Adafruit GFX library so most of the code will be the same as in the tutorial.

  • @nucleoy6000
    @nucleoy60004 ай бұрын

    Hello! nice video! I was wondering why don't you use the 3.3V output from the arduino board itself to power the screen instead of using the 5V output and doing the voltage conversion bridge? thx!

  • @BytesNBits

    @BytesNBits

    4 ай бұрын

    Even if you use the 3.3V output for power the IO pins run at 5V.

  • @wandersongw
    @wandersongw Жыл бұрын

    are there some way to play videos in this TFTs?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. The TFT can manage about 20-30 fps. Unfortunately the Arduino hasn't enough power or resources for video. So, yes the screen can just about do it, but you'll need a Raspberry Pi or something like that. I did use this exact screen for a Pi powered game console and could get around 50fps.

  • @atihrot755
    @atihrot755 Жыл бұрын

    Dear Sir. I finally found a way to get it up and running. It's already drawing correctly, but there are still some little things that I can't confirm. I installed the SPFD 5408-master library, where I opened and installed the SPFD 5408 TouchScreen subfolder in that library. X and Y minimum and maximum should be set there. Those numbers should have been entered in the code SPFD 5408 tftpaint. It also had to be reinstalled and now it works properly. But now it only works with a finger. With a small writing pen, the LCD does not respond at all. If you have any suggestions, thank you.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. You've probably got a capacitive touchscreen, like your phone will have. These do not respond to the plastic stylus pens. You'll need a capacitive touchscreen pen.

  • @fjalarsigurdarson4862
    @fjalarsigurdarson4862 Жыл бұрын

    The Arduino does have a 3.3V output, clearly marked. The thing is, most of these smaller screens say they need 3.3V but they do not really kick in unless they get 5V.

  • @aspirin4709

    @aspirin4709

    Жыл бұрын

    Sir,is it ok to connect it's to an arduino nano wit series resistance of 10k.

  • @fjalarsigurdarson4862

    @fjalarsigurdarson4862

    Жыл бұрын

    @@aspirin4709 I am simply not that smart in electronics to advice anyone :-) I just know this fact about the 3,3V and the screens from experience and from reliable sources. I highly recommend this guy: kzread.info/dash/bejne/aaxlspppiJS8Y6g.html

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. The 3.3V output on the Arduino is for supplying power. The atual IO pins operate at 5V logic which has to be shifted down for the LCD inputs. Using a 10K resistor is fine but you'll need to double the paired resistors in the voltage dividers.

  • @freddycrespo4107
    @freddycrespo41077 ай бұрын

    Hi Sr. I got a TFT ili9341 LCD and it is not SPI, but parallet communication for 8 o 10 wires. Please, is there a way to use or convert in a SPI one?. Thanks for give us informations.

  • @BytesNBits

    @BytesNBits

    7 ай бұрын

    Hi, You'll need to use a display driver that supports your parallel device. I don't think you can convert it to the standard SPI interface if it's been wired up as the parallel version, but please check out some datasheets to make sure. There may be some sort of mode command you can send it.

  • @sfs-lyder8560
    @sfs-lyder85606 ай бұрын

    Hi, how do i wire the display pin and Arduino pin into Bi-Directional logic level converter?

  • @BytesNBits

    @BytesNBits

    6 ай бұрын

    Most of the logic level converters are fairly straight forward to use. They have two sides, one for each logic voltage. Just wire the signal from one device to it's correct voltage side, and the corresponding signal to the corresponding output on the other voltage side. Just make sure that you check which voltage levels are which in the IC data sheet.

  • @michaelhartrey8937
    @michaelhartrey89373 жыл бұрын

    Have you tried to use the touch interrupt pin on one of these displays? I’ve been using one for an ESP32 internet radio but I had to resort to polling for touch inputs. When trying to use the T_IRQ pin it kept firing all the time without the screen being touched. I’m wondering if it was my particular screen or whether I’m missing something.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi Michael. The T_IRQ pin is best thought of as a prompt to start polling the touch panel. Once you enable the interrupt function in your code the screen will wait until a touch event before pulling the T_IRQ pin low. Once it's pulled low you need to disable the interrupt and then handle the touch input. The T_IRQ input will give multiple triggers as you talk to and handle the touch event, so disabling it will mask of these multiple interrupt triggers. Once you've finished handling the touch event and the screen isn't being touched you can re enable the interrupt to wait for the next event. Have a look at github.com/PaulStoffregen/XPT2046_Touchscreen, at the bottom of the readme file. He covers this in more detail. I hope this helps.

  • @michaelhartrey8937

    @michaelhartrey8937

    3 жыл бұрын

    @@BytesNBits Thanks, I’ll take another look at it.

  • @mbanc443
    @mbanc4434 ай бұрын

    Hello, and thank you very much for a valuable info on those type of ILI9341 with UNO but I'm using Mega2560 and it still doesn't work w/ it. Any idea why? Thx in advance! Great job here!

  • @BytesNBits

    @BytesNBits

    4 ай бұрын

    Make sure you check what pins you're using for the connections. You'll need to use one of the SPI channels and then a few general IO pins on the Mega2560 and then adjust the code to match with what you've used. The driver code should be compatible. I hope you get it going.

  • @melaxoho4037
    @melaxoho40372 жыл бұрын

    Hi, nice explain video but i think there is a misstake in minute 8:15. You say the Pin "LED" should be connected to 5V - that's wrong. And never put 5V on a Input of a 3,3V Display - it can be destroyed! This pin is a control Pin for the LED Backlight - not the power for it. (you can see the Transistor at the PCB that is the switch for the Cathode to GND) It should be connected to a GPIO Pin for the PWM input for the backlight control. It is by default pulled high (backlight on) you can PWM at any frequency or pull down to turn the backlight off. Brightness adaption a.s.o. You can see that in the schematic of the displays. And the Signal MISO is not needed at these Displays - i always let it unconnected. So we have 8 Pins to use these Displays: GND, 5V (itern transformed to 3,3V by the Regulator XC6206P33), MOSI/SDI, DC/RS, CS/SS, Reset, SCK and LED Control. That's it. Greetings from Germany

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. Thanks for the tips. You're absolutely correct.

  • @josealfredomartinezmartine7481
    @josealfredomartinezmartine74812 жыл бұрын

    Hello. I need some help, I have to connect a Texas Instruments RM57L8 to a TFT touch screen. Do you know where can I find info about this? Thank you.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. You'll need to get hold of the microcontroller datasheet. If it has an SPI interface you're good to go. Use the driver package in the video to find out the initialisation codes for the LCD and touchscreen. If it doesn's have an SPI interface you'll need to code one in software. There are a few examples on the internet for guidance. Best of luck!

  • @ezion67
    @ezion67 Жыл бұрын

    Thanks for the nice tutorial. I try to understand the ins and outs, level shifting from 5v to 3v3 using voltage dividers is straight forward. However the MISO lines need shifting UP from 3v3 to 5v. How does that work with this resistor set up? What am I missing? The only thing I can think of is that the MISO pin (input) on the Arduino is 3v3 compatible and should be connected WITHOUT the voltage divider? Edit: I checked the data sheet. The inputs on the ATMega328p are not 3v3 compatible. Assuming the the circuit is NOT operating in the gray "it might work" era. Is maybe the internal pull up used together with the voltage divider to create a offset on the the MISO input pin? Please clarify, thanks in advance.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. You're absolutely right on the voltage levels. The 3.3V signal works more from the flexibility of the Arduino than by true digital signal levels. This circuit used voltage dividers to show the principle with simple components. In reality you're much better off using level shift ICs.

  • @ezion67

    @ezion67

    Жыл бұрын

    @@BytesNBits Thanks for your answer. I did the calculation, even using the internal pull up to create a voltage offset it would still operate on what you call "the flexibility of the Arduino". So for me active level shifters it is.

  • @pixnone9477
    @pixnone9477 Жыл бұрын

    For d1 mini what pin are the right ones?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    You'd need to have a look at the datasheet for your device. The hardware SPI pins should be marked. The chip select, etc can then be any general IO pins.

  • @Fachher
    @Fachher Жыл бұрын

    Thank you for this video. It helped me to correctly connect my display to my Arduino. Before this video I've connected everything directly without any resistor. My display showed one single frame and then turns white. Now the graphicstest example renders letters, rectangle, lines etc but not on the whole screen. It is more like 240x240 instead of 240x320. What could be the reason for it. I double checked the wiring.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. You need to play around with the screen dimensions and rotation to get it to match your screen. If you've set the screen dimensions it sounds like you might have it rotated incorrectly.

  • @Evilslayer73
    @Evilslayer733 жыл бұрын

    arduino Mega have a 3.3 volt ouput so can i use that instead of assembling resistance?

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. Yes. That will connect directly to the TFT panel.

  • @dienau6313
    @dienau63133 ай бұрын

    Sir may I have a question? is there any touchscreen library used for esp32? Since the XPT2046_Touchscreen library just used for arduino uno.

  • @BytesNBits

    @BytesNBits

    3 ай бұрын

    The Arduino library should work for the ESP32 as long as you program it in the Arduino IDE

  • @dienau6313

    @dienau6313

    3 ай бұрын

    @@BytesNBits thank you

  • @reiniermariscotes4455
    @reiniermariscotes44559 ай бұрын

    Is it okay to use a 10k resistors if I dont want to make a voltage divider?

  • @BytesNBits

    @BytesNBits

    9 ай бұрын

    The ideal solution is to use a level shifter IC. But whatever works for you is a good choice.

  • @rhythmlalim4018
    @rhythmlalim4018Ай бұрын

    Hi Bytes, what if we not put a resistors on it? Can it still work and safe to use even if no resistor? tia

  • @BytesNBits

    @BytesNBits

    Ай бұрын

    I'd advise against connecting the pins directly as you're feeding 5V into a 3.3V input. The best solution is a bi directional level shifter IC.

  • @RandomTorok
    @RandomTorok Жыл бұрын

    I read something that if you short J1 then you can simply use 3.3 volts to power the device. Have you heard that or tried it?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    I haven't come across that. It could well be true. I'd check the data sheet for your panel first though!

  • @djix030
    @djix0308 ай бұрын

    Hi, I have this screen connected to an ESP32-S3 with the 3.3V it works perfectly! , why do you use the 5V with this army of resistor ??

  • @BytesNBits

    @BytesNBits

    8 ай бұрын

    With the ESP32 you can remove the resistors. The video is based on the Arduino which runs at 5V.

  • @lalithkumarreddy8311
    @lalithkumarreddy83113 жыл бұрын

    Sir which esp32 board should i go for if i want to display images?I mean number of pins and all! A link of the esp32 specs you are using is highly appreciated!

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. Pretty much any of the ESP32 boards will work (much better that the Uno I was using!). As long as it's got an SPI interface and a couple of spare I/O pins it will be fine.

  • @taranagnew436
    @taranagnew4363 жыл бұрын

    can you make a custom cable that uses a (connector on the back of a rgb matrix)?

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. Yes. Generally you'd use a 40 way ribbon cable with header to connect to the GPIO on the RPi, then rework the wires at the LCD end. The LCD signals should all be in one block on the ribbon cable so you can just break those out quite easily. You're then left with the other GPIO pins on the rest of the ribbon cable so you'll have to work out how to connect those to the rest of your circuit. For this project I'll eventually mount the Raspberry Pi on a circuit board and break out the LCD pins to a connector on that which will then connect to the LCD panel.

  • @neilfpv
    @neilfpv7 ай бұрын

    Great video! I bought a 1.8 TFT screen. In the description, it says "ST7735 ILI9225 ILI9341". Now I am confused which mine is. How can I find out which mine exactly is?

  • @BytesNBits

    @BytesNBits

    7 ай бұрын

    Can you find the datasheet for the actual device you have?

  • @neilfpv

    @neilfpv

    7 ай бұрын

    @@BytesNBits hi. Someone told me in esp32 discord today that mine is an ST7735. Thanks a lot!

  • @Ikmijnnaam
    @Ikmijnnaam2 ай бұрын

    Hahaha look at that.......... that is one HELL of a familiar pencil jeeeeeez who would have thought I got that one in green lol ....... how funny hmzzz thanks for the video it is hard to get my hear around being a student of electronics and your video really helps out a lot !!! Work is so much easier with guys like you who explain things, oiiiii electronics haha.......and then to think I am busy to make a voltage read out so I can see what voltage my batteries got and will have ones charging haha being busy for 3 weeks now I need to learn so much oemfffff.....great video !!!

  • @BytesNBits

    @BytesNBits

    2 ай бұрын

    Thanks. Good luck with the course.

  • @denakkusativ1072
    @denakkusativ1072 Жыл бұрын

    Thank you so much for the video. I got one question though: Is it possible to loosen the pcb on the back? I obviously do not want to remove it, but for my project I need a bit more space behind the display itself. I know there is a cable coming from the LCD display that’s connected to the shield (I think that’s how it’s called), so it has to be possible, right?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. These displays tend to have a ribbon cable coming out of them which is connected to the circuit board. The actual lcd panel is then stuck to the pcb. As long as you don't damage the ribbon cable you should be fine. You can also buy the displays with just the ribbon cable so you can solder to your own circuits. Have a look on eBay. I hope this helps.

  • @denakkusativ1072

    @denakkusativ1072

    Жыл бұрын

    @@BytesNBits Thanks for the incredibly fast response. You said that the lcd panel is ‚stuck‘ to the pcb. Is it possible to tell how they typically assemble them? Is it some type of double sided tape or glue? Do you have experience with separating the two components without damaging either of them?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    @@denakkusativ1072 I has a look at my panel. It looks like there are two trips of double sided tape along two edges of the panel. Only guessing though. There don't seem to be any screws or solder points holding it on.

  • @denakkusativ1072

    @denakkusativ1072

    Жыл бұрын

    @@BytesNBits That sounds very promising to me. Thank you so much

  • @salustianomoreno1394
    @salustianomoreno13943 жыл бұрын

    Hello, thank you very much for your work, it has helped me to configure the TFT, I have not found anything better anywhere else, excellent work. I have to connect two TFTs to control them from my arduino MEGA, my presumption is if I have to add another group of redistances or is it possible to share the common terminals, with the resistors that I use for the first display? Thank you very much from Spain

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. The data signals like MISO, MOSI and CLK can be simply connected to your second display. You'll just need to assign a new chip select pin. I haven't tried it, but I expect in the software you'll be able to create a second TFT object and initialise it with the same data pins but new CS pin. You'll then have one TFT object talking to one display and the other talking to the other display. Let me know how you get on.

  • @musaenoch2277

    @musaenoch2277

    2 жыл бұрын

    I dont mean to be off topic but does any of you know a tool to get back into an instagram account?? I was stupid forgot my login password. I appreciate any help you can offer me

  • @everettjoseph6400

    @everettjoseph6400

    2 жыл бұрын

    @Musa Enoch instablaster =)

  • @musaenoch2277

    @musaenoch2277

    2 жыл бұрын

    @Everett Joseph i really appreciate your reply. I found the site thru google and Im waiting for the hacking stuff now. I see it takes quite some time so I will reply here later when my account password hopefully is recovered.

  • @musaenoch2277

    @musaenoch2277

    2 жыл бұрын

    @Everett Joseph It did the trick and I actually got access to my account again. I am so happy! Thanks so much, you really help me out!

  • @NayanPrakash06
    @NayanPrakash063 жыл бұрын

    Hello.. Thank you for the video.. Have made the connections and works well .. Is it possible to interface the SD card (the one present on the module) as well .. If yes, can u please share the procedure.. Will be of great help.. I tired interfacing by selecting a different CS and making it HIGH but didn't work ..

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. You're on the right track. You need to connect the data and clock lines to the SD card connections and, as you rightly did, connect a new output from the Arduino to the chip select on the SD card interface. Again make sure you set it inactive before starting to initialise the SPI devices. From there you need to learn how to use the SD card package. Have a look at www.arduino.cc/en/reference/SD. There are a few examples for you to look through and see how the package is used. I hope this helps.

  • @NayanPrakash06

    @NayanPrakash06

    3 жыл бұрын

    @@BytesNBits Thank you for the reply. I tired the mentioned method but the combination of three doesn't work. Tested the wiring and code multiple times. When connected and used separately i.e. SD card only or Display and touch only, works well. If is it possible for u, can you please try out using all the three together?? Will be of great help. Thanks in advance!

  • @kalamabidin922
    @kalamabidin922 Жыл бұрын

    Hi, Am working for 2.4inch SPI TfT LCD with Arduino ide on Arduino Uno r3, But after uploading the code it is showing only white screen. Have reconnected multiple times, check with different codes. But same issue. Mine lcd is non touch, and am not using Arduino shield tft lcd. How to solve this issue . any idea. Am just doing simple text print .

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Try adding some serial print statements to see if the main code loop is running or getting blocked by the LCD driver. Are there any other SPI devices on the channel? Try using a different SPI output from the Arduino, or try the software SPI driver. Make sure your chip select signal is all set up correctly and the reset pin on the display is connected correctly. If it's not being driven by the Arduino make sure it tied to the non active state - you'll need to check your display datasheet. Also make sure the driver chip in your display matches with the driver you're using. I hope this helps.

  • @rizkylevy8154
    @rizkylevy81542 жыл бұрын

    does this ILI9341 require a resistor?

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    The spec calls for 3.3V on the inputs so I've played safe and added the voltage dividers. You can probably get away without but I'd hate to advise it in case someone destroys their panel. Level shifter ICs give a neater solution if you want to keep things on the safe side.

  • @philluvschips3787
    @philluvschips37879 ай бұрын

    I bought a shield, there is no MOSI,MISO,CS or DC, it's XM,YP,YM and XP, no Adafruit examples work, only MCUFRIEND library, i can't figure this one out!?

  • @BytesNBits

    @BytesNBits

    9 ай бұрын

    Is there a data sheet for the screen? the XM etc sound like touchscreen pins. The SPI MOSI etc may not be marked and just connected to the relevant pins on the arduino connector. If you can find the datasheet it should tell you which connections are on which pins so you can map it correctly to the Arduino library. I expect it's simply a pin mapping issue.

  • @legosinmotion1231
    @legosinmotion12316 ай бұрын

    Hello I have a question. I have an Arduino uno and it has a 3.3V pin do I still need the resistors or can I just use the 3.3V pin?

  • @BytesNBits

    @BytesNBits

    6 ай бұрын

    The 3.3V pin is a useful power supply for some sensors. The Arduino io pins run at 5V logic so you'll still need to change logic level. Better than the resistors is to use a bi directional logic level converter IC.

  • @legosinmotion1231

    @legosinmotion1231

    6 ай бұрын

    @@BytesNBits Ok thank you for your response

  • @GetRealwithMike
    @GetRealwithMike9 ай бұрын

    Great tutorial. I want to make video screens for my model spacecraft. It would show a video clip of the different systems on board. I can create the video but I wanted to learn how to build the screen using a Nano and a smaller screen that the one here. Can you make a tutorial for that? Thanks

  • @BytesNBits

    @BytesNBits

    9 ай бұрын

    To get video to work you'll need a more powerful system. I'd go for a Raspberry Pi Zero. Arduinos and even Pi Pico or ESP32 will struggle to get any video playback.

  • @alnoorratansi9364
    @alnoorratansi93642 жыл бұрын

    Hi Great Video, What does the voltage jumper do at the back of the screen ??

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    I have no idea! I can't see it mentioned in any of the documentation. There are some schematics you can download for the screen but I haven't got the software to open them.

  • @alnoorratansi9364

    @alnoorratansi9364

    2 жыл бұрын

    @@BytesNBits I found out , If it is lest open then it is set for 5v , if shorted it is set 3.3v

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    @@alnoorratansi9364 That's great thanks. I'll make a note of that one!

  • @ayesha7oo2
    @ayesha7oo2 Жыл бұрын

    Thanks for your video. Could you please give me the fritzing diagram of ILI9341 TFT display? I have 2.4 inch ILI9325 TFT LCD display and can't find the fritzing part anywhere. Your display is very similar to mine.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. I had to create one from scratch. Find something similar and modify that part. It's a good skill to learn as it means you'll never be without a part model.

  • @rushikeshkumawat1361
    @rushikeshkumawat1361 Жыл бұрын

    Can I use 1 kiloohm resistor as pull up ?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    1K is maybe a bit low but should still work fine.

  • @rizkylevy8154
    @rizkylevy81542 жыл бұрын

    Should with resistor?

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi, I think I caught your later question first...

  • @user-yv8pc8mt7e
    @user-yv8pc8mt7e3 жыл бұрын

    Could you please share the game program code? I want to run the 'arkanoid' game once.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi, I'm working on the full video for the game so that should be live in the next day or two. I'll give out the full listing with that so you can have a go!

  • @sudheerillipilli4691
    @sudheerillipilli46912 жыл бұрын

    what changes i need for working this hardware spi on raspberry pi pico using adafruit library why hardware spi doesnot work on raspberry pi pico using arduino ide

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. You'd need to check the Arduino documentation for the Pico. Check you're using the correct pins, etc.

  • @Vagubando
    @Vagubando Жыл бұрын

    At the end of your video is a pong game. Where is this library (sketch) located?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    I made a video for the game - kzread.info/dash/bejne/gZxt2Mmondzbf6w.html. Have fun!

  • @chaithra95
    @chaithra953 жыл бұрын

    Please suggest me the lcd display for arduino due

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    These ILI9341 driven displays will work with any microcontroller board that supports SPI. The one I used is a stand alone board but you can get them as shields for most types of Arduino. Have a search on Amazon or eBay and you should find loads.

  • @ninjaop5617
    @ninjaop5617 Жыл бұрын

    NICE lecture but i have done that you told in vedio but my display only showing white screen only can you help?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    The white screen is usually some connection issue. Please make sure you check your wiring and the pin definitions in the sketch.

  • @ninjaop5617

    @ninjaop5617

    Жыл бұрын

    I tried it many times but there is no connection issue sir

  • @ninjaop5617

    @ninjaop5617

    Жыл бұрын

    I have tried it with esp8266 also and with many libraries but it always shows white screen some suggestions?

  • @larrybud
    @larrybud7 ай бұрын

    10:00, I'm not following something: Why don't you have to define your clk, miso, and mosi pins in your code (line 29 vs line 27)?

  • @BytesNBits

    @BytesNBits

    7 ай бұрын

    The library tft driver defaults to using the hardware SPI pins. We simply tell it what extra pins we're using for the CS, DC and RST. If you're using other pins for the SPI signals you can add those pin definitions as per the commented out line.

  • @MrBobWareham
    @MrBobWareham8 ай бұрын

    Loved the video it was very interesting, but why did you use Arduino and not use esp32 as it has so much more power to drive the screen?

  • @BytesNBits

    @BytesNBits

    8 ай бұрын

    Thanks. The video is really more to show people how to connect up and use an SPI screen. The Arduino is the more common beginner board. Yes, in a real project you'd probably opt for the ESP32 or RP2040.

  • @MrBobWareham

    @MrBobWareham

    8 ай бұрын

    Thanks for the reply, love the channel and your presentation.Bob@@BytesNBits

  • @saydiy1528
    @saydiy1528 Жыл бұрын

    good job. my touch screen just output: Pressure = 4095, x = 8191, y = 8191 , seems not working, what can be? I used 3.3V-5V 4 Channels Logic Level Converter instead on resistances.

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    The logic level converters are a better option than the resistors so that will be fine. Have you tried running the touchscreen with the LCD disconnected to make sure there is no interference from the other SPI device?

  • @saydiy1528

    @saydiy1528

    Жыл бұрын

    @@BytesNBits Thanks.

  • @patrickk2791
    @patrickk27913 жыл бұрын

    Hi, first of all thank you for the well made video, it's been very interesting and a great help! Secondly, I was wondering if the values of the resistors are crucial or if it is just the ratio that matters. I haven't got 2.2k and 5.1k, but I do have 4.7k and a 10k, which should be ~3.4 Volts (I measured it to be ~3.38). But I am uncertain if this will have any other effects? You see, my screen is only functional when I do not have the Touch SPI connected. My touch is functional even with the TFT SPI pins connected, but then the screen only shows white, and sometimes flickers when I sent data to it. I suspect it's the difference in values of the voltage divider resistors, but I am unsure of the effect of having (roughly) the same ratio, but higher resistance values. Your advice is much appreciated.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi Patrick. The resistors should be ok. The current drawn by the inputs is around 1uA. The screen not working when the touch is connected can often be the chip select functions getting mixed up on initialising the classes. Are you making sure to set both chip selects inactive (high) before you initialise the library classes? // avoid chip select contention pinMode(TS_CS, OUTPUT); digitalWrite(TS_CS, HIGH); pinMode(TFT_CS, OUTPUT); digitalWrite(TFT_CS, HIGH); tft.begin(); ts.begin(); I hope this helps.

  • @patrickk2791

    @patrickk2791

    3 жыл бұрын

    @@BytesNBits Hi, thank you for the fast response. I am indeed setting the chip select pins to high before calling the tft and ts begin functions. So something else is going wrong.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. If it's just the resistors that are different you could rule them out by adding a level shifter, e.g. amzn.to/3eyDRqp. They are useful to have around anyway. I'd also check that your connections are all secure. I found that if using the touch caused the board to shift it could blank the screen. You could also try connecting the SPI to the touch but wiring the CS pin high (3.3V inactive). Comment out the touch screen code and see if it works. This should try to separate out a software error or a hardware / circuit error.

  • @patrickk2791

    @patrickk2791

    3 жыл бұрын

    Hi! That happens to be the exact level shifter ordered earlier this week, along with a whole bunch of resistors including the 2.2k and the 5.1k Ohms, they should arrive shortly and I will report back my findings. Until then I have found the following; With the touch SPI disconnected and the T_CS wired directly to the 3.3V pin on the Uno, the TFT screen functions like normal (with the slightly modified graphicstest script). Slowly adding more touch SPI pins makes it more and more unstable: - With T_CS to 3.3v, T_DO and screen MISO shared connection, it seems to be ok. - Further adding T_DIN shared connection to screen MOSI sometimes creates missing or discoloured pixels/short lines on the screen, sometimes functions like normal, and sometimes messes up the fill screen color wipes then functions like normal to end up with a white screen after a few seconds. - When I add the T_SCK to the screen SCK, it just seizes to work entirely it is fully white, with sometimes a flicker of black. This is all without any touchscreen code in the sketch, purely the graphicstest example with the lines added as shown in your video. With this I feel like it has to be in the hardware somewhere, but am at a loss of what it could be.

  • @patrickk2791

    @patrickk2791

    3 жыл бұрын

    EDITED, see below! Update from my side as promised: I switched the voltage divider setup from the 4k7 and 10k to 2k2 and 5k1. I also unplugged all my (rigid) breadboard wiring and replaced it with (flexible) jumper wires which allowed me more colours and a tidier layout. The screen now works with both touch and tft SPI connected (Minus the T_IRQ). It can even register the touch and act upon it by updating the screen. One issue still remains, like you said; sometimes while using the touch functionality on the screen, the tft just goes completely white. I wonder if soldering it to a perfboard would solve this. I have yet to try the level shifter, I shall edit this comment as soon as I've got something conclusive to share. EDIT 1: I still have yet to test the level shifter, but I have discovered something interesting while playing around with drawing on the screen while simultaneously using the touch functionality. The blanking/becoming completely white of the screen is caused by touching and releasing a lot, while data is being sent to the screen. The larger the amount of data (such as fillScreen's or large amounts of text) the bigger the chance it will get stuck on the white screen. Sending no data at all allows me to quickly tap the touch screen without ever causing the white screen to appear. Have you got any advise on how to resolve this? EDIT 2: I hooked up and tested the level shifter, it is working fantastically now! I used the TXS0108E level shifter for those interested, same one as linked by Bytes N Bits. The connections are as follows: I have the OE pin connected to ground with a 10k pull-down, and connected to the 3.3v pin of the Arduino. VA is also connected to this 3.3v pin. VB is connected to 5V. GND to GND. A1-A7 to the TFT LCD Touchscreen B1-B7 to the Arduino pins. I can do full fillScreen's while tapping like a madman, and still experience no white screen whatsoever. I am so relieved. Thank you for helping me! Purely out of interest and for educational value, do you know why using this level shifter made such a big difference compared to the voltage divider setup? Thanks again, Patrick

  • @absolutwin7144
    @absolutwin71442 жыл бұрын

    can ir work with arduino uno r3?

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. This should work with any Arduino. Just make sure you check which pins can be used for the SPI connection.

  • @MADARAUCHIHA-lk3wg
    @MADARAUCHIHA-lk3wg2 ай бұрын

    I did everything you say in this video...but my display isn't working...please help me...😢

  • @BytesNBits

    @BytesNBits

    2 ай бұрын

    Usually it's a wiring fault or your code doesn;t match up with the pins you're using.

  • @rushikeshkumawat1361
    @rushikeshkumawat1361 Жыл бұрын

    I always get white screen always and I use 1 kiloohm resistor. Is it ok to use such resistor? Or is it mandatory to use 10 K resistor? Will I get output If I use 10k resistor?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    The ratio of the resistors is the important factor to get the voltage division. Or use a bi directional level shifting IC which is a much more reliable solution.

  • @hal47
    @hal47 Жыл бұрын

    Hi sir How to use this screen to play movie

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. These SPI based screens are not really the right interface for video work. The serial channel is not fast enough. Similarly the Arduino doesn't have enough computing power to decode video. You might be able to get low quality video (very low fps) using this lcd panel with a Raspberry Pi. I did use some software to get around 50fps for retro gaming so maybe 10-15 fps might be possible for video. Have a look at hdmi connected screens. There are some small ones around.

  • @adamdaniels8554
    @adamdaniels8554 Жыл бұрын

    I have an SPI 1.7 in. LCD screen I want to wire into my Windows 10 desktop as a performance monitor. Could i do so using something similar to this, an arduino nano, or other feasible means? LCD Driver IC: ST7735S

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    There would be a few stages to this project. I think it would be hard to wire the panel directly to your PC so you'd need to use a microcontroller or something like a Raspberry Pi. This would then drive the LCD panel. You'd then need to get the PC performance data to that device so it could display it. The other option is to use a small HDMI lad panel that would plug in to your PC as a second monitor. Then just display the performance stuff on there.

  • @KashifKhan-kw3ez
    @KashifKhan-kw3ez2 жыл бұрын

    Can i use 2.4" lcd?

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. Yes. The Adafruit library works with a range of driver chips and screen sizes.

  • @ForfeitWand1151
    @ForfeitWand1151 Жыл бұрын

    good tutorial, but my screen turns with when I run the code

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. What way does it turn?? Rotates or goes black etc.

  • @SUHANISHARMA-mk4sv
    @SUHANISHARMA-mk4sv Жыл бұрын

    Hello, @bytesnbits, thank you so much for this tutorial, I wish I had found it earlier. I'm a beginner at mechatronics, so my biggest source of learning is youtube. Previously I referred to some other video on youtube and there they had connected VCC to 3.3v and all the other SPI pins directly to Arduino Uno, after that I spent several hours trying to fix what when wrong and I realized the mistake I made initially but now when I'm trying to run it with the right connections and logic level, it is just showing a white screen and flickers. Is it possible that I've already damaged my component?

  • @BytesNBits

    @BytesNBits

    Жыл бұрын

    Hi. That's a possibility. The screens are quite tolerant to 5V but if you've been playing about with them at that level for a while it may well have damaged one or more inputs. If you can get hold of a spare and get your display up and running, then try the non working one to see if it is OK.

  • @SUHANISHARMA-mk4sv

    @SUHANISHARMA-mk4sv

    Жыл бұрын

    @@BytesNBits I'll try that, thank you

  • @notchurn

    @notchurn

    Жыл бұрын

    @@SUHANISHARMA-mk4sv i had same issue. Do you have any advices?

  • @SUHANISHARMA-mk4sv

    @SUHANISHARMA-mk4sv

    Жыл бұрын

    @@notchurn Luckily my tft lcd was fine, for me the issue was in the code, I ran the graphics test in parts instead of running the whole code at once and it worked.

  • @stevechapman7564

    @stevechapman7564

    9 ай бұрын

    I have just purchased 2 of these screens and had the same issues. I found that I had to bridge out the jumper on the back of the board called J1 it is between the 2 3pin SOT devices. hope it helps.

  • @KILLZONERUSSIA
    @KILLZONERUSSIA3 жыл бұрын

    Why my lcd is drawing everything extrimeley low? (uno)

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. Did you mean slow? Is it slower than in the video? The video is the default speed setting which I think is pretty much as fast as the Uno can drive it. Yes, it is slow and you have to work around that with your code. The actual screen can be driven much faster but you'll need a faster processor for that (Raspberry Pi Pico, ESP32, etc). Have a look at some of my other LCD screen videos for more information.

  • @nexuzinnovation-com
    @nexuzinnovation-com3 жыл бұрын

    Hi, whenever I connect the T_DO to MISO, the display went white screen, I followed exactly the diagram you mentioned. Please advise.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi, Can you get the screen working without the touch panel connected? Can you get the touch panel working without the screen connected? Try printing values to the serial port so you can see what it's doing. If both are working separately check your wiring. Make sure your LCD reset line is connected and specified in the LCD setup code and that the chip select pins are all correctly initialised. Also check you're pulling both chip select pins high before initialising both the LCD and touch panel objects - this can cause errors if pins are left floating. Let me know how you get on. Good Luck!

  • @nexuzinnovation-com

    @nexuzinnovation-com

    3 жыл бұрын

    ​1. Can you get the screen working without the touch panel connected? - Yes 2. Can you get the touch panel working without the screen connected? - Yes Both 1 and 2 above were running separate sketch. 3. Make sure your LCD reset line is connected and specified in the LCD setup code and that the chip select pins are all correctly initialised. - Yes 4. Also check you're pulling both chip select pins high before initialising both the LCD and touch panel objects - this can cause errors if pins are left floating. - Yes This morning, I try to move the T_CLK, T_DIN and T_DO to the voltage divider adjacently and respectively, the display works normal. However, I try to merge both Touch and ILI9341 functions together but can't detect any touch signal, any idea ? Do I need to enable low to TCS_PIN and TFT_CS ? Please advise.

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi, This is a tricky one! When you say you moved the T_CLK etc to the voltage divider; are you using separate voltage dividers for the touch and LCD signals. If so you only need a single divider per signal and then connect the mid point to both touch and LCD connections. The SPI signals should be common to each circuit. What resistor values are you using on the voltage dividers? Playing with those might help. If your voltage level is dropping too low it will cause random errors. Try removing the voltage divider from the MISO signal. This is driven by the LCD and touch screen so will be at the safe 3.3V. It's really just signals from the Arduino to the devices that need the voltage drop. I hope this helps.

  • @nexuzinnovation-com

    @nexuzinnovation-com

    3 жыл бұрын

    @@BytesNBits , 1. If so you only need a single divider per signal and then connect the mid point to both touch and LCD connections. - Yes, I am putting both CLK and T_CLK to the same mid point of the voltage divider. 2. What resistor values are you using on the voltage dividers? - as per your mentioned, 2.2kΩ and 5.1kΩ where I measured all the voltage divider output, they are about 3.1 - 3.29V each. 3. Try removing the voltage divider from the MISO signal. - but based on your diagram, it is using voltage divider that connected T_DO with SDO ? - do you means the T_DO line can be free from voltage divider and direct connecting to Arduino pin 12 instead ? I have made a mistake where I put the initial object as: XPT2046_Touchscreen ts( TCH_CS, TIRQ_PIN ); , later I removed the TIRQ_PIN parameter, the sketch can detects the touch input. However, by merging the ILI9341 and XPT2046 routines within the loop(), I have to use digitalWrite( LOW ) to select the targeted device to function and is very slow, I am still trial-and-error how to calibrate, may be sir, you can share how you scheduled the touch and ili9341 tasking in your Arkanoid game :o) ?

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi, The T_DO, SDO and pin 12 can just be connected together. The voltage divider is really just there to make sure any 5V output from the Arduino doesn't damage the other devices. If you've got it working with the divider in place I'd leave it in. If you have a look at this tutorial you'll get the same code used in the Arduino program (I'll be doing that video soon). bytesnbits.co.uk/arduino-touchscreen-calibration-coding/ Have Fun!

  • @MPElectronique
    @MPElectronique3 жыл бұрын

    Logic level converter ?

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. Yes, definitely a better solution, but just making do with a simple potential divider in this one as the resistors are something I have lying around.

  • @hotstuff6131
    @hotstuff61312 жыл бұрын

    The touch input is very finicky for me. I used the onoffbutton example, but sometimes it takes a few tries for the input to go through, and sometimes it takes only one try. And once in a while the ts.begin in the example code apparently doesn't register, leading to the whole code being inoperable.

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    Hi. Do you have a spare screen to test with. It might be a dodgy unit.

  • @hotstuff6131

    @hotstuff6131

    2 жыл бұрын

    @@BytesNBits oh I'm in a class about this stuff and the whole class seems to be having issue s with it haha. The pjrc website we use said to use a few of the pins for both a touch input and some output s. Could it be that the teensy is getting interrupted by both an input and output to the same pin?

  • @BytesNBits

    @BytesNBits

    2 жыл бұрын

    @@hotstuff6131 The touch screen should only need the SPI connections and a chip select pin. If you're trying to use any of these pins for more than one function you will upset the touch screen controller. Try disabling the code that uses the pins for the second function or try my sample code to just talk to the touch panel. If that all works you know the panel is OK. If not then you've got some other sort of problem. I hope this helps.

  • @hotstuff6131

    @hotstuff6131

    2 жыл бұрын

    @@BytesNBits will try when I get the chance!

  • @diyk-h-m2423
    @diyk-h-m24233 жыл бұрын

    hello sir can you tell me about how to use SD card LCD 2.8 inch SPI with Arduino Uno

  • @BytesNBits

    @BytesNBits

    3 жыл бұрын

    Hi. A couple of people have asked for this. I'll make a video over the next week or so. Basically you need to connect the data and clock lines to the sd card and then use a spare output from the Arduino to control the CS input on the sd card. You should then be able to use the SD card library to talk to the device. I'll cover it in full detail on the video when it's ready.

  • @diyk-h-m2423

    @diyk-h-m2423

    3 жыл бұрын

    @@BytesNBits yes thank you sir

Келесі