please choosego to mobile | Continue to access the PC version
Author: snowbody

fb-tft OK

[Copy link]

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-5-31 21:58:44 | Show all floors
crossmax replied at 2017-5-30 23:43
Hi,
I'm trying to show something in a 2.2" tft display (ILI9340) but I can't.
I tried with instructi ...

Can you get frame buffer device right?

You can check it by the following command.

fbset -i -fb /dev/fb8



0

threads

11

posts

58

credits

Registered member

Rank: 2

credits
58
Published in 2017-7-19 17:58:33 | Show all floors
Edited by bumtras at 2017-7-19 18:54

Hello, everyone!
I am trying to connect ili9481 tft display to OPI zero running the latest stable version of armbian, but I have no success what so ever.
The LED backlight of the display is connected directly to the power so it lights up, but shows me only white screen. The problem is that I can't get the fb driver to load.
This is what dmesg shows me:

And this is the content of /etc/modprobe.d/fbtft.conf :
  1. options fbtft_device name=flexpfb gpios=dc:3,reset:0,led:12,wr:7,cs:13,db00:6,db01:198,db02:199,db03:1,db04:19,db05:18,db06:2,db07:10 busnum=1 speed=32000000 rotate=90

  2. options flexfb width=480 height=320 buswidth=8 init=-1,0x11,-2,50,-1,0xD0,0x07,0x42,0x18,-1,0xD1,0x00,0x07,0x10,-1,0xD2,0x01,0x02,-1,0xC0,0x10,0x3B,0x00,0x02,0x11,-1,0xC5,0x03,-1,0x3A,0x55,-1,0xC8,0x00,0x32,0x36,0x45,0x06,0x16,0x37,0x75,0x77,0x54,0x0,0x00,-1,0x29,-3
Copy code

The init sequence is from notro's ili9481 driver. Also I try different combinations with different speed or replacing flexpfb with ili9481 or adding custom before name but still can't get the fb driver to load.
When I type "ls -l /dev/fb*" it shows me only fb devices from 0 to 7 there is no fb8.
Also I am linux noob and I can't compile linux version by my own, but I think it's not necessary because fbtft drivers are integrated into the kernel or into the modules.

I will be very happy if someone helps me!
Thank you!

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-7-20 08:28:08 | Show all floors
Edited by nopnop2002 at 2017-7-20 11:52
bumtras replied at 2017-7-19 17:58
Hello, everyone!
I am trying to connect ili9481 tft display to OPI zero running the latest stable ve ...

1.busnum & speed is unnecessary.
This can use only at SPI-TFT.
busnum
SPI bus number (default=0)
speed
SPI speed in Hz (default varies among displays)

2.Please confirm the connection.
dc:3,  Pin#15
reset:0, Pin#13
led:12,  Pin#3
wr:7,  Pin#12
cs:13,  Pin#24
db00:6,  Pin#7
db01:198, Pin#8
db02:199, Pin#10
db03:1,  Pin#11
db04:19, Pin#16
db05:18, Pin#18
db06:2,  Pin#22
db07:10  Pin#26

3.Try this parameter.

init=-1,0x28,-2,20,-1,0x36,0x58,-1,0x3A,0x55,-1,0x11,-2,120,-1,0x29,-2,20,-3

or

init=-1,0x28,-2,20,1,0x36,0x08,-1,0x3A,0x55,-1,0x21,-1,0x11,-2,120,-1,0x29,-2,20,-3


4.Remove /etc/modprobe.d/fbtft.conf & Reboot system & Execute by a command line & check device
sudo rm /etc/modprobe.d/fbtft.conf
sudo shutdown -r now

sudo modprobe fbtft_device name=flexpfb gpios=....
sudo modprobe flexfb width=480 height=320 buswidth=8 init=.....
ls /dev/fb*

If you try another parameter, you need to reboot system.

0

threads

11

posts

58

credits

Registered member

Rank: 2

credits
58
Published in 2017-7-20 18:36:23 | Show all floors
Thanks, nopnop2002!
Now it's almost working. I'm saying almost because now fb8 appears but the screen is still white whit yellow text and it is not rotating no matter if add "rotate=90" or not.
I'm 99% sure that the wiring is correct.
Something important that I forget to ask in the last post is that the display have 16 db pins but according to the datasheet (7.1 and 7.1.1) it can work whit only 8 so I connected db pins from 0 to 7 because I have only 2 gpio pins left on the OPI. So can it really run normally that way and should I connect the remaining 8 pins to GND?

Just to inform you the first init works, the second one again gives only white screen.

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-7-20 20:29:00 | Show all floors
Edited by nopnop2002 at 2017-7-20 21:18
bumtras replied at 2017-7-20 18:36
Thanks, nopnop2002!
Now it's almost working. I'm saying almost because now fb8 appears but the scree ...

Please try this parameter for a rotation.

With "rotate=90"
init=-1,0x28,-2,20,-1,0x36,0x58,-1,0x3A,0x55,-1,0x11,-2,120,-1,0x29,-2,20,-3
init=-1,0x28,-2,20,-1,0x36,0x38,-1,0x3A,0x55,-1,0x11,-2,120,-1,0x29,-2,20,-3

Without "rotate=90"
init=-1,0x28,-2,20,-1,0x36,0x58,-1,0x3A,0x55,-1,0x11,-2,120,-1,0x29,-2,20,-3
init=-1,0x28,-2,20,-1,0x36,0x38,-1,0x3A,0x55,-1,0x11,-2,120,-1,0x29,-2,20,-3

You can confirm the result by the following command.

con2fbmap 1 8

If a login prompt appears, your connection is right.
And you can login using USB keyboard.


0

threads

11

posts

58

credits

Registered member

Rank: 2

credits
58
Published in 2017-7-20 22:31:40 | Show all floors
Edited by bumtras at 2017-7-20 23:26

The second init fix the rotation without "rotate=90". If I add rotate=90 I need to revers the width and height values.
But still the text is yellow on white background instead of white on black. Also at login and password entering the top part of the text is cut.

P.S. Even when I type armbian-config evrything is in yellow brobably the blue light does not work, maybe it's a wiring  issue. I will check that later.

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-7-21 06:49:12 | Show all floors
Edited by nopnop2002 at 2017-7-21 09:43
But still the text is yellow on white background instead of white on black.

Can you show me picture ??

And try this(Add -1,0x21)
init=.....,-1,0x21,-1,0x11,-2,120,-1,0x29,-2,20,-3


0

threads

11

posts

58

credits

Registered member

Rank: 2

credits
58
Published in 2017-7-21 16:23:07 | Show all floors
Edited by bumtras at 2017-7-21 17:13

This change to init fix the background but the text is now blue.
There is the picture .
The background looks blue on the picture but it's actually black.
Also there is some flickering but I still don't connect the remaining 8 db pins to GND, maybe this is the problem.

P.S. I connect db pins 8-16 to GND but nothing happened.
One more picture after login.

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-7-21 20:54:53 | Show all floors
Edited by nopnop2002 at 2017-7-21 21:29
bumtras replied at 2017-7-21 16:23
This change to init fix the background but the text is now blue.
There is the picture .
The backgrou ...

I saw your picture.
So try this

Without rotation.

sudo modprobe flexfb width=480 height=320 buswidth=8 init=\
-1,0x01,-2,5,\
-1,0xD0,0x07,0x42,0x18,\
-1,0xD1,0x00,0x07,0x18,\
-1,0xD2,0x01,0x02,\
-1,0xC0,0x10,0x3B,0x00,0x02,0x11,\
-1,0xC5,0x03,\
-1,0x36,0x38,\
-1,0x3A,0x55,\
-1,0x11,-2,120,\
-1,0x29,-2,20,\
-3

With rotation.
sudo modprobe flexfb width=480 height=320 buswidth=8 init=\
-1,0x01,-2,5,\
-1,0xD0,0x07,0x42,0x18,\
-1,0xD1,0x00,0x07,0x18,\
-1,0xD2,0x01,0x02,\
-1,0xC0,0x10,0x3B,0x00,0x02,0x11,\
-1,0xC5,0x03,\
-1,0x36,0x58,\
-1,0x3A,0x55,\
-1,0x11,-2,120,\
-1,0x29,-2,20,\
-3

It's mine.But mine is Orangepi-pc.

This thread contains more resources

You need to Log in to download or view,No account?    Register

x

0

threads

11

posts

58

credits

Registered member

Rank: 2

credits
58
Published in 2017-7-21 21:56:32 | Show all floors
I try both of them but they don't work. fb8 appears but the screen stay white (con2fbmap 1 8 do nothing).
This is my display if that matters.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list