Difference between revisions of "Matrix - 2'8 SPI Key TFT"

From FriendlyELEC WiKi
Jump to: navigation, search
(Resources)
(Display Debian GUI on 2.8"LCD)
Line 240: Line 240:
  
 
==Display Debian GUI on 2.8"LCD==
 
==Display Debian GUI on 2.8"LCD==
启动开发板并运行Debian系统,执行下列命令启动Debian桌面:
+
Boot your ARM board with Debian and and launch the Debian GUI by running the following commands:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ cd matrix/demo/nanopi-status/
 
$ cd matrix/demo/nanopi-status/
 
$ ./display-debian.sh /dev/fb-st7789s
 
$ ./display-debian.sh /dev/fb-st7789s
 
</syntaxhighlight>
 
</syntaxhighlight>
用触摸笔在屏幕上点击4个点完成校准并进入Debian桌面,效果如下:<br>
+
Calibrate the screen by following the four points' movement:<br>
 
[[File:fbtft-debian.png|frameless|600px|fbtft-debian]]
 
[[File:fbtft-debian.png|frameless|600px|fbtft-debian]]
  
完成触摸校准后终端会有类似如下的打印信息:
+
After calibration is done you will see the following system information:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
Section "InputClass"  
 
Section "InputClass"  
Line 257: Line 257:
 
EndSection  
 
EndSection  
 
</syntaxhighlight>
 
</syntaxhighlight>
将上述内容手动保存在/usr/share/X11/xorg.conf.d/99-calibration.conf中,以后就再也无需进行校准了。
+
Copy and paste the information to the "/usr/share/X11/xorg.conf.d/99-calibration.conf" file, save it and this will be used as your calibration data when you reboot your board.
  
 
==Resources==
 
==Resources==

Revision as of 15:54, 16 June 2016

查看中文

1 Introduction

Matrix-2'8 SPI Key TFT.png
  • Matrix-2'8_SPI_Key_TFT模块是一款2.8英寸的TFT 触摸LCD,模块采用ST7789S驱动IC和XPT2046电阻式触摸IC,屏幕分辨率为320*240,采用SPI控制接口,模块还包含3个独立按键,可根据需要自定义功能。
  • 详细规格如下所示:
LCD尺寸 2.8寸
显示区域 57.6mm*43.2mm
驱动IC ST7789S
分辨率 320*240(RGB)
接口方式 SPI
工作电压 5V
背光电压 5V
触摸屏类型 电阻式,钢化玻璃触摸屏

模块上电默认打开背光,可通过置低LED_EN引脚关闭背光。如果需要关闭上电打开背光,只需要拿到电路板上的R12电阻,再通过置高LED_EN引脚打开背光;

2 Features

  • PCB dimension(mm):

Matrix-2'8 SPI Key TFT PCB.png

  • Pin Description:
Pin Description Pin Description
1 VDD_3.3V 2 VDD_5V
3 NC 4 VDD_5V
5 NC 6 GND
7 LCD_RESET 8 NC
9 GND 10 NC
11 LED_EN 12 NC
13 KEY_1 14 GND
15 KEY_2 16 KEY_3
17 VDD_3.3V 18 T_IRQ
19 SPI_MOSI 20 GND
21 SPI_MISO 22 LCD_D/C
23 SPI_CLK 24 LCD_CS
25 GND 26 T_CS


3 Applications

3.1 Connect to NanoPi M1

Please refer to the following connection diagram to connect the module to the NanoPi M1:
Matrix-2'8_SPI_Key_TFT_nanopi_m1

3.2 Connect to NanoPi 2

Please refer to the following connection diagram to connect the module to the NanoPi 2:
Matrix-2'8_SPI_Key_TFT_nanopi2

3.3 Connect to NanoPi M2 / NanoPi 2 Fire

Please refer to the following connection diagram to connect the module to the NanoPi M2 / P2:
Matrix-2'8_SPI_Key_TFT_nanopi_m2

4 Compile & Run Test Program

Boot your ARM board with Debian and copy the matrix code:

$ apt-get update && apt-get install git
$ git clone https://github.com/friendlyarm/matrix.git

If your cloning is done successfully a "matrix" directory will be generated.

Compile and install Matrix:

cd matrix/demo/nanopi-status
./build.sh
./run.sh /dev/fb-st7789s

The nanopi-status is a small Qt utility which can be used to list system's basic information. Here is what you should expect to observe:
st7789s-status


5 Display Debian GUI on 2.8"LCD

Boot your ARM board with Debian and and launch the Debian GUI by running the following commands:

$ cd matrix/demo/nanopi-status/
$ ./display-debian.sh /dev/fb-st7789s

Calibrate the screen by following the four points' movement:
fbtft-debian

After calibration is done you will see the following system information:

Section "InputClass" 
        Identifier      "calibration" 
        MatchProduct    "ADS7846 Touchscreen" 
        Option  "Calibration"   "196 3825 3887 358" 
        Option  "SwapAxes"      "0" 
EndSection

Copy and paste the information to the "/usr/share/X11/xorg.conf.d/99-calibration.conf" file, save it and this will be used as your calibration data when you reboot your board.

6 Resources

7 Update Log

7.1 Feb-24-2016

  • Added the driver's source code location in Section 5.2