Тёмный

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

Bytes N Bits
Подписаться 33 тыс.
Просмотров 186 тыс.
50% 1

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....
ILI9341 Library
github.com/ada...
XPT2046 Library
github.com/Pau...
Adafruit GFX Library
github.com/ada...
Adafruit LCD tutorial
learn.adafruit...
Adafruit GFX Library Tutorial
learn.adafruit...

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

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 366   
@DavidTLutz
@DavidTLutz 2 года назад
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 2 года назад
Hi. That's a really awkward 'bug' to have to find. Glad it all worked in the end.
@makermatrix9815
@makermatrix9815 3 года назад
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 :)
@AOPDPQBABBBWDSCofTMHG
@AOPDPQBABBBWDSCofTMHG 18 дней назад
Thanks, all I had were 6.8k/3.3k for the divider but it works great.😊
@BytesNBits
@BytesNBits 17 дней назад
Great. As long as the ratios are about right. Also look at level shifter ICs. Bit more expensive but a better solution.
@distortion_tech_lab
@distortion_tech_lab 4 месяца назад
Did every single thing you said and it doesn't work for me. I regret buying this. The Amazon ad is a lie. It says "For Arduino Mega" and it absolutely is not.
@distortion_tech_lab
@distortion_tech_lab 4 месяца назад
The only thing I've done differently is purchasing actual "level shifters" because I didn't want to fiddle with resistors. But I turned an eye brow up to having the divider network on the MISO pin. I'm not sure why we're protecting the Arduino from a 3.3v signal. I notice that the level shifters I ordered seem to have a transistor in them. Which would mean they're only 1 way. So it's probably blocking some of the signals. I guess I'll have to build a divider network anyway just to see if that's the reason. I'm very angry at the way the item I bought was presented. It said "5v 3.3v compatible." Yeah my phone is 110v "compatible" once you plug it into a f***ing converter 🙄
@BytesNBits
@BytesNBits 4 месяца назад
Hi. Make sure you get a bi directional level shifter IC. These are designed for this sort of circuit. Also make sure you match the pins to the Mega pinout which will probably be different to the uno ones in the video.
@distortion_tech_lab
@distortion_tech_lab 4 месяца назад
@@BytesNBits I have determined that the level shifters are the problem. Their pins are very poorly marked. But apparently each side requires a power connection per channel. So for a 9 pin board I only get two actual data transit lines. I've got that completely wrong. I'm going to toss that aside and build a circuit board with the same pin out but voltage dividers like you've done here. I've prepared a screenshot of the definition of the word "compatible" to share with the Amazon seller 🤣
@distortion_tech_lab
@distortion_tech_lab 4 месяца назад
@@BytesNBits And yes the Mega is different. 11, 12, and 13 are 51, 50, 52 in that order. I'll report back hopefully with good news once I've made the voltage divider network and replaced the lever shifter.
@distortion_tech_lab
@distortion_tech_lab 4 месяца назад
@@BytesNBits Happy to report that the voltage division network I built paired with your instructions have gotten the screen operational!
@DaddiJazz
@DaddiJazz 21 день назад
Great video, thanks for that. I am trying this out, and get code to compile and run but nothing on the screen, except in the end approximately 1/3 of the sceen has a different shade (grayish). I also tried out a different setup with 10k resistors, but it returned the same result. (see youtube channel ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-beyDkTBhpgs.htmlsi=PAtmcsTE15rZkbXi) Any recomendation for how to debug this?
@BytesNBits
@BytesNBits 20 дней назад
Do check you've got the screen wired up correctly and the pins correctly specified in the code. Try it without the touchscreen connected up. The resistors should work fine but level shifter ICs are better.
@mbanc443
@mbanc443 7 месяцев назад
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 7 месяцев назад
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.
@ilyasbendjeffal9758
@ilyasbendjeffal9758 Год назад
im using mega 2560 and it keep sending me errors like : In file included from C:\Users\PCPLUS~1\AppData\Local\Temp\arduino_modified_sketch_754735\graphicstest.ino:18:0: C:\Users\pc plus\Documents\Arduino\libraries\Adafruit_GFX_Library/Adafruit_GFX.h:12:32: fatal error: Adafruit_I2CDevice.h: No such file or directory #include ^ compilation terminated. exit status 1 Error compiling for board Arduino/Genuino Mega or Mega 2560. i already included adafruit lirary is ther any way to worke around and make it run on atmega
@BytesNBits
@BytesNBits Год назад
I'd have a look in your library folder to to make sure all the required code has been downloaded and installed. These errors seem to suggest missing libraries. Check the Adafruit I2C library is actually there.
@philluvschips3787
@philluvschips3787 Год назад
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 Год назад
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.
@larrybud
@larrybud 10 месяцев назад
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 10 месяцев назад
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.
@MADARAUCHIHA-lk3wg
@MADARAUCHIHA-lk3wg 5 месяцев назад
I did everything you say in this video...but my display isn't working...please help me...😢
@BytesNBits
@BytesNBits 5 месяцев назад
Usually it's a wiring fault or your code doesn;t match up with the pins you're using.
@TheExtorn
@TheExtorn 4 месяца назад
My tft screen works great, until I initialize the touchscreen. Then any and all tft methods stop working. Anyone encountered this issue aswell? I am using an arduino MEGA.
@BytesNBits
@BytesNBits 4 месяца назад
I think in the video I mention a few steps to ensure the two devices don't interfere with eachother. From memory you need to make sure both CS lines are inactive before initialising the SPI comms.
@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.
@mellee3436
@mellee3436 2 года назад
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 2 года назад
Great to hear you've got your project working.
@mellee3436
@mellee3436 2 года назад
@@BytesNBits I'm using the ILI9341 FAST driver for experiments now..
@felipefranco8977
@felipefranco8977 Месяц назад
Tenho uma dúvida, meu display LCD diz ser protocolo SPI, entretanto ao invés de "MOSI" e "SIMO", eu tenho um único canal bidirecional "SDA", Sei que posso conecta-lo normalmente, entretanto como declaro este canal no meu esp-32 ou arduíno? Seria "#define TFT_SDA x"? E outra dúvida, eu uso a mesma biblioteca que utilizou no vídeo para SPI? isso me parece I2C
@BytesNBits
@BytesNBits Месяц назад
You'll need to have a look at the lcd data sheet. As you've said SPI usually has 2 data connections. MOSI is from the master to the LCD. MISO is from the LCD to the master. SDA might be the MOSI as sometimes the MISO isn't needed. If it is a bi directional signal it might not be an SPI interface. SDA does match with I2C so it might be using that.
@felipefranco8977
@felipefranco8977 Месяц назад
@@BytesNBits isto faz sentido, infelizmente não encontrei o datasheet mesmo navegando bastante, de qualquer forma, sei que ele pode ser I2C, também pode ser SPI, vou considerar que "SDA" seja um "MOSI", vamos ver o que acontece, obrigado pela atenção e ajuda!!! Estou inscrito
@mrminister1152
@mrminister1152 Месяц назад
Hello, this video made me curious why my touchscreen doesn't work, and why I am reading only 4079 preasure, x = 17 and y = 0. And I found a problem - the problem is MISO connection. While I connect MISO from display (SDO) and MISO from touchscreen (TDO) touchscreen is not working. I'm connecting it via breadboard and voltage divider. While I disconnect MISO from display touchscreen starts working.
@BytesNBits
@BytesNBits 29 дней назад
Make sure you've got separate chip select outputs to each device and that you initialise these to the correct states before trying to talk to any devices. I think I cover a bit of that in the video. the voltage divider circuit isn;t the best option. If you use bi directional logic level converters it's a much better solution.
@mrminister1152
@mrminister1152 9 дней назад
@@BytesNBits Well, that was weird. I changed connections - before i had 2 separate wires directly connected via voltage divider - it didn't work. But when I soldered them together and connected almost the same way, but this time to the source of signal I had one wire, but to the display were connected 2 wires - it started working properly. What a great example of micro-scale capacities and impedances. Or just too much voltage drop in source of signal by connecting MISO to the display via two voltage dividers or whatever. Never again haha ps. now I'm using proper level shifters. Thank You for Your advice after that period of time after uploading video ;)
@traflaw8286
@traflaw8286 5 месяцев назад
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 5 месяцев назад
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.
@impossibletechie8059
@impossibletechie8059 Год назад
will this work only with display if i dont want the touch functions?
@BytesNBits
@BytesNBits Год назад
Yes. Just leave it the touch screen code and connections.
@impossibletechie8059
@impossibletechie8059 Год назад
Thanks for the response. I have tried another circuit with only 10k resistors and it doesn't seem to be working. What might be the reason behind that? I only see white screen.
@impossibletechie8059
@impossibletechie8059 Год назад
@@BytesNBits i tried the exact same thing. all i see is white screen. what would be the better way to debug this?
@neilfpv
@neilfpv 10 месяцев назад
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 10 месяцев назад
Can you find the datasheet for the actual device you have?
@neilfpv
@neilfpv 10 месяцев назад
@@BytesNBits hi. Someone told me in esp32 discord today that mine is an ST7735. Thanks a lot!
@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 - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Oh9vgomyuOI.html. Have fun!
@CanaleYouTubeGeneralista
@CanaleYouTubeGeneralista 2 месяца назад
Hi, I have to make a digital thermometer with an Arduino nano and a sht41 sensor, which display do you recommend ? Which is the easiest display to manage and the most supported as libraries ? I don't need the Touch.
@BytesNBits
@BytesNBits 2 месяца назад
Any of the spi based displays should be fine. Work out what resolution and size you need then check that the driver chip is sorted by the software package.
@CanaleYouTubeGeneralista
@CanaleYouTubeGeneralista 2 месяца назад
@@BytesNBits Thanks for the explanations, I was thinking of taking the 2.8 TFT SPI display with ST7789V chip, I hope it will be good as a support for the libraries.
@sfs-lyder8560
@sfs-lyder8560 9 месяцев назад
Hi, how do i wire the display pin and Arduino pin into Bi-Directional logic level converter?
@BytesNBits
@BytesNBits 9 месяцев назад
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.
@dienau6313
@dienau6313 6 месяцев назад
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 6 месяцев назад
The Arduino library should work for the ESP32 as long as you program it in the Arduino IDE
@dienau6313
@dienau6313 6 месяцев назад
@@BytesNBits thank you
@איתיאלאדרי-ר4ד
@איתיאלאדרי-ר4ד Год назад
Heyy I have a question Im using Arduino mega2560 and ili9341 when I'm using just the touch and the screen it works amazing but when I'm trying to add the sd card it’s failing and of course, I'm using a different cs And when I tried it separately the sd card works fine So I think there is a problem with the bus but I don't know how to solve this I already try to fix it for 2 days So if u have some advice or tutorial on how to use everything together it will be great Thank u
@BytesNBits
@BytesNBits Год назад
As you say it should all work if you're using separate CS lines. Have you tried SD + screen and SD + touch to see which ones can't work together? Make sure you're careful with the initialisation of the devices. The CS lines need to be stable and off before you start talking to any devices on the bus. I think I ended up putting in a short delay to let the devices clear the bus before the real code started. The resistor voltage step downs aren't the best solution. Use logic level converters for a more reliable solution. Maybe a CS line is floating out of spec - only guessing now! I hope this helps.
@איתיאלאדרי-ר4ד
@איתיאלאדרי-ר4ד Год назад
@@BytesNBits ok I will try it today and I let u know if something works And I will try to find which combination cannot work together Thank u for u answer
@woodwink_4748
@woodwink_4748 5 месяцев назад
Mine doesnt work. I have white screen, what happened?
@BytesNBits
@BytesNBits 5 месяцев назад
Usually it's an issue with the wiring or the mapping of pins in the software. Just go through everything and check you've got the circuit correct and the code matching the outputs you're using.
@rhythmlalim4018
@rhythmlalim4018 4 месяца назад
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 4 месяца назад
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.
@williampowell7518
@williampowell7518 2 года назад
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 Год назад
Most software wants SD_CS to be pin 5 on esp32.
@rizkylevy8154
@rizkylevy8154 2 года назад
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.
@Ikmijnnaam
@Ikmijnnaam 5 месяцев назад
I dunno I mean all those resistors all that work, isn't just more convenient to just use a 3.3 volt board or 3 volts or whatever ? just thinking along here.........
@BytesNBits
@BytesNBits 5 месяцев назад
Yes. You can use a voltage level shifter IC which is a better solution. The resistors are just a cheap and easy way to do it with components you'll have in your toolbox.
@Vagubando
@Vagubando Год назад
I have letters inverted vertically on such a display. I have tried many libraries, but there is no result. Advise me where to dig ?????
@BytesNBits
@BytesNBits Год назад
The Adafruit GFX library has a setRotation method that allows you to specify the screen rotation. From memory it takes an integer parameter of 0-3 for each of the 4 90 degree rotations.
@Vagubando
@Vagubando Год назад
@@BytesNBits Спасибо !
@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.
@VimmmUk
@VimmmUk 2 месяца назад
Very useful content. Thank you!
@BytesNBits
@BytesNBits 2 месяца назад
Thanks.
@RichHandsome
@RichHandsome 6 месяцев назад
8:07
@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.
@freddycrespo4107
@freddycrespo4107 10 месяцев назад
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 10 месяцев назад
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.
@legosinmotion1231
@legosinmotion1231 9 месяцев назад
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 9 месяцев назад
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 9 месяцев назад
@@BytesNBits Ok thank you for your response
@ayesha7oo2
@ayesha7oo2 2 года назад
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 2 года назад
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.
@melaxoho4037
@melaxoho4037 2 года назад
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.
@Gouzation
@Gouzation 2 года назад
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
@djix030
@djix030 11 месяцев назад
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 11 месяцев назад
With the ESP32 you can remove the resistors. The video is based on the Arduino which runs at 5V.
@nucleoy6000
@nucleoy6000 7 месяцев назад
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 7 месяцев назад
Even if you use the 3.3V output for power the IO pins run at 5V.
@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.
@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.
@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?
@GetRealwithMike
@GetRealwithMike Год назад
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 Год назад
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.
@rushikeshkumawat1361
@rushikeshkumawat1361 Год назад
Can I use 1 kiloohm resistor as pull up ?
@BytesNBits
@BytesNBits Год назад
1K is maybe a bit low but should still work fine.
@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.
@rizkylevy8154
@rizkylevy8154 2 года назад
Should with resistor?
@BytesNBits
@BytesNBits 2 года назад
Hi, I think I caught your later question first...
@accci4551
@accci4551 4 месяца назад
Thx for publishing this video! now I know wha the LED at the display is
@BytesNBits
@BytesNBits 4 месяца назад
Great!
@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!
@KILLZONERUSSIA
@KILLZONERUSSIA 3 года назад
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.
@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.
@dankclee
@dankclee Год назад
Thank you for publishing this video!!
@BytesNBits
@BytesNBits Год назад
Glad it was helpful!
@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.
@tothlaszlo8008
@tothlaszlo8008 6 месяцев назад
Thank you the video! Its verry big help to understanding! 👍
@BytesNBits
@BytesNBits 6 месяцев назад
You are welcome!
@jefferyosei101
@jefferyosei101 4 месяца назад
Thank you so much, this is EXACTLY what i needed!
@BytesNBits
@BytesNBits 4 месяца назад
Glad it was helpful!
@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.
@sudheerillipilli4691
@sudheerillipilli4691 3 года назад
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 3 года назад
Hi. You'd need to check the Arduino documentation for the Pico. Check you're using the correct pins, etc.
@activ8me3
@activ8me3 3 года назад
I really like your style. You are not a snob maker - like most. Wow.
@activ8me3
@activ8me3 3 года назад
... and I liked your reference to adafruit. The tiny Ai corp that my daughter and are startuping is going north too.
@BytesNBits
@BytesNBits 3 года назад
Hi Armin. Thanks. I try to keep it real. Good luck with the new venture.
@56NeilWatson
@56NeilWatson 2 года назад
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.
@atihrot755
@atihrot755 2 года назад
Dear Sir. I have a 2.8 inch LCD display but I can't find the driver on the SM245 ST chip. Please help. Well thank you. I can't set drawing on the screen. It doesn't work at all.
@BytesNBits
@BytesNBits 2 года назад
Hi. Each driver chip needs a specific sequence of setup instructions to get it to work. These should be in the driver chip data sheet. If you look at the ILI9341 library code you'll see this sequence being sent out. If you haven't got a ready made driver library you'll need to modify one of the exiting drivers for your chip. Make sure you do a good search on Google. Most of the chips have a ready made driver out there somewhere.
@inanitas
@inanitas 8 месяцев назад
​@@BytesNBits How do we find out which chip our display uses? I ordered one off of amazon and figured they'd supply more details with the package. It doesn't say which chip is used anywhere thougt and the only visible IC is the touch screen chip.
@atihrot755
@atihrot755 2 года назад
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 2 года назад
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.
@karunakanttripathi2017
@karunakanttripathi2017 2 года назад
Can we connect it with pc
@BytesNBits
@BytesNBits 2 года назад
Hi. You need some way of connecting the IO pins on the LCD panel to the PC. You'd need to code the arduino to take commands from the PC over serial and then write to the LCD for you.
@michaeldutsonlandscapephot2184
@michaeldutsonlandscapephot2184 2 года назад
Excellent video Bob,. Probably about the clearest and most understandable ones on RU-vid; 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 - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FI7yXDi-fKA.html Simple SD card images - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-aVCWLk10sAw.html Writing your own image handler - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-exjzGMX4fqs.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! 🙄
@trombonista92
@trombonista92 2 года назад
very high production quality ,
@BytesNBits
@BytesNBits 2 года назад
Thanks.
@dng88
@dng88 18 дней назад
Very clear
@BytesNBits
@BytesNBits 17 дней назад
Glad it helped
@reiniermariscotes4455
@reiniermariscotes4455 Год назад
Is it okay to use a 10k resistors if I dont want to make a voltage divider?
@BytesNBits
@BytesNBits Год назад
The ideal solution is to use a level shifter IC. But whatever works for you is a good choice.
@ArtemAleksashkin
@ArtemAleksashkin 4 месяца назад
where is sd card using example?
@BytesNBits
@BytesNBits 4 месяца назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-exjzGMX4fqs.html
@ArtemAleksashkin
@ArtemAleksashkin 4 месяца назад
@@BytesNBits oh, thank you!!!
@HairlessMonkey-d3m
@HairlessMonkey-d3m Год назад
Amazing tutorial! However, I did encounter a problem. To begin with, I'm an amateur. After I've connected the wires and uploaded the program, my screen doesn't show anything but white, and I'm unsure of where I did wrong. I don't have 2,2K and 5,1K resistors so I tried both 2K and 4,7K, and 4,7K and 10K. Is it the resistors? For the code, I copied this tutorial. I chose the recommended port and chose Arduino Mega as the board (which is the board I use), and still nothing shows up to my tft lcd screen. And this tutorial when HIGH and OUTPUT is written, it shines in light blue, but when I write it it's simply black. But I've heard that that shouldn't matter. It would be deeply appreciated if someone has a good answer!
@BytesNBits
@BytesNBits Год назад
Hi. Your resistor values should be fine. If in doubt have a look at a bi directional level shifting IC. It's a much better solution. In moving to the Mega board did you change the pin assignments to match your board? I don;t think the pins are compatible between boards. You need to choose an SPI channel on the Mega and set the code up to use that one. Then add the generic IO pins to complete the SPI interface to the panel. Good luck!
@stevechapman7564
@stevechapman7564 Год назад
try to bridge out the jumper on the back of the board J1 it fixed 2 of my boards
@lalithkumarreddy8311
@lalithkumarreddy8311 3 года назад
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.
@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.
@ezion67
@ezion67 2 года назад
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.
@tech-guru9374
@tech-guru9374 2 года назад
गुड आर्टिकले
@BytesNBits
@BytesNBits 2 года назад
Thanks
@Venaber
@Venaber Год назад
thanks
@BytesNBits
@BytesNBits Год назад
You're welcome!
@atihrot755
@atihrot755 2 года назад
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 2 года назад
Glad you're enjoying the channel. Lots of projects to come. Just trying to find time to make them!
@marc-antoineaubin2032
@marc-antoineaubin2032 3 года назад
Hi, thanks you for your video its really helpful, but I have an issue with the compilation, first i tried on an arduino Mega, but the same message was appearing every single time : Error with compilation on Arduino Mega2560... i thought my arduino went bad so I tried an other....but same issue here....So I thought, maybe the programming of the library does not allow any other Arduino type (even when changing the Pins number in the sketch) ...So then I ordered an Arduino Uno...the same one in this video and the same TFT screen....but same issue (Error with compilation on Arduino Uno)....my usb port is select properly and my Arduino card type either....I watched your video about 10 times , the libraries are the same (same versions) , the encodings is written in the exact same way, and the wires are properly connect with the resistances divider for each data pins....Do you have any ideas of what's wrong with my setup ? Thanks a lot for you time !!! Have a nice day :D !
@marc-antoineaubin2032
@marc-antoineaubin2032 3 года назад
I was finally able to make it works !!! I installed the Adafruit BusIO library and it works instantly !! :D
@BytesNBits
@BytesNBits 3 года назад
Hi Marc. Glad to hear you got it working. Did you install the libraries through the library manager? Usually that will install all the extra libraries that a package requires. Have fun with the screen!
@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!
@김성도-h4n
@김성도-h4n 3 года назад
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!
@яемпеченье
@яемпеченье Год назад
Your tutorial is great but my tft screen doesn't work for some reason. My resistors have right resistance and i connected everything correctly. But when i upload the code my screen doesn't show anything and also my TX led doesn't glow, it blinks couple of times and then turns off. Can someone please tell what's the problem might be and how to solve it?
@BytesNBits
@BytesNBits Год назад
If you're sure all the wiring is correct check what driver chip your TFT uses. The tutorial shows an ILI9341 powered panel. If you've got a different driver chip you'll need to replace the ILI9341 driver with one for your screen. It should drop in fairly easily but you might need to modify a couple of the references and method calls.
@яемпеченье
@яемпеченье Год назад
​@@BytesNBits Thank you for an answer, but it turned out that my breadboard was defective. I replaced it and everything worked:)
@BytesNBits
@BytesNBits Год назад
@@яемпеченье Great!
@Evilslayer73
@Evilslayer73 3 года назад
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.
@Takalie_kontee
@Takalie_kontee 11 месяцев назад
I need help. I don't understand why when I install the T_CLK pin the screen is white. But if I don't install the pin T_CLK display possible
@Takalie_kontee
@Takalie_kontee 11 месяцев назад
I used 5.6K and 2.7K resistors in my setup
@BytesNBits
@BytesNBits 11 месяцев назад
Did you just connect the screen CLK and the touch CLK together? You don't need a second set of resistors. Make sure your chip select CS outputs are correctly configured and in the correct state. Try forcing the touch CS to the inactive state (high I think) and see if that allows the screen to work.
@Takalie_kontee
@Takalie_kontee 11 месяцев назад
Can I send you pictures?@@BytesNBits
@Takalie_kontee
@Takalie_kontee 11 месяцев назад
Now I've found the problem. Poor power connection. Loose power cord.@@BytesNBits
@Takalie_kontee
@Takalie_kontee 11 месяцев назад
But I encountered a new problem: the displayed image did not fill the entire screen. I'd like to send you a picture of the problem I'm having.@@BytesNBits
@MrBobWareham
@MrBobWareham 11 месяцев назад
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 11 месяцев назад
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 11 месяцев назад
Thanks for the reply, love the channel and your presentation.Bob@@BytesNBits
@sudheerillipilli4691
@sudheerillipilli4691 3 года назад
Sir, hardware spi settings are enough for speeding of screen or any other things need ? Nice explanation.
@BytesNBits
@BytesNBits 3 года назад
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.
@johnvine5731
@johnvine5731 2 года назад
Another thumbs up here. That was a great help. Thanks very much for your kind efforts.
@BytesNBits
@BytesNBits 2 года назад
Glad it helped
@Ikmijnnaam
@Ikmijnnaam 5 месяцев назад
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 5 месяцев назад
Thanks. Good luck with the course.
@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!
@irfanarefin1265
@irfanarefin1265 9 месяцев назад
can it be used on esp32?
@BytesNBits
@BytesNBits 9 месяцев назад
Yes. The Arduino library should be fine. Just make sure you use appropriate io pins.
@irfanarefin1265
@irfanarefin1265 9 месяцев назад
@@BytesNBits Thank you for the reply. I'll try to work with it
@fabricsinmotion
@fabricsinmotion Год назад
Thank you Please can I use 3.3 k instead of 5.1 k
@BytesNBits
@BytesNBits Год назад
As long as the ratios are about the same that's fine.
@fabricsinmotion
@fabricsinmotion Год назад
@@BytesNBits i just tried it and it's giving me just a white screen
@BytesNBits
@BytesNBits Год назад
@@fabricsinmotion Hi. Did you also adjust the value of the 2K resistors to give the same voltage division? I'd next check you've got everything wired up correctly. Make sure you're using the chip select and reset outputs. Are you using the code as in the video? There are a couple of setup things it does to make sure the initialisation works. Good luck!
@fabricsinmotion
@fabricsinmotion Год назад
@@BytesNBits No I did not adjust the 2 K resistor. I will do as you said and see. Thank you so much sir
@fabricsinmotion
@fabricsinmotion Год назад
@@BytesNBits i used 5.6K and 2.2K and it worked now i want to connect it to my AMG8833 sensor to display temperature through colors how do i go by it. thank you
@rondivecchia4561
@rondivecchia4561 6 месяцев назад
Very informative! Thank you for taking the time to put this together. It is much appreciated.
@BytesNBits
@BytesNBits 6 месяцев назад
Glad it was helpful!
@taranagnew436
@taranagnew436 3 года назад
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.
@chaithra95
@chaithra95 3 года назад
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.
@drlerkan
@drlerkan 3 года назад
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.
@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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-7x1P80X1V3E.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.
@srideepaindu818
@srideepaindu818 10 месяцев назад
Worked like a Charm :D... Thanks
@BytesNBits
@BytesNBits 10 месяцев назад
Glad it helped
@mahlodibogashu5211
@mahlodibogashu5211 3 года назад
Thank I just got the exact lcd and i will be following up thanks for your effort sir.
@BytesNBits
@BytesNBits 3 года назад
You are welcome
@diyk-h-m2423
@diyk-h-m2423 3 года назад
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
@Benqo
@Benqo 3 года назад
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!
@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.
@klaimmor2992
@klaimmor2992 5 месяцев назад
белый экран
@BytesNBits
@BytesNBits 5 месяцев назад
Check your wiring and make sure the code matches the pins you're using.
@michaelhartrey8937
@michaelhartrey8937 3 года назад
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.
@RealDevastatia
@RealDevastatia Год назад
You have neat handwriting. :D
@BytesNBits
@BytesNBits Год назад
Thank you! 😊
Далее
Basic animation in your SPI LCD touchscreen
41:04
Просмотров 22 тыс.
I Took An iPhone 16 From A POSTER! 😱📱 #shorts
00:18
Arduino TFT LCD Touch Screen Tutorial
7:58
Просмотров 1,6 млн