please choosego to mobile | Continue to access the PC version
View: 8148|Reply: 3

Orange Pi Zero + SPI + LCD (no one errors and white screen)[SOLVED]

[Copy link]

1

threads

3

posts

20

credits

Novice

Rank: 1

credits
20
Published in 2018-8-21 01:25:23 | Show all floors |Read mode
Edited by Andrey_Kosinski at 2018-8-21 18:20

Hi all! I try use this  LCD (I think in is piretes Waveshare I bought it there Aliexpress ) I used tutorial  https://forum.armbian.com/topic/4656-orangepi-zero-mainline-kernel-spi-lcd-touchscreen/
I want see console on my LCD.
Result:
C:\Users\metrolog\Desktop\photo_2018-08-20_00-17-24.jpg


After :
modprobe fbtft_device custom name=fb_ili9341 gpios=dc:3,reset:0,led:6 speed=16000000 busnum=1

dmesg|tail :
[   89.816317] spidev spi1.0: spidev spi1.0 50000kHz 8 bits mode=0x00
[   89.816430] spidev spi1.0: Deleting spi1.0
[   89.817290] fbtft_device: GPIOS used by 'fb_ili9341':
[   89.817301] fbtft_device: 'dc' = GPIO3
[   89.817304] fbtft_device: 'reset' = GPIO0
[   89.817306] fbtft_device: 'led' = GPIO6
[   89.817319] spi spi1.0: fb_ili9341 spi1.0 16000kHz 8 bits mode=0x00
[   89.824979] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.
[   90.168802] Console: switching to colour frame buffer device 30x40
[   90.169529] graphics fb0: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB buffer memory, fps=20, spi1.0 at 16 MHz



Sometimes I will see
[  270.793150] g_serial gadget: high-speed config #2: CDC ACM config
[  270.793182] gs_console_connect: port num [0] is not support console

armbianEnv.txt:
verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=usbhost2 usbhost3
rootdev=UUID=a2c25aee-d15d-4aa7-8f41-ab6bb511776f
rootfstype=ext4
user_overlays=myili9431
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u


This thread contains more resources

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

x

1

threads

3

posts

20

credits

Novice

Rank: 1

credits
20
 Author| Published in 2018-8-21 18:20:17 | Show all floors
1. Install Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113 (Very important Unbuntu, not Debian.)
    because Unbunta have driver for LCD from the box.
2. Now you must will know what chip used your LCD in my case ili9486. (My LCD)
    Very important knows what chip you use!!! If you will wrong then LCD do not worked.
3. type in consile :  sudo modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 rotate=90
4. and type : sudo con2fbmap 1 8

P.S. Source comment from Agge  Comment link

6

threads

37

posts

176

credits

Registered member

Rank: 2

credits
176
Published in 2018-12-22 07:21:12 | Show all floors
I started with Armbian_5.35_Orangepizero_Ubuntu_xenial_next_4.13.16 and fully updated it to Ubuntu 16.04.5

  1. modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1
Copy code


works, but only after following https://forum.armbian.com/topic/ ... pi-lcd-touchscreen/ which explains I first need to run some armbian-add-overlay myili9431.dts  command ...

and when I try

  1. modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 rotate=90
Copy code


the output is kind of rotated, but characters are hard to read.

Did you try to use a recent image ?

6

threads

37

posts

176

credits

Registered member

Rank: 2

credits
176
Published in 2018-12-23 02:05:57 | Show all floors
I got it working. Finally.

So, the screen I am using is
https://www.fasttech.com/p/5321900
which is similar to Quimat from amazon.
It's a classic XPT2046 / ili9486

The pi is Orange Pi Zero H2+ 256MB.

I had to downgrade to the image you recommended, and it worked almost immediately: Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113.7z The key point is to use a 3.4 kernel; in short, not a 4.* . Kernel 4 bring many modifications in Armbian. Many people are in trouble porting SPI projects between those two kernels; and a project that works with on major, does not with the other.

Then, things are smooth:
modprobe fbtft_device custom name=fb_ili9486 gpios=dc:18,reset:2 speed=16000000 busnum=1 rotate=270
without adding dt-overlay in /boot/armbianEnv.txt (required for kernels 4.* )

To get consoles:
  1. # https://www.willprice.org/2017/09/16/adventures-with-tft-screens-for-raspberry-pi.html
  2. fb=8; for tty in {1..14}; do echo "$tty to fb $fb"; con2fbmap $tty $fb; sleep 1; done
  3. # Check your FB number with this:
  4. # dmesg | grep fb_ili9486 | grep graphics
Copy code


Fill /etc/X11/xorg.conf.d/99-fbturbo.conf (see link just above), and fix the fb number according to your system. I don't understand why I got FB8 while Andrey reports FB1.

run startx or xinit .

I have spent days on 4.* kernels; I give up.

I will put the opi directly behind the LCD using two 90° headers.

I don't need touchpad, so I give up on this accessory.

So, this LCD can do what I need. Just, NOT with an up-to-date distribution.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list