Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small tft display
#1
Hi all!

I'm trying to start 3,5 tft display using fbtft. I connecting to Orangepi via rs232 terminal. So i already startx using this tool but display starts work only after i enter command "startx". After that i see xfce desktop.

Please help me to start this display at boot. I don't know linux at well and don't know what i need to do/learn at first. I think i need some method to set hdmi resolution to 480x320, remap it to some framebuffer and after that configure fbtft_device driver to use selected framebuffer. But i don't shure and i don't know how to do it.

I'm sorry by my English.
Reply
#2
we never had a display like that, so we cannot support officially. Maybe you should drop by the facebook group to try your luck.
Reply
#3
(08-10-2017, 07:18 PM)korrmet Wrote: Hi all!

I'm trying to start 3,5 tft display using fbtft. I connecting to Orangepi via rs232 terminal. So i already startx using this tool but display starts work only after i enter command "startx". After that i see xfce desktop.

Please help me to start this display at boot. I don't know linux at well and don't know what i need to do/learn at first. I think i need some method to set hdmi resolution to 480x320, remap it to some framebuffer and after that configure fbtft_device driver to use selected framebuffer. But i don't shure and i don't know how to do it.

I'm sorry by my English.

Strange that you will see with startx... Orange PI should not change resolution....
Maybe is an "overscan issue" so login is in the first line at top... and you dont see nothing... try to fill screen pressing random keys.
Wich display? do you have a link for buy?
Reply
#4
(08-11-2017, 10:01 AM)Lamerjack Wrote: Strange that you will see with startx... Orange PI should not change resolution....
Maybe is an "overscan issue" so login is in the first line at top... and you dont see nothing... try to fill screen pressing random keys.
Wich display? do you have a link for buy?

Thank you for reply Smile

I use chinese clone of waveshare display. There is it:
 http://s.aliexpress.com/YbABJn26 

I connect it to my OrangePi One. After that i connect using rs232 and login as root and create:
/etc/modules-load.d/fbtft.conf
Code:
fbtft
flexfb
fbtft_device
/etc/modprobe.d/fbtft.conf
Code:
options fbtft dma=0
options flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
options fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:2,dc:71 txbuflen=32768 fps=25
/usr/share/X11/xorg.conf.d/99-fbdev.conf (this file not present too)
Code:
Section "Screen"
Identifier "My Screen"
Device "Allwinner A10/A13 FBDEV"
Monitor "My Monitor"
EndSection

Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb8"
Option "SwapbuffersWait" "true"
Option "AccelMethod" "G2D"
EndSection

Section "Monitor"
Identifier "My Monitor"
Option "DPMS" "false"
EndSection

After that i reboot. Display successfully connected after boot and fill all screen black. I login and type: "startx".
I tried all framebuffers (fb0-fb8) and it does not effect.
So, that's all. I don't know what i actually do. I'm only use manual at local website. If it is not too hard maybe explain me why need to create these files. I think it have some rules of naming of files.
I'm sorry by my English, i hope you can recognize this text Smile Thank you and have a nice day.
Reply
#5
(08-11-2017, 07:01 PM)korrmet Wrote:
(08-11-2017, 10:01 AM)Lamerjack Wrote: Strange that you will see with startx... Orange PI should not change resolution....
Maybe is an "overscan issue" so login is in the first line at top... and you dont see nothing... try to fill screen pressing random keys.
Wich display? do you have a link for buy?

Thank you for reply Smile

I use chinese clone of waveshare display. There is it:
 http://s.aliexpress.com/YbABJn26 

I connect it to my OrangePi One. After that i connect using rs232 and login as root and create:
/etc/modules-load.d/fbtft.conf
Code:
fbtft
flexfb
fbtft_device
/etc/modprobe.d/fbtft.conf
Code:
options fbtft dma=0
options flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
options fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:2,dc:71 txbuflen=32768 fps=25
/usr/share/X11/xorg.conf.d/99-fbdev.conf (this file not present too)
Code:
Section "Screen"
Identifier "My Screen"
Device "Allwinner A10/A13 FBDEV"
Monitor "My Monitor"
EndSection

Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb8"
Option "SwapbuffersWait" "true"
Option "AccelMethod" "G2D"
EndSection

Section "Monitor"
Identifier "My Monitor"
Option "DPMS" "false"
EndSection

After that i reboot. Display successfully connected after boot and fill all screen black. I login and type: "startx".
I tried all framebuffers (fb0-fb8) and it does not effect.
So, that's all. I don't know what i actually do. I'm only use manual at local website. If it is not too hard maybe explain me why need to create these files. I think it have some rules of naming of files.
I'm sorry by my English, i hope you can recognize this text Smile Thank you and have a nice day.
Ok, previously i read quickly your question.
So my answer was wrong. My linux experience is low but seems that you modified settings for x server.
To check this, you can do a quick test. connect the hdmi to a monitor, you should see the prompt...
When you will start X you should see on the small lcd and have no update on the hdmi monitor.
To enable video out at boot, you should use bin2fex to create a fex file edit it and the recreate the fexfile with fex2bin command.
here info about fex file structure...
http://linux-sunxi.org/Fex_Guide
no idea about how set it for lcd but is a good start for start searching...
Anyway i ordered the same lcd so in 2 months i will be on the same boat! Wink
Reply
#6
More info.
Is a display SPI
so have a look in  "spi configuration" of the link that i sent you.

SPI is Synchronous - That means that the clock signal accompanies the data signal. 
MOSI - Master Out Slave In; 
MISO - Master In Slave Out; 
SCK - Clock signal from master to slave; 
SS - Slave Select signal selects salve devices. 
SPI is a bus and can have multiple devices on the bus. Because of a clock signal present, SPI can be operated faster than UART.

so according to info of your lcd 
LCD_SI / TP_SI SPI data input of LCD/Touch Panel should be MOSI (pin 19)
TP_SO SPI data output of Touch Panel  should be MISO (pin21)
LCD_SCK / TP_SCK SPI clock of LCD/Touch Panel should be SCK (pin23)
LCD_CS LCD chip selection, low active maybe is SS (pin24)
no idea of what is LCD_RS Instruction/Data Register selection

so you should add something like

Code:
[spi1_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs0 = port:PA00<3><default><default><default>
spi_sclk = port:PA01<3><default><default><default>
spi_mosi = port:PA02<3><default><default><default>
spi_miso = port:PA03<3><default><default><default>
spi_cs1 = port:PA04<3><default><default><default>
or
Code:
[spi1_para]
spi_used = 0
spi_cs_bitmap = 1
spi_cs1 = port:PI15<2><default><default><default>
spi_cs0 = port:PI16<2><default><default><default>
spi_sclk = port:PI17<2><default><default><default>
spi_mosi = port:PI18<2><default><default><default>
spi_miso = port:PI19<2><default><default><default>

putting the correct port..
but in the link there is also a part related to lcd[0/1] configuration
where is contemplated reset pin (but not mosi and miso)

Ok i think that you have enough info for loose sleep several weeks! Wink
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Just a small suggestion/curiosity/rant? niabi 3 1,060 01-26-2017, 10:30 PM
Last Post: niabi

Forum Jump:


Users browsing this thread: 1 Guest(s)