Raspbian Jessie configuration for Seeed TFT28B
1) Burning images
Use Win32DiskImager or any other software to download the burning images and install them into a new SD Card.
2) Enable SPI interface
Turn on the Raspberry and login in.
Run sudo raspi-config and entry configuration interface, then Expand Filesystem and entry Advanced Options to Enable the SPI interface.
3) Upload the TFT-Drivers file to the /home/pi list by WinSCP or other tools.
4) Uncompress the Driver files to /home/pi.
5) Reboot.
6) You can look over the support list of the Drivers when execute the following command.
7) Edit the file sudo vim.tiny /etc/modules-load.d/fbtft.conf
8) Copy & paste the following line in:
bcm2708-rng
spi-bcm2708
spi-bcm2835
fbtft-device
Then save and quit.
9) Edit the file sudo vim.tiny /etc/modprobe.d/fbtft.conf, new version is seeed-tft28b.
options fbtft_device name=seeed-tft28b
10) You can add rotate parameter and change the bus frequency for SPI interface, performance experience, default is 32MHz.then run the follow command sudo sync; sudo reboot, it will help your raspberry pi to reboot.
options fbtft_device name=seeed-tft28b speed=48000000 rotate=270
11) Add ads7846 and ads7846-device to /etc/modules-load.d/fbtft.conf, it will add touch function for raspberry pi.
12) modify /etc/modprobe.d/fbtft.conf,add a line of code:options ads7846_device swap_xy=1 cs=1 speed=2000000 model=7846 x_min=230 x_max=3900 y_min=200 y_max=3700 x_plate_ohms=80 pressure_max=255 gpio_pendown=22 keep_vref_on=1
13) install the packages with:
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev evtest
Next wget http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz and uncompress tar xvf xinput_calibrator-0.7.5.tar.gz
Entry the xinput_calibrator-0.7.5 folder and enter ./configure
Enter sudo make
Enter sudo make install
Enter sudo reboot
14) Enter DISPLAY=:0.0 xinput_calibrator to calibrate the scree
Edit /etc/X11/xorg.conf.d/99-calibration.conf and copy it.
If /etc/X11/xorg.conf.d/ does not exist hence it needs to be created with the following command:
sudo mkdir /etc/X11/xorg.conf.d/
After that, we can edit the file as below:
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
You have finished the display configuration.