kedei 3.5 inch spi tft lcd driver made in china

However, Googling around I have found that some people were able to compile and install kernel drivers and it seems that some drivers are available from here: http://kedei.net/raspberry/raspberry.html

Now what happens... main HDMI screen cets coloured in four colors (red-yellow-blue-cyan), but SPI display started working. It shown four raspberry logos and a bunch of text, which ends with this line:

I also have one of these displays ("vision 1.0" ... damn they could not even spell version right in their first try), and I once tried the full image given by kedei ... it worked, but I was very sceptical, and finally I worked on some other projects.

If kedei is not giving any open source driver, then someone has to reverse-engineer the whole thing and write an open source driver on his/their own ...

That"s a very sensible approach - try and keep away from displays that need a custom OS in order to work. The tinylcd displays, at least the 3.5inch one anyway, have a fbtft overlay available by default in Raspbian - see for yourself in the /boot/overlays/ directory. You"ll still need to do other configurations, like console redirection, etc.

kedei 3.5 inch spi tft lcd driver made in china

When surfing for information on 3.5 ” TFT touchscreens for the Raspberry Pi,to improve the TinyLCD experience, I stumbled upon AliExpress where several shops offer a 3.5″ LCD TFT Touch Screen Display for incredible low prices.

Update June 2016: There is now a download/information page at http://osoyoo.com/driver/rpiscreen.php. Images for more versions (mine i 2.0, latest is 6.2)  are available there. Alternative ishttp://kedei.net/raspberry/raspberry.html with Kali Ubuntu drivers too for version 3.0 and up.

The archive contains an image of Raspbian with the LCD driver installed. The image is quite current, and fit for B, B+ or 2 B. When I bought the screen an older image, build in augustus 2015,  was downloadable, the kernel is quite fresh built, early October 2015.

The image supplied is wheezy,  3.18.9-v7 #27 SMP PREEMPT Sun Oct 4 23:57:41 CST 2015 armv7l. So quite a recent system! Also the Model 1 B and B+ kernel is present, also just current wheezy.

The system uses SPI to copy the screen contents to the LCD screen, and some GPIO’s for the touchscreen. Other GPIOs are free, and the connector construction  leaves these pins indeed accessible!

kedei 3.5 inch spi tft lcd driver made in china

As far as dual-monitor use, I had last looked into dual (or split) LCD and HDMI monitor use, but could not get that working. Long story short, I would not recommend wasting too much time on this LCD screen, it is mostly for static displays, not active gaming.

The screen refresh rate across the SPI (serial peripheral interface) is too slow for retropie. It will result in "screen tearing" and choppy video, with a frame rate of about 2-3 per second. This is unacceptable for games.

kedei 3.5 inch spi tft lcd driver made in china

Actually, having just looked at this again (and being somewhat naive I admit) is it an issue that it"s enabling i2c and SPI? I would"ve though (naively) that I"d just need SPI

kedei 3.5 inch spi tft lcd driver made in china

The RPi LCD can be driven in two ways: Method 1. install driver to your Raspbian OS. Method 2. use the Ready-to-use image file of which LCD driver was pre-installed.

3) Connect the TF card to the Raspberry Pi, start the Raspberry Pi. The LCD will display after booting up, and then log in to the Raspberry Pi terminal,(You may need to connect a keyboard and HDMI LCD to Pi for driver installing, or log in remotely with SSH)

1. Executing apt-get upgrade will cause the LCD to fail to work properly. In this case, you need to edit the config.txt file in the SD card and delete this sentence: dtoverlay=ads7846.

This LCD can be calibrated through the xinput-calibrator program. Note: The Raspberry Pi must be connected to the network, or else the program won"t be successfully installed.

kedei 3.5 inch spi tft lcd driver made in china

I orderer a 3.5″ SPI touchscreen with a Raspberry Pi 2 and a case, thinking it would be easy to set up, as it seemed to be like the one here. Unfortunately that was not the case.

With some googling I found out it was made by KeDei LCD and exactly this screen. Identifying strings on the screens were “Madei in KeDei of china”, “3.5 linch SPI TFTLCD”, “480*320 16bit/18bit” and “vision 1.0 2015/6/11”. I hope the guys who made this screen can write code better than english… Seems like it requires custom drivers by KeDei. Drivers could be downloaded from Baidu and they include the diff to compile your custom kernel. I haven’t compiled kernels before, so lets see if I could manage without doing that.

I downloaded drivers and installed them in a fresh installation of Raspbian. They worked, somewhat at least. I could see console in the screen and also LXDE started in it. However it seemed to override HDMI output completely, as it was /dev/fb0 and no other framebuffers were present. Touchscreen appeared in /dev/input/event0, but I couldn’t get it respond. Probably the touch sensor is defective, as the glass on the screen also had a crack. I did get a free resend however, so I’ll see whether it was defective hardware.

The drivers replaced current kernel with a custom 3.18.x version with drivers in it, so you can’t update kernel if using that method. Perhaps I should try to compile more recent kernel with drivers.

I installed Ubuntu on my Macbook Pro on an external hard drive (which is a whole another story, thanks to EFI), so I could follow instructions on Raspberry Pi pages. Compiling on RPi is quite slow (tried that overnight), so cross compiling is the way to go. Following the instructions worked pretty well, however I cloned tools to my home directory and added /home/heikki/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin to my path. After that everything worked as expected. After cloning and changing branch to rpi-4.1.y I patched semi-manually from the supplied diff from KeDei, however I have uploaded my updated diff to make it easier for you. There’s instructions on patching too, but long story short it’s “cat | patch -p1” in the base directory of the clone. The version I used was branch rpi-4.1.y, commit 785cea66a709eddb9858799192a7b7da566b44b0.

Update: I accidentally updated kernel with apt-get, so I tried to compile the kernel to the latest. However I noticed the patch missed a whole file, which belongs to drivers/video/fbdev/ and is attached here: ili9341.c.I still couldn’t get it right, so I just installed the previously compiled kernel.

I configured the kernel pretty much default, but the ili9341 drivers enabled. My config can be found here. Finally I got the kernel compiling. The config and built kernel are only for Raspberry Pi 2! For Raspberry Pi 1 you need to reconfigure the kernel and build it your self.

You should now have two framebuffer devices, /dev/fb0 and /dev/fb1. I’m not quite sure how the fbtft library interferes with the patch, as it seems to be activated too, but it works so no problem. (Actually I first activated module fb_ili9341, so you can try that too, if it contributed to my success). You can change to console to fb1 by command “con2fbmap 1 1” and back with “con2fbmap 1 0“, or on boot by editing /boot/cmdline.txt: add “fbcon=map:1” to the line somewhere. You can also change the font with “fbcon=font:ProFont6x11“. More things like this here.

I’ll test the touchscreen with custom kernel later when I get the new unit. The touchscreen driver seems to be added (/dev/input/event2 for me with Logitech keyboard/mouse connected), so it might work.

kedei 3.5 inch spi tft lcd driver made in china

We are continuing our series of tests of different display solutions for the Raspberry Pi 3. Today, I propose to test the LCD 3.5 ” HDMI touch screen delivered with a clear acrylic case. The touch part is managed via the GPIO of Raspberry Pi. This solution will be reserved for projects that do not use the GPIO of Raspberry Pi. It is a small box very practical to protect the Raspberry Pi.

The kit consists of a LCD 3.5 ” from the Chinese company Kedei capable of displaying a resolution ranging from 480×320 pixels to 1920 * 1080 pixels (it will be necessary to think of buying loupes at the same time :-D). We often find this kit on sale for less than €20 on AliExpress. Here we will test it in the basic resolution (480×320 pixels). Equivalent kits are available under the Geekwrom or Kuman brand. The touch part is managed by the GPIO of the Raspberry Pi. The screen is designed as a HAT compatible with the GPIO of Raspberry Pi (2 or 3). If you want to keep access to the GPIO for your projects, you will have to do the wiring of the touch part yourself and use a standard HDMI cable. Alternatively, you can also opt for a screen with management via the USB port of the touch part.

Connect the LCD display to the GPIO of the Raspberry Pi 3. It fits completely to the right of the GPIO connector. Insert the four sides of the box. Connect the HDMI screen with the angled connector.

If you have read the article about the Waveshare 7 “LCD test, you will find the same configuration principle. Here, there is (almost) nothing to do because everything is managed by a configuration script.

For each screen, we find the driver and an image of the pre-configured Linux distribution. I have not tested the proposed images (it is not necessary). I have no idea of the proposed distribution for the Raspberry Pi.

As you can see, the /boot/config.txt file will be overwritten by this new version. If you have made any changes to this file, do not forget to make a copy and postpone your settings. The other solution is to comment the sudo cp ./lcd_35_v/config_480_320.txt /boot/config.txt line and manually add the configuration to your current file.

kedei 3.5 inch spi tft lcd driver made in china

I changed the Adafruit libraries for TFT: GFX , TFTLCD and TouchScreen. I join all in this one library, the library SPFD5408, to avoid problems with duplicate libraries and enables also have the original library Adafruit ready for use in other projects with another TFT hardware.

kedei 3.5 inch spi tft lcd driver made in china

Buyer Beware: It’s hard to find drivers for this LCD Manufacture. If you plan on purchasing one go bigger and look for a display that can run Notro’s LCD driver fbtft scripts.

It’s running here with what the sellers are calling a “driver” but the driver they pass around is really is a complete raspberry image which to me… kind of blows. So I went on a quest to find all the drivers and I had the hardest time searching the web  but I did eventually find them on a Chinese manufactures site. Hopefully we can all benefit from this find. I will link them here and you can download them from our GoAttack Mega Account.

kedei 3.5 inch spi tft lcd driver made in china

Raspberry Pi 3.5 TFT LCD touch screen holder is mounted into 2x 5.25 drive bay. USB cable could be wired to 10 pin USB port on motherboard or to back USB port. Holder was designed for Zalman Z5 case, but it should fit to any computer drive bay...

Raspberry Pi 3.5 TFT LCD touch screen holder is mounted into 2x 5.25 drive bay. USB cable could be wired to 10 pin USB port on motherboard or to back USB port. ...Holder was designed for Zalman Z5 case, but it should fit to any computer drive bay...

... case with 3.5" TFT LCD. ... Works with the following Raspberry Pi Models: Raspberry Pi 3 Raspberry Pi 2 Raspberry Pi B+ Demo is Raspberry Pi 3 with Waveshare 3.5" LCD Touch Screen. ...If your LCD not match pitftcase.stl, you can try pitftcase2.stl.

Based on the excellent Adafruit design this case has been stretched and raised to allow the fitting of a 3.5" touch screen. As there seem to be many about I enclose a photo of mine, you guessed it is from China via eBay. The case is straight forward...

Remix from https://www.thingiverse.com/thing:1422963 for LCD that is 6.5 thick (like the one I bought here: https://arduino-shop.cz/arduino/1356-3-5-tft-lcd-shield-pro-raspberry-320-x-480-spi-rgb-dotykovy.html)

Raspberry Pi 3 Model B 3.5" TFT Raspberry LCD Touch Screen Display https://www.aliexpress.com/item/Raspberry-Pi-3-Model-B-With-3-5-TFT-Raspberry-LCD-Touch-Screen-Display-Acrylic-Case/32825680521.html?spm=a2g0s.9042311.0.0.27424c4djXhmRT HAT Board +...

raspberry pi case with touch lcd i use it on my Tenlog TL-D3 printer. It fixes under the printer with 2x M4 screws. There is a version with no fixing wings i was going to use on the frame but decided against it. ... The LCD i use is:...

... touch LCD. It is a plug-and-play device which doesn’t need install driver. The physical resolution of this LCD display is 800*480.More informations can be found here: https://osoyoo.com/2020/05/29/instruction-for-raspberry-pi-3-5-dsi-touch-screen/

accurate CAD model of UPC "6013801500024" from the SainSmart Raspberry Pi 3 Model B Ultimate Kit with 5 inch LCD (Red&White Case)https://smile.amazon.com/gp/product/B01FHEBIE0/

I bought 5 Inch Capacitive Touch Screen HDMI LCD Display for my Raspberry Pi but did not like the case and how raspberry should mount to it. ...So I decided to create my own case, found some screws, that were lying in my tool box, reused some from LCD...

it"s based on raspberry Pi and 5 inch GPIO HDMI touch screen, you can buy it from links below:http://www.52pi.com/en/lcd-display/83-5-inch-800x480-hdmi-tft-lcd-touch-screen-for-raspberry-pi-32-model-bb-ab.html and you can get the user manual from...

I could not find an enclosure for the BTT_PITFT50 (BigTreeTech"s Raspberry Pi 5" touch screen, so I modeled my own. It"s a similar profile to the Prusa i3 screen enclosure. Requires 4 M3x6 bolts and washers to hold the screen in place. ... There are...

SummaryI looked around for a Pi 3 case that would support a 5" screen but was unable to find one (lots of 3.5" and 7" screen models). So, I decided to make my own.

I could not find an enclosure for the BTT_PITFT50 (BigTreeTech"s Raspberry Pi 5" touch screen, so I modeled my own. ...It"s a similar profile to the Prusa i3 screen enclosure. Requires 4 M3x6 bolts and washers to hold the screen in place. There are...

Case for WaveShare"s 5inch LCD touch screen for the raspberry pi Instructions The mount can also used to put the case upright on a flat surface. Does not have screw holes, but should be easy enough to drill some. I do not recommend gluing only the...

This stand is for the official raspberry pi touchscreen lcd screen. It is made to stay out of the way for most projects. 4 m3 screws are need to secure the screen to stand. ... If needed rotate the display by adding the line below to /boot/config.txt...

kedei 3.5 inch spi tft lcd driver made in china

Is there a chance of getting it working with an Arduino Uno R3 or Mega2560? The graphics libraries that use SPI that I"ve found keep mentioning the RST and DC lines, which aren"t present on this board.

I haven"t had the opportunity to try it on a Raspberry Pi yet. From pinouts of raspi (googled images) they only have one long strip of GPIO/etc connectors, do they not? Even if plugging this board onto the 40-pin connector, where the two 5V pins match up, on the raspi the opposing two aren"t GND, they"re listed as "+3,3V" and "SDA". Something tells me that.. well, either I"m missing something, or this display needs some form of connector between itself and the raspi it"s meant to run off originally. (Oddly enough, they came with raspi-with-TFT-on-top plastic enclosures, which wouldn"t leave any space for rewiring pins.)

I doubt it. It would be a lot cleaner with regular SPI for both. You just change mode each time. e.g. 9-bit mode #3 for TFT. 8-bit mode #0 for the XPT.

Ah-ha. The HC595 is a shift register. They might use them to produce 16-bit parallel to drive the TFT. If they do, it will be a nightmare. Even worse than 9-bit SPI.

Well, it"ll be interesting to see if I get this to work eventually. A quick guess would be that with L_CS pulled low, the LCD chip gets to talk with the MISO/MOSI lines. After initializing it, I suppose the next step will be to (read datasheet..) and see if the MISO/MOSI-lines are used to clock out display data with L_CS high so the LCD chip doesn"t listen to that garbage, or if it is meant to be fed through the LCD chip aswell.

16-bit modules are cheaper than SPI display modules. So it is quite possible that he has crippled the display with shift registers instead of buying a proper SPI module.

Oh, this makes it easier - googling for the tarball I needed (lcd_show_v6 for my board since it"s got "v6.1" printed on it) got me to OsoYooTFT/README.md at master · jgamblin/OsoYooTFT · GitHub and http://en.kedei.net/raspberry/raspberry.html

Hrmm.. I don"t think source is included. In the lcd_show_xx blobs are just kernels and modules, with a couple of very small scripts to copy the LED or HDMI kernel to the /boot place of the filesystem. (And no error checking, if you try copying the LED kernel, it backups the original kernel, but if you then run the copy-LED-kernel command again, it happily overwrites your original kernel, leaving you with two LED-enabled kernels and no original. hrrf..)

Well, I downloaded the whole 35MB .GZ file. Unpacked it and found 3402 .ko files. I presume that these are kernel object files. Nothing that looked remotely like source files for your TFT display.

Since the ILI9481 can be driven directly by SPI, this seems a crazy way to do things. Especially since a HC595 might be clockable at 100MHz but you need to wiggle all 24-bits. And an AVR can only manage 8MHz on a good day.

Not when you consider that once you have loaded an 18 bit colour all you need to do is toggle the T_CS pin at say 10MHz and you can load the same pixels sequentially at 10Mpixels/s (=180Mbps) i.e. clear the screen faster than it is refreshed. With SPI you have to keep serially sending the same pixel N bits of colour over and over again, which is very inefficient. In the worst case (where sequential pixels are different colours) the shift register still wins if you can clock it faster than an SPI link maximum rate (easy on higher performance computers) because the same number of bits need to be clocked whatever interface is used.

This suggests more control bit are shifted in than is actually needed, but my hunch of an 18 bit + control parallel interface to the TFT seems to be correct.

Yes, I expect that bodmer or myself could probably get you working if we made some inspired guessing with the schematic. You could always email Kedei and ask him for the genuine schematic. Make sure that you tell him the Revision number(s) on the pcb.

I had success with downloading Kedei"s 4GB images specific for the 6.1 board and putting on an SD card. Now the raspi boots up, and I see the boot messages scroll by. The original article said "expect about 6fps from the display" and that seems right - it"s jerky, but works.

Well, I guess it"s no big leap to imagine the display driver being compiled into the kernel itself, since it"s present at boot-time already and not using an init-ramdisk for its modules.