User avatar
saper_2
Posts: 214
Joined: Sun Aug 03, 2014 10:08 am
Location: PL

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Sun Jun 18, 2017 11:20 am

iiAlphaWolf wrote:Hey everything is intresting and stuff, i cant help you but you can help me lol. How the heck did you make the screen even work? I put it on my pi i see backlight but no screen i do all codes they tell me still black screen... wth
What u have: display version, which RPi (1/2/3/0) , are the driver u try for exactly your display and RPi?

Gatchaman
Posts: 2
Joined: Fri Aug 04, 2017 3:55 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Fri Aug 04, 2017 4:07 pm

Thank you everyone for looking into this.

I would have never ordered the Pi3 and 3.5" kedei lcd screen from A+++ Electronics Maker, China (Guangdong) on Ali-X if I'd known how bad the situation was with this screen. :(

I have a V6.3 screen.

User avatar
saper_2
Posts: 214
Joined: Sun Aug 03, 2014 10:08 am
Location: PL

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Fri Aug 04, 2017 9:39 pm

Hi,

Yeah, KeDei SPI lcd are sh**** , the HDMI version is really nice - have it , and reviewed it :).
Anyway, all SPI lcd's for RPi are slow - there are "bad ass coders" (in very positive meaning :D ) who can push those LCDs to their limits - e.g. bitbank - respect for your knowledge :) .
At best, I can offer u advice: when you look at lcd, check how many chips are on the board - if it have 4 chips (in SO-14/SO-16 or don't have chips at all - e.g. some 3.95" LCD have 8bit parallel interface - got one of this kind too) then this display might work with fbtft (with little configuration). Those 4 chips usually ale lined up together (and those are: 2x 74HC4094 + 1x 74HC04 + 1x 74HC4040 ).

As for kedei spi v6.3, U can get compiled kernel from kedei www: http://kedei.net/raspberry/raspberry.html for Pi3 ....


Notice to the picture: I don't have this particular display model (I have it on my buy-list) so I can't tell what exactly driver it use.
Attachments
pi-lcd-4chips.jpg
pi-lcd-4chips.jpg (109.82 KiB) Viewed 1763 times

NMaas
Posts: 24
Joined: Sat May 12, 2012 2:51 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Sun Aug 06, 2017 8:47 am

Dear KeDei-haunted fellows,

seems like I'd have to join you as well. I needed some 3.5 screens for an project, long story short: Now I got 6 of the KeDei v. 6.3 sitting here doing nothing - because, you know - driver situation.

I found following Github repo, which might be interesting for the 6.2 users:
https://github.com/lzto/RaspberryPi_KeDei_35_lcd_v62

However, I can acknowledge that this 6.2 test does not work with the 6.3 screen - sadly.
(Seems like v.6.3 is sold on ebay and aliexpress most of the time now...)

However, 6.1, 6.2 and 6.3 now seemingly got the same driver ( http://kedei.net/raspberry/raspberry.html ) so there should be some way to get all 6.1-3 displays controlled in a very similar way (I guess they only change the major version if the HW designs breaks drivers, with the exclusion of 6.0 as that seems to be another beast - again).

Also, Osoyoo, which seems to be one of the biggest sellers of those Displays is really refusing to handing out the drivers ( http://osoyoo.com/2016/09/13/install-ra ... an-jessie/ ). Maybe applying some presure could help ;)?

EDIT:
The 6.3 Version uses 3x 74HC595D - and thats it. Only the TS (HR2046 1703) and a voltage regulator.
The TS seems to be compatible with the XPT2046 or https://www.ti.com/lit/ds/symlink/tsc2046.pdf

User avatar
saper_2
Posts: 214
Joined: Sun Aug 03, 2014 10:08 am
Location: PL

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Sun Aug 06, 2017 2:49 pm

NMaas wrote:
Sun Aug 06, 2017 8:47 am
Dear KeDei-haunted fellows,

seems like I'd have to join you as well. I needed some 3.5 screens for an project, long story short: Now I got 6 of the KeDei v. 6.3 sitting here doing nothing - because, you know - driver situation.
Yeah.... We know this is sucks :(
NMaas wrote:
Sun Aug 06, 2017 8:47 am
I found following Github repo, which might be interesting for the 6.2 users:
https://github.com/lzto/RaspberryPi_KeDei_35_lcd_v62

However, I can acknowledge that this 6.2 test does not work with the 6.3 screen - sadly.
(Seems like v.6.3 is sold on ebay and aliexpress most of the time now...)
Nice finding :)
I can guess, that v6.3 don't have that same register map as v6.2 so it won't work - while kernel for v6.1-6.3 set all registers even those that don't have 6.2 but have 6.3 ( and opposite).
NMaas wrote:
Sun Aug 06, 2017 8:47 am
However, 6.1, 6.2 and 6.3 now seemingly got the same driver ( http://kedei.net/raspberry/raspberry.html ) so there should be some way to get all 6.1-3 displays controlled in a very similar way (I guess they only change the major version if the HW designs breaks drivers, with the exclusion of 6.0 as that seems to be another beast - again).

Also, Osoyoo, which seems to be one of the biggest sellers of those Displays is really refusing to handing out the drivers ( http://osoyoo.com/2016/09/13/install-ra ... an-jessie/ ). Maybe applying some presure could help ;)?
You'd need to contact directly kedei, but they don't give sh*t or don't understand :lol: , I had somewhere QQ contact address to kedei, but I'm not really ready-to-install this app on my phone and/or PC - win10 is enough of spyware for me...
NMaas wrote:
Sun Aug 06, 2017 8:47 am
EDIT:
The 6.3 Version uses 3x 74HC595D - and thats it. Only the TS (HR2046 1703) and a voltage regulator.
The TS seems to be compatible with the XPT2046 or https://www.ti.com/lit/ds/symlink/tsc2046.pdf
Those are standard serial to parallel shift registers (with latched outputs).

Hmm, next clone of XPT2046 , now it's HR2046 :D ("1703" - 2017 year, 3rd week :) )

I wonder if Conjur and/or 1n4148 would spare some time, and published init dumps for v6.x kernel-driver from kedei. Probably the "6.2" code that you found, might be easily adopted (I think just adding few more lines to init sequence) to support all 6.x versions...

Well, I'm still surprised that kedei is still continuing releasing this junk (probably because people just buying this without doing some research before), it's really not difficult to add one more chip and replace those 3x'595 with 2x74HC4094+74hc4040+74hc04 - so we get a normal fbtft compatible spi to parallel interface...

ehhh.... It's much harder to each time edit code and recompile kernel than change a few lines (init seq.) in fbtft kernel module config file....

lzto
Posts: 1
Joined: Sun Aug 06, 2017 11:16 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Sun Aug 06, 2017 11:20 pm

6.1, 6.2 and 6.3 have different init sequence afaik.
I only have version 6.2 in hand so I only did it for 6.2 though I can do the same thing for 6.1 and 6.3.

:ugeek:

NMaas
Posts: 24
Joined: Sat May 12, 2012 2:51 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Mon Aug 07, 2017 12:24 am

lzto wrote: 6.1, 6.2 and 6.3 have different init sequence afaik.
I only have version 6.2 in hand so I only did it for 6.2 though I can do the same thing for 6.1 and 6.3.

:ugeek:
At the moment I still got the 6.3 display, so I could test it, if there was a way to get the init sequence out of that thing :)

NMaas
Posts: 24
Joined: Sat May 12, 2012 2:51 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Mon Aug 07, 2017 12:28 am

saper_2 wrote:
Sun Aug 06, 2017 2:49 pm
Nice finding :)
I can guess, that v6.3 don't have that same register map as v6.2 so it won't work - while kernel for v6.1-6.3 set all registers even those that don't have 6.2 but have 6.3 ( and opposite).
Most probably you're right :)!
saper_2 wrote:
Sun Aug 06, 2017 2:49 pm
You'd need to contact directly kedei, but they don't give sh*t or don't understand :lol: , I had somewhere QQ contact address to kedei, but I'm not really ready-to-install this app on my phone and/or PC - win10 is enough of spyware for me...
As long as there are people accidentally buying those... they won't change their minds I presume :/

saper_2 wrote:
Sun Aug 06, 2017 2:49 pm
I wonder if Conjur and/or 1n4148 would spare some time, and published init dumps for v6.x kernel-driver from kedei. Probably the "6.2" code that you found, might be easily adopted (I think just adding few more lines to init sequence) to support all 6.x versions...
That would be awesome - and help out other ppl as well :)
saper_2 wrote:
Sun Aug 06, 2017 2:49 pm
Well, I'm still surprised that kedei is still continuing releasing this junk (probably because people just buying this without doing some research before), it's really not difficult to add one more chip and replace those 3x'595 with 2x74HC4094+74hc4040+74hc04 - so we get a normal fbtft compatible spi to parallel interface...

ehhh.... It's much harder to each time edit code and recompile kernel than change a few lines (init seq.) in fbtft kernel module config file....
Oh yes... That is for sure... And what they're doing - is a nightmare for their sellers support team ^^'

User avatar
wtm
Posts: 2
Joined: Sat Oct 17, 2015 8:50 am

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Wed Aug 23, 2017 2:59 pm

Hello! (my first time to comment :D)

I've got the same lcd display as yours (version 1.1, identical). Your code (on GitHub) ran perfectly on my RasPi 3 (the issue on GitHub is opened by me).

Now my problem is,
  1. I want to know how the color number works, as in test 4 in your repo. As your code wrote, RED is 0xF800, GREEN is 0x07E0, and BLUE is 0x001F. That means RED and BLUE has 5 bits each, but GREEN has 6 bits(0000 0111 1110 0000). I don't quite understand that.
  • Have you ever tried to make use of the touch feature? I want to read touch events, just to make some very basic applications, like buttons. It seems that ads7846 needs to be enabled in /boot/config.txt, by putting the line
    dtoverlay=ads7846
    or something like that.
    But when Pi started up with that line, the SPI device just disappeared, and I can't get touchscreen either.
Help please!

User avatar
wtm
Posts: 2
Joined: Sat Oct 17, 2015 8:50 am

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Wed Aug 23, 2017 3:40 pm

Hello.

I've got the same KeDei lcd as yours. They should be identical, as mine is also version 1.1. I use it with my RPI 3, but recently I found that my kernel version is tooo old, and I decided to do an upgrade, and boooom...

Now I don't want to install the "driver" again. Instead, I want to control it with some codes, as you did.

Your code on GitHub worked perfectly. But I have two problems here:
  1. How does the color code function? In test 4, RED is 0xF800, GREEN is 0x07E0, and BLUE is 0x001F. I converted them into binary and found that GREEN has 6 bits (0000 0111 1110 0000), while RED and BLUE only have 5 each. Why is that?
  • How can I make use of the *touch* screen? I want to implement some basic applications, like drawing a button and read events to detect if the user touches on the button.
Thank you!

just_zhenya
Posts: 3
Joined: Mon Aug 28, 2017 12:15 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Mon Aug 28, 2017 12:19 pm

Hello guys

I have v5.0 lcd with this code https://github.com/FREEWING-JP/Raspberr ... 35_lcd_v50
Why it takes 2 spi_write on each pixel (3 bytes * 2)?
Why not send 6 bytes at once? Why is doesn't work?
Why I can't send array of pixels?

User avatar
bitbank
Posts: 200
Joined: Sat Nov 07, 2015 8:01 am
Location: Sarasota, Florida
Contact: Website

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Mon Aug 28, 2017 3:01 pm

If this display behaves like the KeiDei 3.5" SPI display that I have, (HX8357 controller), then you can also try using my C code to talk directly to it. I wrote a library to send the data as efficiently as possible to the LCD (sending as many bytes as possible in each write). You can compile it to use the kernel SPI/GPIO drivers, WiringPi, bcm2835 or PIGPIO libraries:

https://github.com/bitbank2/SPI_LCD
The fastest code is none at all :)

just_zhenya
Posts: 3
Joined: Mon Aug 28, 2017 12:15 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Tue Aug 29, 2017 8:54 pm

Nice try but it doesn't work for me.
My module doesn't even have D/C pin!

User avatar
bitbank
Posts: 200
Joined: Sat Nov 07, 2015 8:01 am
Location: Sarasota, Florida
Contact: Website

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Tue Aug 29, 2017 10:11 pm

just_zhenya wrote:
Tue Aug 29, 2017 8:54 pm
Nice try but it doesn't work for me.
My module doesn't even have D/C pin!
Please post a picture of the labeled connector of the LCD board.
The fastest code is none at all :)


User avatar
bitbank
Posts: 200
Joined: Sat Nov 07, 2015 8:01 am
Location: Sarasota, Florida
Contact: Website

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Wed Aug 30, 2017 1:43 pm

It looks like they switched LCD controllers on that model display. It doesn't need any GPIO lines for D/C nor RESET. It just has the 2 SPI chip selects for the touch controller and LCD controller. My SPI LCD code is designed for LCD controllers which require an external line to switch between D (data) and C (command). Do you know if FBTFT supports that display? If so, find out the parameters to initialize it and you'll see the name of the LCD controller. I might buy that display to add support to my library.
The fastest code is none at all :)

Gatchaman
Posts: 2
Joined: Fri Aug 04, 2017 3:55 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Mon Sep 18, 2017 10:48 am

You can read my 1 star feedback dated 03 Sep 2017 04:36 on AliExpress. Took a long time for the feedback to be posted though. Not sure why.......
https://www.aliexpress.com/item/3-5-TFT ... 57521.html

Krot
Posts: 9
Joined: Sun Oct 08, 2017 3:08 pm

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Sun Nov 05, 2017 7:39 am

Guys hello!
I have such a screen:
https://cdn1.savepice.ru/uploads/2017/1 ... 2-full.jpg
I downloaded from here: http://kedei.net/raspberry/raspberry.html
file: LCD_show_35hdmi_vertical
Through the console, I started the file inside the archive, and the drivers were installed.
But after rebooting the black screen is all the same!
I clicked all the files and still there is no image.
I'm ready to break this accursed screen!
Nothing works!

User avatar
saper_2
Posts: 214
Joined: Sun Aug 03, 2014 10:08 am
Location: PL

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Tue Nov 14, 2017 6:24 pm

Krot wrote:
Sun Nov 05, 2017 7:39 am
Guys hello!
I have such a screen:
https://cdn1.savepice.ru/uploads/2017/1 ... 2-full.jpg
I downloaded from here: http://kedei.net/raspberry/raspberry.html
file: LCD_show_35hdmi_vertical
Through the console, I started the file inside the archive, and the drivers were installed.
But after rebooting the black screen is all the same!
I clicked all the files and still there is no image.
I'm ready to break this accursed screen!
Nothing works!
! DUPLICATE ! viewtopic.php?f=45&t=175616#p1220170

Don't mix HDMI wqith SPI version.

Sorry, we (I) can not help you more, change power supply (cable?) and if this can not help than you display is bad....

R0ss
Posts: 1
Joined: Thu Nov 16, 2017 4:41 am

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Thu Nov 16, 2017 4:58 am

Translated from taobao site. All Kedei LCD driver/image can be downloaded at pan.baidu.com/s/1kVKsAF1

It has two ways to use their SPI LCD.
a. Kernel method. Use the ready-to-use img file.
b. Driver method. To install the overlay driver
tar -xzvf LCD_show_v6.tar.gz
cd LCD_show_v6
sudo apt-get update
sudo ./LCD_backup
sudo ./LCD35_v

to switch back to HDMI :
sudo ./LCD_hdmi
to restore to the state prior to the driver installation
sudo ./LCD_restore

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: jonaslorander and 13 guests