YMMV

* your mileage may vary

Thursday, 25 February 2016

Beaglebone Black (BBB) with tft_320qvt Touchscreen Parallel Bus

Steps to Wire and Configure the TFT_320QVT touch screen using the BBB parallel bus.  There are lots of examples for the SPI bus, but I thought it could be interesting to try the parallel bus. 
For the touchscreen, I had trouble to load the DT overlay via the command line but was able to get it to work via uEnv.txt.  I don' know why it is like this, but I've raised the question here:  https://groups.google.com/forum/#!topic/beagleboard/gOynYr8fgns

The TFT
I used this one.
http://www.amazon.co.uk/Display-Module-SSD9341-Drive-Controller/dp/B00EQ1URO8/ref=sr_1_2?s=computers&ie=UTF8&qid=1452008417&sr=1-2&keywords=TFT+parallel

Pin Mapping

BBB Environment
root@beaglebone:~# uname -r; cat /etc/dogtag; dtc --version; cat /proc/cmdline
4.4.1-bone5
BeagleBoard.org Debian Image 2016-01-31
Version: DTC 1.4.1-g1e75ebc9
console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet

disable HDMI in  /boot/uEnv.txt
##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
dtb=am335x-boneblack-overlay.dtb

GIT
Install Git if not already installed
apt-get install git

FB TFT
Add Notro' FB drivers to load at boot
nano /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
fbtft dma
fbtft_device

nano /etc/modprobe.d/fbtft_device.conf
options fbtft_device name=sainsmart32_fast fps=60 rotate=90 debug=3 gpios=reset:48,dc:86,wr:87,cs:89,rd:88,db00:70,db01:71,db02:72,db03:73,db04:74,db05:75,db06:76,db07:77,db08:78,db09:79,db010:80,db011:81,db012:8,db013:9,db014:10,db015:11,led:60

cat teapot.raw > /dev/fb0



Touch Screen
get the DT overlays and the latest version of DTC
git clone https://github.com/RobertCNelson/bb.org-overlays.git
./dtc-overlay.sh 

copy BB-ADS7846-00A0.dts into /bb.org-overlays/src directory.
make
./install.sh 



add the overlay in to the uEnv.txt
##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
cape_enable=bone_capemgr.enable_partno=BB-ADS7846

reboot

apt-get install evtest

evtest
(touch the screen to see the events)



Calibration
The Calibration is not set up in Jessie repositories, so we need to build it locally

git clone https://github.com/kergoth/tslib.git

cd tslib/
./autogen.sh
make
./configure
make
make install


update profile to set environment variables for tslib

# ~/.profile: executed by Bourne-compatible login shells.
export LD_LIBRARY_PATH=/usr/local/lib
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/lib/ts

reset
nano /usr/local/etc/ts.conf
# Uncomment if you wish to use the linux input layer event interface
module_raw input

run test and calibration tools
ts_test
ts_calibrate

Video Test
Supporting Links

4 comments:

  1. It good to see that someone got one of these displays to work with fbtft in parallel.

    I've been trying to get one of these displays to work in parallel mode for a while. I've been trying to follow your instructions, but the best I get now is a black screen after the display initializes. I have a hunch that it's a problem with the dts file not configuring the pins correctly, but I'm not shure.

    Could you post the outputs of dmesg and show-pins (https://github.com/mvduin/bbb-pin-utils).

    ReplyDelete
    Replies
    1. Hello,

      output files saved to the supporting drive
      https://drive.google.com/open?id=0BwUGkFVOqZsPX0JvQmZ1RFppN3c

      Delete
    2. Thank you.

      I just got it to work. It looks like the dts file for the lcd I used was the problem. I removed the dts file from the boot configuration so now it only loads the dirvers.

      Delete