Page 1 of 2

Lcd Tft 3.5" Troubles

Posted: Mon Feb 22, 2016 5:05 pm
by mariock
Hello community, Good morning from México, Please, forgive me if i type something bad, as im not a native english speaker.

So ill start, last week i bought onw of these little screens http://www.labelectronica.com/pantalla- ... 0434466xJM but the thing is that i still cant make it work, i want the screen to work it out with EmulationStation, even better if i could put a RetroPie image there, but the thing is that i cant even make it work on Raspbian, i already have the NOOBS 1.6 installed, on that image already did the apt-get update and upgrade, i have tried these links:

https://github.com/notro/fbtft/wiki/FBTFT-on-Raspian
http://lallafa.de/blog/2015/03/fbtft-se ... -raspbian/
https://github.com/watterott/RPi-Displa ... he-display

I have read too of one guy, nostro or something like that, but that he already has his drivers on the official Raspbian image.

And i cant make the screen to work, i dont want the touch to work because EmulationStation or RetroPie are not compatible with that, but i really want to make my screen work on the raspberry so i can go on with my project.

I was thinkin if i can make work the 3.5" screen to work on the Raspbian OS, i can compile EmulationStation by myself, and then all will work.
I have read that i need to have to find a suitable DT overlay for my display, The overlays are stored in /boot/overlays but i dont know wich i can take for my screen. And then i need to search for fb1 change on one config, and im totally lost there. Is there any Raspbian OS Image out there that i can download for that screen?

Ill appreciate it a lot if i someone can help me, as the project im doing is for this Saturday for my University. Thanks a lot for your time and patiente.

Re: Lcd Tft 3.5" Troubles

Posted: Tue Feb 23, 2016 11:40 am
by DirkS
There are several of these screens that need different DT overlays.
I can't find any information to determine which one it needs.

Do you have any images / photos of the PCB? We may then be able to help you along.

Re: Lcd Tft 3.5" Troubles

Posted: Tue Feb 23, 2016 2:37 pm
by mariock
Yeah, I forgot to attach it when i first posted, Im sorry, as you can see, it says nothing about it, not even a model or something like that, and the vendor i purchased the screen with it gave no image or something i can start to work.

Re: Lcd Tft 3.5" Troubles

Posted: Wed Feb 24, 2016 7:57 am
by DirkS
Unfortunately I can't fully identify it from that picture. It looks similar to other screens I have seen, but I can't be sure if it's similar enough to try to use their drivers.
Have they given you an OS image to make it work?
Or any kind of instructions?

Re: Lcd Tft 3.5" Troubles

Posted: Wed Feb 24, 2016 3:21 pm
by mariock
They just sent me this image yesterday, i used it and worked, but the image is so outdated, it says it is from early 2014, i tried to do the sudo apt-get update, sudo apt-get upgrade and pi-update but nothing happened, the image just stay there, and cant even configure a wifi dongle http://www.navego.labelectronica.com/An ... 35_img.zip that is the img they sent me, i really wanted to at least upgrade that Raspbian and install there the retropie project but when i did it the screen stoped working.

Re: Lcd Tft 3.5" Troubles

Posted: Wed Feb 24, 2016 11:38 pm
by DirkS
I'm downloading it now. If I have a bit of time I'll try to figure out how it's configured.

Re: Lcd Tft 3.5" Troubles

Posted: Thu Feb 25, 2016 4:26 am
by mariock
Wow. Many thanks if you can give me a hand.

Re: Lcd Tft 3.5" Troubles

Posted: Thu Feb 25, 2016 9:22 pm
by DirkS
From the configuration used on the SD card image it looks as if this is another Waveshare clone.

The following should get it going:
* download overlays from https://github.com/swkim01/waveshare-dtoverlays and copy the overlay for the 3.5" screen to /boot/overlays
(see detailed instructions on github)
* add to /boot/config.txt

Code: Select all

dtparam=spi=on
dtoverlay=waveshare35a
* To get output to the screen at the earliest possible moment (after loading the driver) you can add

Code: Select all

fbcon=map:1
to the end of the (only) line in /boot/cmdline.txt

Touch setup
* create touchscreen device: create /etc/udev/rules.d/95-ads7846.rules

Code: Select all

SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="ADS7846*", SYMLINK+="input/touchscreen"
* Calibration: create /etc/pointercal

Code: Select all

-26 -8689 33949688 -5739 -126 22326060 65536
I got these values from the image, so they should work OK for you

Configuration for X
*create /etc/X11/xorg.conf.d/99-fbdev.conf

Code: Select all

Section "Device"
  Identifier "myfb"
  Driver "fbdev"
  Option "fbdev" "/dev/fb1"
EndSection
* Touch calibration: create /etc/X11/xorg.conf.d/99-calibration.conf

Code: Select all

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "3932 300 294 3801"
        Option  "SwapAxes"      "1"
EndSection

HTH

Re: Lcd Tft 3.5" Troubles

Posted: Fri Feb 26, 2016 2:20 pm
by mariock
Thank you so much for your response and time helping me, i appreaciatte it so much, ill try out today, ill tell you how it goes. And again, thank you for your time.

Re: Lcd Tft 3.5" Troubles

Posted: Fri Feb 26, 2016 3:45 pm
by mariock
I already did everything, when the pi starts, i can see a bit of the start code on the screen, then in turn blacks and the only thing i see is this. I remember someone told on the forum to run from ssh this code

Code: Select all

con2fbmap 1 1
But nothing happens, may the problem be that i could not create this item create /etc/X11/xorg.conf.d/99-fbdev.conf, when i type the command it says that the directory or item dont exists, ill try it again on a fresh raspbian image later today.

Re: Lcd Tft 3.5" Troubles

Posted: Sat Feb 27, 2016 12:19 am
by DirkS
Are you booting to the desktop or the command line?
For testing etc, I would choose boot to command line.

I forgot to mention that you may have to move the 'turbo config' out of the way:

Code: Select all

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
I just noticed that other instructions place the 99-fbdev.conf file in that directory, and not in /etc/X11/xorg.conf.d/
I don't know if that makes a difference, but you could give that a try.

It is possible that the X config directory does not exist. Just create it.
NB: Path is case sensitive!

BTW: the con2fbmap has the same function as 'fbcon=map' parameter in cmdline.txt.
It maps framebuffers to terminals.

Re: Lcd Tft 3.5" Troubles

Posted: Tue Mar 01, 2016 9:33 pm
by mariock
Sadly for me, the screen does not work, i already did everything i could do, and my head is a mess, 2 weeks trying a thing to work its kind of stressfull, and its disappointing me as well. as i cant have any support of a company because the screen i bought on internet its a clone, i think ill just save it on a drawer. Thanks anyways for your help and sorry for wasting your time.

Re: Lcd Tft 3.5" Troubles

Posted: Tue Mar 01, 2016 10:47 pm
by DirkS
I would give it another go at some point...

Re: Lcd Tft 3.5" Troubles

Posted: Sun Mar 06, 2016 1:13 pm
by midmofarmer
mariock wrote:Sadly for me, the screen does not work, i already did everything i could do, and my head is a mess, 2 weeks trying a thing to work its kind of stressfull, and its disappointing me as well. as i cant have any support of a company because the screen i bought on internet its a clone, i think ill just save it on a drawer. Thanks anyways for your help and sorry for wasting your time.

i had to revert to factory noobs v1_6_0 and it stops when i upgrade update

Re: Lcd Tft 3.5" Troubles

Posted: Sun Mar 06, 2016 1:16 pm
by DougieLawson
midmofarmer wrote: i had to revert to factory noobs v1_6_0 and it stops when i upgrade update
Grab a copy of NOOBS V1.8 and try that.
https://www.raspberrypi.org/downloads/noobs

Re: Lcd Tft 3.5" Troubles

Posted: Mon Mar 14, 2016 11:20 pm
by mariock
Is there any way to update the SD Image they provided me so i can use for example the NOOBS 1.8 version but wth those drivers so the screen can still work but on a updated OS?

Re: Lcd Tft 3.5" Troubles

Posted: Mon Mar 14, 2016 11:38 pm
by DougieLawson
Not without building your own kernel, unless the TFT is supported by one of the drivers defined in /boot/overlays. Take a look at /boot/overlays/README.

Re: Lcd Tft 3.5" Troubles

Posted: Mon Mar 14, 2016 11:48 pm
by DirkS
DougieLawson wrote:Not without building your own kernel, unless the TFT is supported by one of the drivers defined in /boot/overlays. Take a look at /boot/overlays/README.
Plus some available elsewhere, such as https://github.com/swkim01/waveshare-dtoverlays

Re: Lcd Tft 3.5" Troubles

Posted: Tue Mar 15, 2016 6:23 pm
by mariock
The thing is that i tried so many times to put an overlay that can work with that LCD and didnt work, that the only thing i want know its just upgrade that OS i already have witht the screen working, for example yesterday i did on that image apt-get update, apt-get upgrade, but for example, i dont have the wifi icon, some things that are minor, but are so usefull. When i got home today later ill use

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install raspberrypi-net-mods -y
and if that works, i pretty much have the image up to date, and the next step will be to try to setup emulationstation working on that LCD, as i mentioned at the being of the post, tahts my goal

Re: Lcd Tft 3.5" Troubles

Posted: Thu Mar 17, 2016 5:34 pm
by mariock
Ok, so far the screen now works, but not works as is intended to be, it has all the colors messed up, but at least im able to see. Im trying to find out how can i fix that, i tried to put the configs on the image they sent me on the retropie image, but it didnt work, the only overlay i was able to put and get image on the screen was the waveshare35a, im using these settings:

/boot/config.txt

Code: Select all

dtparam=i2c_arm=on
hdmi_force_hotplug=1
hdmi_cvt=320 240 60 1 0 0 0
hdmi_group=2
hdmi_mode=87

dtoverlay=waveshare35a,rotate=90,speed=80000000,fps=60
i attach an image how the screen is working, any advice? Im using the rpi-fbcp tool, i kind of followed the instructions listed here https://learn.adafruit.com/running-open ... itft-setup but i replaced the part when they put the adafruit pitft helper as im using a waveshare clone.

Re: Lcd Tft 3.5" Troubles

Posted: Thu Mar 17, 2016 6:45 pm
by mariock
Post update, not the screen totally works, the only thing is the very low fps that is getting, is there any way to speed it up? it has almost 1 second of "lag" and for a gaming experience is totally a disaster...

Re: Lcd Tft 3.5" Troubles

Posted: Thu Mar 17, 2016 7:29 pm
by DirkS
mariock wrote:Post update, not the screen totally works, the only thing is the very low fps that is getting, is there any way to speed it up? it has almost 1 second of "lag" and for a gaming experience is totally a disaster...
I assume you're using fbcp?
I don't really have any experience with that (and I don't use my Pi for gaming at all).

Re: Lcd Tft 3.5" Troubles

Posted: Thu Mar 17, 2016 9:48 pm
by mariock
Yes Im using fbcp, but the low quality on the screen is laggy on Raspbian too, i was thinking on lower a bit the fps on the /boot/confg.txt, right now and in the image they sent me its configured at 60, if i put for example 30 do you think it will make any difference? or how can i improve the screen image quality? Btw. i want to thank you for the information you provided me as was very usefull. I needed some time to clarify my mind, now im happy inwas able to configure the lcd

Re: Lcd Tft 3.5" Troubles

Posted: Thu Mar 17, 2016 10:13 pm
by DirkS
60fp seem to be quite high for this kind of screens. Most I have seen are set to 25 - 30fps.
I'm no expert, but I can imagine that this would have a negative effect when used with fpcp.
I think AndyD wrote a version that's more efficient. (I thinks it's https://github.com/AndrewFromMelbourne/raspi2fb). Maybe you can give that a try.

Another factor is the SPI bus frequency. I don't know what the setting is in the official Waveshare image, but https://github.com/swkim01/waveshare-dt ... verlay.dts states a max of 16000000

Don't know too much about these things, though, and I may be talking rubbish :lol:

Re: Lcd Tft 3.5" Troubles

Posted: Thu Mar 17, 2016 10:39 pm
by mariock
O well, ill give it a try tomorrow, lets see how it goes. Thanks for the resources..