Mike86
Published

Raspberry PI B+ 2.8 TFT Add-on V2.0 Touch Function Realizing

This is a tutorial to show you how to put 2.8 TFT Add-on Screen onto Raspberry Pi B+ so as to realize its touch function.

IntermediateFull instructions provided1 hour1,239
Raspberry PI B+ 2.8 TFT Add-on V2.0 Touch Function Realizing

Things used in this project

Hardware components

Itead Raspberry Pi B +
×1
Itead Raspberry Pi 2.8 TFT LCD Touch Display Screen Add On V2.0 Module
×1

Story

Read more

Schematics

Schematic of 2.8 TFT LCD ADD-ON

Code

Install the necessary software

C/C++
sudo apt-get update
sudo apt-get install xinput evtest tslib libts-bin

Reboot Raspberry Pi B+

C/C++
sudo reboot

Load TFT display driver

C/C++
sudo modprobe fbtft_device name=itdb28 gpios=reset:5,dc:6,wr:12,cs:13,db00:20,db01:21,db02:22,db03:23,db04:24,db05:25,db06:26,db07:27 rotate=90 fps=50

start up X Server

C/C++
startx &

Raspberry Pi Software Configuration

C/C++
sudo raspi-config

Enter into the file /etc/modprobe.d/raspi-blacklist.conf

C/C++
sudo vi /etc/modprobe.d/raspi-blacklist.conf

Comment the mask of spi out

C/C++
Comment the mask of spi out

Download the fbtft driver, and you may need to run the following command three times:

C/C++
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update

Finnally got the codes:

C/C++
*** Running pre-install script
Work around rpi-update issue #106
*** Updating firmware
*** Updating kernel modules
*** depmod 3.12.21+
*** Updating VideoCore libraries
*** Using HardFP libraries
*** Updating SDK
*** Running ldconfig
*** Storing current firmware revision
*** Running post-install script
    /lib/firmware
*** Deleting downloaded files
*** Syncing changes to disk
*** If no errors appeared, your firmware was successfully updated to b77683205688d3f6ae2b32a3c7f4e63de1c06a5d
*** A reboot is needed to activate the new firmware  

Add the following contents to file /boot/config.txt

C/C++
dtoverlay=ads7846,cs=1,speed=2000000,penirq=17,swapxy=1,xmin=230,xmax=3850,ymin=190,ymax=3850,pmax=255,xohms=100

Credits

Mike86

Mike86

15 projects • 13 followers

Comments