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

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

Комментарии • 66

  • @faultyinterface
    @faultyinterface 2 года назад +2

    Many thanks for the tutorial! Got it up and running so easily, and everything was well explained.

  • @philoffhistree6700
    @philoffhistree6700 3 месяца назад

    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  3 месяца назад +1

      Sorry. This was a while ago. The video you're after is here. I think it covers both, sort of!
      ruclips.net/video/fGfb2NvDlG4/видео.html

    • @philoffhistree6700
      @philoffhistree6700 3 месяца назад

      @@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 месяца назад +1

      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

  • @hajarou461
    @hajarou461 6 месяцев назад

    Can you tell me how to connect TFT LCD st7735S 1.77" to the raspberry pi pico ?

    • @BytesNBits
      @BytesNBits  6 месяцев назад

      You'll need a driver library that supports that driver chip. They all have slightly different command and initialisation sequences.

  • @jackpurdum3976
    @jackpurdum3976 Год назад +1

    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.

  • @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.

  • @bens4446
    @bens4446 6 месяцев назад

    Many thanks. Would this work with the ILI9488?

    • @BytesNBits
      @BytesNBits  6 месяцев назад +1

      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.

  • @김하수-j1q
    @김하수-j1q 2 года назад +1

    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 2 года назад

      I've just started the same thing ( ILI9488 + XPT2046). Do have any advice/ anything you could share?

  • @davidhill8320
    @davidhill8320 Год назад +1

    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  Год назад +1

      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.

  • @FixationwithCarnage
    @FixationwithCarnage Год назад

    how would you connect the sd pins from the display to the pico?

    • @BytesNBits
      @BytesNBits  Год назад +1

      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.

  • @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  Год назад +1

      You need to install the MicroPython plugin for PyCharm. Please have a look at my setup tutorial. ruclips.net/video/44dwZCz4_sc/видео.html

  • @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.

  • @EdwardHerskovits
    @EdwardHerskovits Год назад

    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  Год назад

      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.

  • @mahmoudshanaa7658
    @mahmoudshanaa7658 8 месяцев назад

    Hello, your content is amazing keep it up.
    Do you know a way to display GIF's on the screen display ?

    • @BytesNBits
      @BytesNBits  8 месяцев назад

      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.

  • @wyngreece7
    @wyngreece7 Год назад

    Did you make the video with the proccess of making your own lcd driver?

    • @BytesNBits
      @BytesNBits  Год назад +1

      Not yet. Too many other projects got in the way.

  • @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.

  • @safwanshaib9106
    @safwanshaib9106 Год назад

    I'm not sure why my comment is being deleted

    • @BytesNBits
      @BytesNBits  Год назад

      I haven't seen your comment. Is RUclips knocking it out?

  • @umutkayacan7659
    @umutkayacan7659 2 года назад +1

    cool !

    • @BytesNBits
      @BytesNBits  2 года назад +2

      Thanks. Name change??

    • @noreoalles
      @noreoalles 2 года назад +3

      @@BytesNBits I was just about to say that, uhhh.😅

  • @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.

  • @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

  • @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.

  • @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 года назад +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.
      ruclips.net/video/uz4sa24C4gk/видео.html

    • @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.

  • @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 9 месяцев назад

      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