orange pi tft lcd quotation
Hey guys, I"ve spent the last couple of weeks trying to get a TFT display with touch screen to work on my Orange Pi PC board, and I"ve decided to share my step-by-step solution here. This tutorial is heavily based on Guide: How to use Touchscreen + LCD on H3 devices by Kutysam, but I had to do some extra steps for it to work properly. This tutorial is only for Mainline kernel, I was able to get the graphical screen working with Kutysam"s guide for Legacy, but couldn"t make the touch work.
Also, I am using the image Armbian_5.38_Orangepipc_Debian_stretch_next_4.14.14_desktop, but it should work for the headless version (server) too, if you install a display manager, desktop environment and the X server.
Add the following lines to the end of the file (Be careful with spaces in the end of the lines... I lost a couple of days trying to figure out what the problem was when I had an extra space after "param_spidev_spi_bus=0"
Now we need to configure fbtft and fbtft_device on boot. Note: I had to put "98" in the start of the filename, or else I"d get the following error: "fbtft_device: spi_busnum_to_master(0) returned NULL" in dmesg after I installed the touchscreen. I believe it has something to do with the load order, so if you"re having problems with this file you could try changing the prefix to 99 or removing it.
options ads7846_device model=7846 cs=1 gpio_pendown=1 keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
options ads7846_device model=7846 cs=0 gpio_pendown=1 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
*/fragment@1{target=<&pio>;__overlay__{ads7846_pins:ads7846_pins{pins="PA1";function="irq";//bias-pull-up;};};};fragment@2{target=<&spi1>;__overlay__{#address-cells = <1>;#size-cells = <0>;status="okay";ads7846@0{compatible="ti,ads7846";reg=<1>;/* Chip Select 0 */status="okay";pinctrl-names="default";pinctrl-0=<&ads7846_pins>;spi-max-frequency=<1600000>;interrupt-parent=<&pio>;interrupts=<012>;/* PA1 IRQ_TYPE_EDGE_FALLING */pendown-gpio=<&pio010>;/* PA1 *//* driver defaults, optional */ti,x-min=/bits/16<0>;ti,y-min=/bits/16<0>;ti,x-max=/bits/16<0x0FFF>;ti,y-max=/bits/16<0x0FFF>;ti,pressure-min=/bits/16<0>;ti,pressure-max=/bits/16<0xFFFF>;ti,x-plate-ohms=/bits/16<400>;};};};};
Kuman 3.5" Inch TFT LCD Display 480x320 RGB Pixels Touch Screen Monitor for Raspberry Pi 3 2 Model B B+ A+ A Module SPI Interface with Touch Pen SC06 (3.5 inch Touch Screen) : A...
If the value in the quotations matches EXACTLY Your type of the Orange Pi board, You are probably lucky enough to have a script.bin file that has the correct settings for memory and CPU and You may proceed further to NEXT STEP. Others will need to edit the script.fex file to make it safe.
The numeric value right to the equality sign is the CPU frequency in MHz. If it is below 1000 or only sligtly above (e.g. like 1008) You may leave things as is and proceed further. If otherwise like this example the clock is set to ~1500 or even to ~2000 You better downscale it. Or else make sure that Your board is the really mighty fancy high top end of the orange pi series (like Orange Pi Plus, Orange PI Plus 2, Orange PI Prime, Orange PI Ultimate, Orange PI Unlimited, Orange PI REBIRTH and THE RETURN OF THE ORANGE PI...).
Another place of interest in the script.fex file will be the [dvfs_table] section. You will see the mindscraping table of cpu frequencies there. Here the frequencies are measured in Hz, so you"d like that 9-digit numbers. Once again if Your view is not distorted by very high numbers (like max_freq = 1536000000 and above) of if You have a top end board You can proceed further. Otherwise You should downscale the values. Where to get the correct ones? I suggest to copy-paste them from the: http://www.sunxi.org/Fex_Guide
While googling for any info about lcd controller I came across this page: http://heikki.virekunnas.fi/2015/raspberry-pi-tft/, author managed to get from manufacturer patch file for kernel sources and tested it with 4.1.y - on which lcd worked. But still LCD replace HDMI, but I want to use this screen as additional for user interaction, while the bigger on HDMI as presentation monitor.
Since, fbtft has been merged with rpi kernel, so the fb drivers (including ili9341.c) was moved to fbtft_device driver (so the author of page can"t compile latest kernel with driver+patch).
So something about hardware, which I reverse engineered by the "hard way" - "grab multimeter and run through all LCD FPC pins and shift register pins"
Now I noticed there is "9486L" which can suggest that LCD screen is controlled by ILI9486L, I found this LCD on taobao too but I can"t contact seller.
I"m pretty sure about D/C (Pin 37 on LCD) and Reset (Pin 19 on LCD) pins by looking into driver code, but I can"t identify other signals (WR/RD/CS/etc...)
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x2938b030 smsc95xx.macaddr=B8:27:EB:38:B0:30 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
- Controller is not ILI9341/ILI9325 - those are for smaller displays (320x240, etc...), I guess this might be ILI9486/9488 because they are for 480x320 displays. But when I compared init with DS it does not fit right so LCD can have a clone of ILI9486/9488 ...
- Module use only SPI interface and two CE signals (CE0 for touch controller, CE1 for LCD shift registers - compared to others lcd modules, in KeDei module this is swapped),
Orange Pi 2G-IoT is a low cost ARM Linux board with 2G, and WiFi & Bluetooth connectivity, basically with the guts of a smartphone minus the display and battery. Shenzhen Xunlong has now released a 800×480 display with capacitive touch support for the board available in black or white, and selling for $9.98 plus shipping.
Software support is a mystery, and while I’m pretty sure it will work in Android, I don’t know if Linux distributions will support the display, at least at the beginning. The complete kit with the board and display would cost $20 plus shipping.
Raspberry Pi Zero W is the Pi, but at a largely reduced size of only 65mm long by 30mm wide and at a very economical price. With the addition of wireless LAN and Bluetooth, the Raspberry Pi Zero W is ideal for making embedded Internet of Things (IoT) projects. The Pi Zero W has been designed to be as flexible and compact as possible with mini connectors and an unpopulated 40-pin GPIOread more...
High-Performance CPU, Raspberry Pi Pico features Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz. With 264KB of SRAM, and 2MB of on-boardread more...
This cable will let you swap out the stock 150mm long flex cable from a Raspberry Pi Camera (either "classic" or "NoIR" type) or Raspberry Pi Display for a different size. Works great, just carefully open the connectorread more...
Established in the year 1997, Dilson Enterprises is the most promising Supplier and Trader firm engaged in exhibiting their leadership potentials by developing the finest grades of Cable Assembly and Electrical Connectors. We endeavor to align our product range to the desired repute by presenting a wide range of quality testedread more...
Pine64 UK is part of the Lilliput UK website family. We are proud to be the official distributor of Pine64 products in Europe and Pine64 UK operates alongside our main site lilliputdirect.com in order to bring you the latest Pine64 products.