|
Edited by bmoir556114 at 2017-2-5 01:23
Hi
I am trying to use this lcd https://www.aliexpress.com/item/ ... 13010608.0.0.dJRjkn on my Orangepi PC Plus, but unsucesfully so far.As I've seen posts on this forum of people that managed to make it work, somebody might have a idea of what's wrong in my setup?
Note that the LCD works fine when plugged on a RaspberryPi, using the image provided by Waveshare (http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)). So their is no faulty LCD hardware here, and no miss-identification of the LCD.
Here is what I did, using an Armbian image (both desktop and server, same result) :
1. First, to be sure of the requiered pins, I tested the LCD on Raspberry with only pins 18, 19, 21, 22, 23, 24 connected (as well as 3.3v, 5v, and GND).
It works (I am not looking at the touch for now). So I only need SPI pins (19, 21, 23, 24) and 2 gpio : 18 (LCD_RS) and 22 (RST).
2. In my script.fex (script.bin), I checked that spi was activated, and declared the 2 GPIOs pins I use :
- [spi0]
- spi_used = 1
- spi_cs_bitmap = 1
- spi_mosi = port:PC00<3><default><default><default>
- spi_miso = port:PC01<3><default><default><default>
- spi_sclk = port:PC02<3><default><default><default>
- spi_cs0 = port:PC03<3><1><default><default>
- [gpio_para]
- gpio_used = 1
- gpio_num = 2
- gpio_pin_1 = port:PC07<1><default><default><0>
- gpio_pin_2 = port:PA02<1><default><default><0>
Copy code
SPI pins are the same on Raspberry, and OrangePi pins 18 and 22 are PC07 and PA02 (checked here : http://orange314.com/Hardware).
==> I map pin18 (PC07) to gpio1, and pin22 (PA02) to gpio2
3. I add gpio_sunxi to /etc/modules
4. Convert my fex to bin, reboot, connect to ssh, and try the following :
- modprobe flexfb regwidth=16 buswidth=8 width=320 height=480 nobacklight 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
- modprobe fbtft_device name=flexfb speed=16000000 debug=0 rotate=90 fps=30 txbuflen=32768 gpios=reset:2,dc:1
Copy code As it seem to be an ili9486, I also tryed
- modprobe fb_ili9486
- modprobe fbtft_device custom name=fb_ili9486 speed=16000000 debug=0 rotate=90 fps=30 txbuflen=32768 gpios=reset:2,dc:1
Copy code ...as well and hundred of other variants (changing the speed, reg and bus widths, other ili drivers, etc...).
So far, the best I can get is the LCD to turn to grey instead of black. Also, it reacts when I send an image to fb8, using fbi, by blinking a little, but nothing more.
According to the logs, the device is registered :
- [ 2631.628332] fbtft_device: SPI devices registered:
- [ 2631.628362] fbtft_device: 'fb' Platform devices registered:
- [ 2632.155315] graphics fb8: flexfb frame buffer, 480x320, 300 KiB video memory, 32 KiB buffer memory, fps=33, spi0.0 at 16 MHz
- [ 2632.155393] fbtft_device: GPIOS used by 'flexfb':
- [ 2632.155414] fbtft_device: 'reset' = GPIO2
- [ 2632.155432] fbtft_device: 'dc' = GPIO1
- [ 2632.155448] fbtft_device: SPI devices registered:
- [ 2632.155479] fbtft_device: flexfb spi0.0 16000kHz 8 bits mode=0x00
Copy code One more "funny" thing : nothing happens right after the first modprobe fbtft_device .... I have to remove the device (modprobe -r fbtft_device), and add it again to see the LCD turning to grey.
So... It seem that I can communicate with the LCD, but something is definitly wrong somewhere, and I don't know what...
Any idea ?
|
|