zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Tft itdb2-2.4E screen

Fri May 08, 2015 8:42 am

Hi,

I have a problem using itdb2-2.4e tft screen.

2 months ago, I managed to use it. To do so, I followed these intructions :
https://github.com/notro/fbtft/wiki#install

Here is what I did :

Code: Select all

sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
then

Code: Select all

sudo modprobe fbtft_device name=itdb24 gpios=db0:17,db1:18,db2:27,db3:22,db4:23,db5:24,db6:25,db7:4,cs:8,dc:2,wr:3,reset:7
and

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
Then few days ago, I decided to go on, and updated my Raspberry. And now, it doesn't work any more.

So I restarted from scratch, with last raspbian image, then :

Code: Select all

sudo apt-get update && sudo apt-get dist-upgrade && sudo rpi-update 
I followed notro's wiki. I see that there has been modifications but I don't understand where to start.

Do I have to use Tree method ?
If not, what do I have to do ?

Thank's for your help

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Sun May 10, 2015 1:45 am

Notro's fbtft drivers are now included in the Raspberry Pi Foundation kernel. You no longer need to get the kernel from github. I would try the following:-

1) Update Raspbian, so you have the latest (stable) firmware and kernel

Code: Select all

sudo apt-get update
sudo apt-get upgrade
2) Enable spi. Easiest way to do this is with raspi-config

Code: Select all

sudo raspi-config
Choose option 8 Advanced Options, then A6 SPI.
The reboot to enable SPI.

3)Try your modprobe/startx commands

Code: Select all

sudo modprobe fbtft_device name=itdb24 gpios=db0:17,db1:18,db2:27,db3:22,db4:23,db5:24,db6:25,db7:4,cs:8,dc:2,wr:3,reset:7

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
4) If that works ... make it permanent by adding the following to /etc/modules

Code: Select all

fbtft_device name=itdb24 gpios=db0:17,db1:18,db2:27,db3:22,db4:23,db5:24,db6:25,db7:4,cs:8,dc:2,wr:3,reset:7

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Tft itdb2-2.4E screen

Sun May 10, 2015 8:12 am

AndyD wrote: 4) If that works ... make it permanent by adding the following to /etc/modules

Code: Select all

fbtft_device name=itdb24 gpios=db0:17,db1:18,db2:27,db3:22,db4:23,db5:24,db6:25,db7:4,cs:8,dc:2,wr:3,reset:7
For some of the displays there's a device tree overlay in /boot/overlays so you can add

Code: Select all

dtoverlay=xxxx gpios=yyy:zzz
to /boot/config.txt.

Although when I look in the source code for the Linux kernel the itdb24 doesn't yet have an overlay. But it does have

Code: Select all

					{ "reset", 7 },
					{ "dc", 0 }, 	/* rev 2: 2 */
					{ "wr", 1 }, 	/* rev 2: 3 */
					{ "cs", 8 },
					{ "db00", 17 },
					{ "db01", 18 },
					{ "db02", 21 }, /* rev 2: 27 */
					{ "db03", 22 },
					{ "db04", 23 },
					{ "db05", 24 },
					{ "db06", 25 },
					{ "db07", 4 },
so we can simplify the /etc/modules line to

Code: Select all

fbtft_device name=itdb24
and it will work.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Sun May 10, 2015 5:38 pm

@SUPRA

I haven't tried yet. I'll tell you when.
DougieLawson wrote:
AndyD wrote:
I have already done that, but I've just done it (Maybe I made something wrong last time) and it doesn't work.

Thank you all for your answers

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Sun May 10, 2015 10:52 pm

In putting together the steps above, I found that the spi module had been black listed, and my display stopped working. Check the file /etc/modprobe.d/raspi-blacklist.conf and make sure that the line that black lists the spi module is commented out

Code: Select all

#blacklist spi-bcm2708
zhebulonn wrote:@SUPRA
I haven't tried yet. I'll tell you when...
The tutorial linked by @supra also uses Notro's repository from github. It is a problem when things change that there are so many tutorials around that are no longer up to date. I would really suggest not using the firmware/kernel from Notro's github repository.

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Mon May 11, 2015 3:21 am

Also, are there any error messages? Do you see anything in the boot messages?

You could post the output of demsg. I am using a MZTX-PI-EXT 2.5" IPS Display with the fbtft_device. Here is the output I get from dmesg.

Code: Select all

...
[    5.136960] bcm2708_spi 20204000.spi: master is unqueued, this is deprecated
[    5.291096] bcm2708_spi 20204000.spi: SPI Controller at 0x20204000 (irq 80)
...
[   11.635183] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[   11.657995] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[   11.674442] fbtft_device:  SPI devices registered:
[   11.677453] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
[   11.680312] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[   11.683068] fbtft_device:  'fb' Platform devices registered:
[   11.693738] fbtft_device:      bcm2708_fb id=-1 pdata? no
[   11.696818] fbtft_device: Deleting spi0.0
[   11.702697] fbtft_device:  GPIOS used by 'waveshare22':
[   11.710850] fbtft_device:    'reset' = GPIO23
[   11.713551] fbtft_device:    'dc' = GPIO25
[   11.724169] fbtft_device:  SPI devices registered:
[   11.726735] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[   11.729129] fbtft_device:      fb_bd663474 spi0.0 32000kHz 8 bits mode=0x03
[   11.748061] fb_bd663474: module is from the staging directory, the quality is unknown, you have been warned.
[   12.499671] graphics fb1: fb_bd663474 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Mon May 11, 2015 7:55 pm

I think there is a problem with my screen, because even the demo from here :http://blog.iteadstudio.com/raspberry-p ... -lcd-demo/ doesn't work.

And it used to work, I tried it before using notro's method.
There is two informations about the driver, on the product page of ited studio, it is sayed that the driver is ILI9325. But the downloads page, in Datasheet section, the driver is S6d1121.

I've managed to make it working. But not anymore.


Edit: I made a mistake (16 bit mode...), raspberry-pi-with-tft-lcd-demo works fine.

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Mon May 11, 2015 9:20 pm

The itdb24 driver is for the s6d1121 chip set. The RPILCD code has different initializes for different displays. How did you modify lcddemo.c (from RPILCD) to get it working for your display? When I downloaded it it was set up for a 2.8 inch display. The code for the 2.4 inch display is consistent with the s6d1121 chip set.

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Tue May 12, 2015 5:25 am

supra wrote:
AndyD wrote:The itdb24 driver is for the s6d1121 chip set. The RPILCD code has different initializes for different displays. How did you modify lcddemo.c (from RPILCD) to get it working for your display? When I downloaded it it was set up for a 2.8 inch display. The code for the 2.4 inch display is consistent with the s6d1121 chip set.
There are library for both ili9325 and s6d1121:
https://github.com/notro/fbtft
Yes, there are. At the start of this thread @zhebulonn was using the itdb24 driver which is for the s6d1121 chip set. Now the OP appears to be unclear which chip set the screen has. The OP has said that the RPILCD code works. I have looked at the code and depending on how it is used, it can drive/demo different screen using different chip sets. It would now be best if we can clarify which chip set the display actually has and suggest the correct device name from Notro's fbtft. Once that has been worked out we may be able to help the OP problem solve until the display is working.

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Tue May 12, 2015 5:58 pm

AndyD wrote:The itdb24 driver is for the s6d1121 chip set. The RPILCD code has different initializes for different displays. How did you modify lcddemo.c (from RPILCD) to get it working for your display? When I downloaded it it was set up for a 2.8 inch display. The code for the 2.4 inch display is consistent with the s6d1121 chip set.
I changed

Code: Select all

SetLCDSize(LCD_28)
to

Code: Select all

SetLCDSize(LCD_24);
supra wrote:Did you get touchscreen working?
I haven't tried yet.
AndyD wrote: Yes, there are. At the start of this thread @zhebulonn was using the itdb24 driver which is for the s6d1121 chip set. Now the OP appears to be unclear which chip set the screen has. The OP has said that the RPILCD code works. I have looked at the code and depending on how it is used, it can drive/demo different screen using different chip sets. It would now be best if we can clarify which chip set the display actually has and suggest the correct device name from Notro's fbtft. Once that has been worked out we may be able to help the OP problem solve until the display is working.
Yes, I managed to make it work using itdb24 driver. I'll try with ili9325.

Here is the resulte of dmesg

Code: Select all

fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[   57.818594] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[   57.822699] fbtft_device:  SPI devices registered:
[   57.822749] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
[   57.822769] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[   57.822782] fbtft_device:  'fb' Platform devices registered:
[   57.822835] fbtft_device:      bcm2708_fb id=-1 pdata? no
[   57.823155] fbtft_device:  GPIOS used by 'itdb24':
[   57.823180] fbtft_device:    'db0' = GPIO17
[   57.823194] fbtft_device:    'db1' = GPIO18
[   57.823205] fbtft_device:    'db2' = GPIO27
[   57.823221] fbtft_device:    'db3' = GPIO22
[   57.823234] fbtft_device:    'db4' = GPIO23
[   57.823245] fbtft_device:    'db5' = GPIO24
[   57.823256] fbtft_device:    'db6' = GPIO25
[   57.823268] fbtft_device:    'db7' = GPIO4
[   57.823279] fbtft_device:    'cs' = GPIO8
[   57.823290] fbtft_device:    'dc' = GPIO2
[   57.823301] fbtft_device:    'wr' = GPIO3
[   57.823312] fbtft_device:    'reset' = GPIO7
[   57.823321] fbtft_device:  'fb' Platform devices registered:
[   57.823365] fbtft_device:      bcm2708_fb id=-1 pdata? no
[   57.823412] fbtft_device:      fb_s6d1121 id=0 pdata? yes
[   57.857812] fb_s6d1121: module is from the staging directory, the quality is unknown, you have been warned.
[   58.112908] graphics fb1: fb_s6d1121 frame buffer, 240x320, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Tue May 12, 2015 11:22 pm

zhebulonn wrote:Yes, I managed to make it work using itdb24 driver
That is good news that you got it to work. What was the missing part of the puzzle?
zhebulonn wrote:I'll try with ili9325.
Now that you have it working with the itdb24 driver you now know that it is using the s6d1121 chip set. It won't work using the ili9325 drivers.

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Wed May 13, 2015 6:38 am

AndyD wrote:
zhebulonn wrote:Yes, I managed to make it work using itdb24 driver
That is good news that you got it to work. What was the missing part of the puzzle?
zhebulonn wrote:I'll try with ili9325.
Now that you have it working with the itdb24 driver you now know that it is using the s6d1121 chip set. It won't work using the ili9325 drivers.
No, :D I made it work two month ago with itdb24. But not now :cry: .

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Wed May 13, 2015 10:57 am

zhebulonn wrote:No, :D I made it work two month ago with itdb24. But not now :cry: .
OK, so that was confusing... so lets continue.

The output of demsg looks OK to me. It appears to be creating the framebuffer device.

When the Raspberry Pi boots up, try the following command and post the results:-

Code: Select all

fbset -fb /dev/fb1 

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Wed May 13, 2015 5:51 pm

Here is the result :

Code: Select all

pi@raspberrypi ~ $ fbset -fb /dev/fb1
open /dev/fb1: No such file or directory
After

Code: Select all

sudo modprobe fbtft_device name=itdb24 ....
/dev/fb1 exists :

Code: Select all

pi@raspberrypi ~ $ fbset -fb /dev/fb1

mode "240x320"
    geometry 240 320 240 320 16
    timings 0 0 0 0 0 0 0
    nonstd 1
    rgba 5/11,6/5,5/0,0/0
endmode

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Wed May 13, 2015 11:52 pm

zhebulonn wrote:

Code: Select all

sudo modprobe fbtft_device name=itdb24 ....
/dev/fb1 exists :

Code: Select all

pi@raspberrypi ~ $ fbset -fb /dev/fb1

mode "240x320"
    geometry 240 320 240 320 16
    timings 0 0 0 0 0 0 0
    nonstd 1
    rgba 5/11,6/5,5/0,0/0
endmode
So, the frame buffer is being created. Is there any change to the screen when you issue the "sudo modprobe fbtft_device ..." command?

What happens if you run the following after you have loaded the module with "sudo modprobe fbtft_device ..."

Code: Select all

FRAMEBUFFER=/dev/fb1 startx

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Thu May 14, 2015 7:55 am

AndyD wrote: So, the frame buffer is being created. Is there any change to the screen when you issue the "sudo modprobe fbtft_device ..." command?
No, there is no change on the screen.
AndyD wrote:What happens if you run the following after you have loaded the module with "sudo modprobe fbtft_device ..."

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
Nothing happens.

Code: Select all

pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx


X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
Current Operating System: Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708.boardrev=0xd bcm2708.serial=0xfdbd404f smsc95xx.macaddr=B8:27:EB:BD:40:4F bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 11 February 2015  09:31:17PM
xorg-server 2:1.12.4-6+deb7u6 (Julien Cristau <jcristau@debian.org>) 
Current version of pixman: 0.33.1
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu May 14 09:53:52 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Tft itdb2-2.4E screen

Thu May 14, 2015 9:18 am

I am sorry to say that I am out of suggestions. I really don't understand what is going on. I had a look at the RPILCD code and translated all the GPIO pin settings and they match exactly the pins for the itdb24 display. I really can't understand why the RPILCD code is working, but the fbtft driver isn't.

zhebulonn
Posts: 16
Joined: Sat Feb 14, 2015 10:57 am
Location: France
Contact: Website

Re: Tft itdb2-2.4E screen

Thu May 14, 2015 6:09 pm

Thank you for your answers.

I'll keep on searching.

Return to “Beginners”