No video

Connect an SPI LCD TFT Display to Your Raspberry Pi Pico With MicroPython - ILI9341 Driver

  Рет қаралды 28,181

Bytes N Bits

Bytes N Bits

Күн бұрын

Пікірлер: 66
@faultyinterface
@faultyinterface 2 жыл бұрын
Many thanks for the tutorial! Got it up and running so easily, and everything was well explained.
@BytesNBits
@BytesNBits 2 жыл бұрын
Glad it helped.
@davidhill8320
@davidhill8320 Жыл бұрын
Love the videos - please keep them up. Right pace, right depth and been the thing that has got me started with RPi pico. I bought an all in one board, the Waveshare 1.28” LCD with RP2040 chip, and accelerometer built it. The sample code is non-existent and was wondering how I identify what is driving the LCD (it looks like it is an SPI interface) and go about either searching or writing a driver for it? Any help or pointers really appreciated.
@BytesNBits
@BytesNBits Жыл бұрын
There should be some sort of data sheet for the board that details how it's all connected together. Are there any libraries for the board that you can reference?
@davidhill8320
@davidhill8320 Жыл бұрын
Thank you! Yes found a data sheet, which says the controller is a GC9A01A. As you suggested I then searched on GutHub for a micro Python based driver for this chip and found one. Thanks again, love the channel.
@jackpurdum3976
@jackpurdum3976 Жыл бұрын
Very well done. I have not used Python but have used C since the late '70s. Any thoughts about using the Arduino IDE, C, and the Pico? The IDE 2.1 supports the Pico.
@BytesNBits
@BytesNBits Жыл бұрын
C on the Pico is fine. Much faster than micro python. The Arduino IDE is great for smaller projects and for keeping things simple but try Platformio in VS code of you're looking for a full IDE environment.
@philoffhistree6700
@philoffhistree6700 2 ай бұрын
hi, @4:30 you mention the next video will be showing you how to make your own driver, but at the end of the video you say the next video will be how to draw to the screen using bitmaps and the buffer, which is it or is the video covering both, also i have a similar tft lcd screen that connect using this ili9341 driver but its connections are gnd,vcc,scl,sda,rst,dc,cs so was tricky to figure out what wire went where might be a good idea to include both conventions in your tutorials
@BytesNBits
@BytesNBits 2 ай бұрын
Sorry. This was a while ago. The video you're after is here. I think it covers both, sort of! kzbin.info/www/bejne/nHjJk2WEq6mffZY
@philoffhistree6700
@philoffhistree6700 2 ай бұрын
@@BytesNBits yeah i have already watched that but it doesn't touch on how to make your own driver, understanding how the datasheet for display related to commands in the driver would be very helpful for everyone as they could write their own drivers
@darinp52
@darinp52 3 ай бұрын
Great tutorial!!! I followed it with a 480x320 display. It worked right away, but its shifted left by 160 px....so there's 160px on the right that I can't control and 160px to the left thats off-screen. When I run the bouncing boxes demo, the boxes disappear off to the left, indicating its drawing, then they float back into view. Any thoughts on how to un-shift the display?
@BytesNBits
@BytesNBits 3 ай бұрын
Check you've got the right settings values for the screen dimensions in the code. Don't forget to make sure you get the height and width values the right way round. I'm not sure if the demo code is portrait or landscape.
@darinp52
@darinp52 3 ай бұрын
@@BytesNBits For the benefit of anyone who has this same problem, the fix was this line. I updated the 3 args from what was originally in the file: self.write_cmd(self.DFUNCTR, 0x80, 0x22, 0x3b) in the init. I have no idea what DFUNCTR means, but someone else discovered this and it worked for me
@mahmoudshanaa7658
@mahmoudshanaa7658 7 ай бұрын
Hello, your content is amazing keep it up. Do you know a way to display GIF's on the screen display ?
@BytesNBits
@BytesNBits 7 ай бұрын
You should be able to find a library that will decode the gif file. This will basically give you a series of image frames. You'd then need to either just display a static single frame or code some sort of animation routine to animate the gif.
@bens4446
@bens4446 5 ай бұрын
Many thanks. Would this work with the ILI9488?
@BytesNBits
@BytesNBits 5 ай бұрын
You'll need a suitable driver. The displays need a block of initialisation data to be sent to them at startup. This can be different between displays. You might get away with it for the ILI9488, but I'd have a look for a driver first.
@hajarou461
@hajarou461 5 ай бұрын
Can you tell me how to connect TFT LCD st7735S 1.77" to the raspberry pi pico ?
@BytesNBits
@BytesNBits 5 ай бұрын
You'll need a driver library that supports that driver chip. They all have slightly different command and initialisation sequences.
@umutkayacan7659
@umutkayacan7659 2 жыл бұрын
cool !
@BytesNBits
@BytesNBits 2 жыл бұрын
Thanks. Name change??
@noreoalles
@noreoalles 2 жыл бұрын
@@BytesNBits I was just about to say that, uhhh.😅
@user-on8lm3nw3n
@user-on8lm3nw3n 2 жыл бұрын
I want to operate on ili9488 instead of ili9341. I tried, but the screen is cut off and printed out. I'd like to ask for advice.
@BytesNBits
@BytesNBits 2 жыл бұрын
You'll need to look in the documentation for your driver. The screens generally work in the same way, but you need to get the right initialisation code. If you can find an ILI9488 example that's the best starting point, or look in the chip datasheet. It will usually have a start data block.
@WintonMc
@WintonMc Жыл бұрын
I've just started the same thing ( ILI9488 + XPT2046). Do have any advice/ anything you could share?
@Pepsius2468
@Pepsius2468 Жыл бұрын
I really need help, i dont see such setup videos for the pi pico. My problem is that if you go to pycharm, file --> settings --> Languages & Frameworks, there is no "MicroPython". You can also make a Thonny tutorial for the ili9341 driver.
@BytesNBits
@BytesNBits Жыл бұрын
You need to install the MicroPython plugin for PyCharm. Please have a look at my setup tutorial. kzbin.info/www/bejne/amXHqI15r5mSqcU
@user-cs8xv3yc2g
@user-cs8xv3yc2g 11 ай бұрын
Would the pico work with the Hosyond 3.5 Inch 480x320 Touch Screen TFT LCD SPI Display Panel? I'm having trouble with locating the equivalents of LED, CS, RESET, DC, and VCC on this display.
@BytesNBits
@BytesNBits 11 ай бұрын
If the screen uses the 3 wire SPI it should work. Sometimes the pins are labelled differently but they should make sense. Have a look at the device data sheet.
@wyngreece7
@wyngreece7 Жыл бұрын
Did you make the video with the proccess of making your own lcd driver?
@BytesNBits
@BytesNBits Жыл бұрын
Not yet. Too many other projects got in the way.
@Pepsius2468
@Pepsius2468 4 ай бұрын
when i click start on any code it cant import like ImportError: can't import name ...
@BytesNBits
@BytesNBits 4 ай бұрын
Make sure you upload all the files to the Pico. The import statements pull code in from other files.
@TautologyTechSystems
@TautologyTechSystems Жыл бұрын
Did you ever end up making your video about building a driver from scratch? I have tried to follow your steps in this video, but I'm continually running into various software issues.
@BytesNBits
@BytesNBits Жыл бұрын
I think other topics got in the way and that idea dropped off the list. I'll probably come back to it at some point.
@TautologyTechSystems
@TautologyTechSystems Жыл бұрын
@@BytesNBits I understand and appreciate it. For what it's worth I think it would be a really valuable video for folks. There's so many different displays and boards out there that it can be extremely difficult to find an already built driver that works.
@BytesNBits
@BytesNBits Жыл бұрын
@@TautologyTechSystems You're probably right. I'll have a think 😀
@TautologyTechSystems
@TautologyTechSystems Жыл бұрын
@@BytesNBits I appreciate it. I have quite a bit of experience with the most popular Amazon OLED/led displays at this point. It has taken me hours and sometimes days to get them working and even then there are always problems and simple features/functionality missing.
@FixationwithCarnage
@FixationwithCarnage Жыл бұрын
how would you connect the sd pins from the display to the pico?
@BytesNBits
@BytesNBits Жыл бұрын
The SD card uses the same SPI bus. It just needs a separate chip select output from the Pico. I can't remember if there are any other pins you need to connect but have a look at my arduino version of this tutorial where I use the sd card interface.
@baddabaddabaddaswing
@baddabaddabaddaswing 2 жыл бұрын
Do you think the pico could handle playing a 320x240 video on a loop? Thinking of using one to make an arcade cabinet miniature with a video loop of the attract mode of the game.
@BytesNBits
@BytesNBits 2 жыл бұрын
Hi. The driver in the video can just about manage 10 to 15 frames per second if you push it, and are not running any other software. You'd need to have the video stored as bitmap images for each frame so it's going to be a short video. I guess the answer is no. I'm working on writing a frame buffered driver which will hopefully get a gaming display up to over 30 fps but again the video frame storage would be an issue. Drop a Raspberry Pi Zero in and you'll get it working fine. Have a look at my RetroPie videos for the SPI display to see how to get full video running over SPI. kzbin.info/www/bejne/q6uXpJRoaahnnc0
@baddabaddabaddaswing
@baddabaddabaddaswing 2 жыл бұрын
@@BytesNBits thank you for the suggestions! The issue unfortunately is trying to get a pi zero at msrp (at least in canada)
@BytesNBits
@BytesNBits 2 жыл бұрын
@@baddabaddabaddaswing There is a shortage of these at the moment. Everyone is buying them s fast as they are being made.
@Pepsius2468
@Pepsius2468 4 ай бұрын
it says my rpi pico needs a 3.5 SDK
@BytesNBits
@BytesNBits 4 ай бұрын
Just make sure you update your libraries and try updating the Micropython firmware on the Pico.
@liankruger8447
@liankruger8447 2 жыл бұрын
Hi there, can you please explain what file format the images are in this library? I'm trying .raw files that I've converted online but I can't get the images to display. It looks corrupted.
@BytesNBits
@BytesNBits 2 жыл бұрын
Hi. The image functions in this library uses bitmap file format as this is the easiest to decode. I'm pretty sure they need to be encoded as 24bit image files.
@liankruger8447
@liankruger8447 2 жыл бұрын
@@BytesNBits Hi there, thank you I'll try using the bitmap files
@liankruger8447
@liankruger8447 2 жыл бұрын
@@BytesNBits Hi there, I've tried displaying 24- bitmaps and the results do look better , however it still looks skew and the color is off. Could you please make a tutorial on how to save an image in paint and display it?
@liankruger8447
@liankruger8447 2 жыл бұрын
@@BytesNBits oh and thank you very much for this tutorial, it was of great help and inspiration.
@safwanshaib9106
@safwanshaib9106 Жыл бұрын
Is ther anyway to use the touch module with pico
@BytesNBits
@BytesNBits Жыл бұрын
Yes. Touch modules tend to be SPI devices. You just need an appropriate driver to run it. Make sure you find out what chip is being used in your panel and then find a driver that supports it.
@safwanshaib9106
@safwanshaib9106 Жыл бұрын
I'm using the xpt2046, only found one driver but it doesn't seem to work , any suggestions for micPython would be appreciated
@BytesNBits
@BytesNBits Жыл бұрын
@@safwanshaib9106The LCD driver in the video has an XPT2046 driver. Did you try that one? I'm sure I tried it out and it was OK.
@Pepsius2468
@Pepsius2468 Жыл бұрын
I get errors in the script all the time! i dont know why but it seems that alot of files are missing...
@BytesNBits
@BytesNBits Жыл бұрын
Have you uploaded all the files to the Pico. You have to do this manually including all the library and support files.
@Pepsius2468
@Pepsius2468 Жыл бұрын
@@BytesNBits Yes i did
@Pepsius2468
@Pepsius2468 Жыл бұрын
@@BytesNBits it wont work tho
@Pepsius2468
@Pepsius2468 Жыл бұрын
@@BytesNBits can you finally help me
@arthurswanson3285
@arthurswanson3285 2 жыл бұрын
This same code will work on a Pi Zero or regular Pi 3 without modification, correct?
@BytesNBits
@BytesNBits 2 жыл бұрын
Hi. No. This is for the Pico. The full Raspberry Pi's work in a very different way. Have a look at my other videos that cover using an SPI LCD with the Raspberry Pi boards.
@chrismason7294
@chrismason7294 8 ай бұрын
I would also like to know this as I have been able to setup an ILI9341 screen with PI zero from another one of Bytes & bits videos but it shows the full desktop rather than just sending images, shapes and test to the screen, let me know if you find anything on this please if you get a moment
@safwanshaib9106
@safwanshaib9106 Жыл бұрын
I'm not sure why my comment is being deleted
@BytesNBits
@BytesNBits Жыл бұрын
I haven't seen your comment. Is KZbin knocking it out?
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 14 МЛН
Turning a Raspberry Pi Pico into a GPU!
16:42
element14 presents
Рет қаралды 120 М.
Using PICO Interrupts
25:15
Making Stuff with Chris DeHut
Рет қаралды 18 М.
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,1 МЛН
Every Developer Needs a Raspberry Pi
27:27
Sam Meech-Ward
Рет қаралды 488 М.
Using a 2.8in SPI LCD Touchscreen ILI9341 with an ESP32 on the new Arduino IDE 2
10:34