Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:spi_lcdshiled [2016/06/20 11:58] john1117 [X Calibration] |
en:spi_lcdshiled [2016/12/21 17:02] (current) john1117 [Advanced Usages] |
||
---|---|---|---|
Line 7: | Line 7: | ||
[[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G142060963922|Where to buy]] | [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G142060963922|Where to buy]] | ||
- | ===== Specifications ===== | + | ====== Specifications ====== |
|LCD Type|TFT| | |LCD Type|TFT| | ||
|LCD Interface|SPI| | |LCD Interface|SPI| | ||
Line 18: | Line 18: | ||
|Weight|44gram| | |Weight|44gram| | ||
- | ===== Pin Map ===== | + | ====== Pin Map ====== |
^Pin Num^Symbol^Description^ | ^Pin Num^Symbol^Description^ | ||
|1, 17|3.3V|Power positive (3.3V power input)| | |1, 17|3.3V|Power positive (3.3V power input)| | ||
Line 35: | Line 35: | ||
|24|LCD_CS|LCD chip selection, low active| | |24|LCD_CS|LCD chip selection, low active| | ||
|26|TP_CS|Touch screen chip selection, low active| | |26|TP_CS|Touch screen chip selection, low active| | ||
- | ===== How to activate the 3.2inch LCD shield with your ODROID-XU4 ===== | + | ====== How to activate the 3.2inch LCD shield with your ODROID-XU4 ====== |
You need a HDMI connection or a Serial console connection to follow below instruction. | You need a HDMI connection or a Serial console connection to follow below instruction. | ||
<WRAP center round important 100%> | <WRAP center round important 100%> | ||
- | To use the SPI, you first need to update the kernel version to "3.10.83" or higher. | + | To use the SPI, you first need to update the kernel version to "3.10.83" or higher. |
sudo apt-get update && sudo apt-get dist-upgrade | sudo apt-get update && sudo apt-get dist-upgrade | ||
+ | "ads7846" module driver must be in the output of "lsmod" command. | ||
</WRAP> | </WRAP> | ||
- | ==== Coinfiguring framebuffer ==== | + | |
+ | ==== How to enable driver (Only Ubuntu 16.04 or higher is required) ==== | ||
+ | Edit /etc/modprobe.d/blacklist-odroid.conf to comment out following three ines. | ||
+ | <code> | ||
+ | blacklist spidev | ||
+ | blacklist spi_s3c64xx | ||
+ | blacklist ads7846 | ||
+ | </code> | ||
+ | |||
+ | Reboot. | ||
+ | reboot | ||
+ | Check your SPI node. | ||
+ | ls /dev/spidev* | ||
+ | |||
+ | ===== Configuring framebuffer ===== | ||
**0. Update your Kernel** | **0. Update your Kernel** | ||
<code> | <code> | ||
Line 61: | Line 76: | ||
fb_ili9340 | fb_ili9340 | ||
- | ==== Run Xwindow ==== | + | ===== Run Xwindow ===== |
+ | {{:en:32tft:xorg.png?300|}} | ||
**0. Insert modules** | **0. Insert modules** | ||
Line 78: | Line 95: | ||
</code> | </code> | ||
- | **2. Reboot** | + | **2. Run** |
- | reboot | + | |
- | **3. Run** | + | |
/etc/init.d/lightdm start | /etc/init.d/lightdm start | ||
- | ==== Run Console ==== | + | ===== Run Console ===== |
**0. Insert modules** | **0. Insert modules** | ||
Line 97: | Line 112: | ||
There will be a login screen on the LCD screen. | There will be a login screen on the LCD screen. | ||
- | ==== X Calibration ==== | + | ===== Touch Calibration ===== |
+ | {{:en:32tft:cal.png?300|}} | ||
+ | |||
+ | <WRAP center round important 100%> | ||
+ | To use the Touch Calibration, you first need to update the kernel version to "3.10.96-86" or higher. | ||
+ | sudo apt-get update && sudo apt-get dist-upgrade | ||
+ | </WRAP> | ||
**0. The xinput-calibrator pakage download** | **0. The xinput-calibrator pakage download** | ||
+ | |||
sudo apt-get install xinput-calibrator | sudo apt-get install xinput-calibrator | ||
**1. Remove old calibration data.** | **1. Remove old calibration data.** | ||
+ | |||
sudo rm /etc/X11/xorg.conf.d/99-calibration.conf | sudo rm /etc/X11/xorg.conf.d/99-calibration.conf | ||
+ | | ||
+ | **2. Login** | ||
+ | |||
+ | You need a login to get DISPLAY.\\ | ||
+ | If you want auto login.\\ | ||
+ | Edit /etc/lightdm/lightdm.conf file to enable auto-login: (password: odroid) | ||
+ | |||
+ | <code> | ||
+ | odroid@odroid:~$ sudo vi /etc/lightdm/lightdm.conf | ||
+ | [sudo] password for odroid: | ||
+ | odroid@odroid:~$ cat /etc/lightdm/lightdm.conf | ||
+ | [SeatDefaults] | ||
+ | autologin-user=odroid | ||
+ | autologin-user-timeout=0 | ||
+ | odroid@odroid:~$ | ||
+ | </code> | ||
+ | |||
+ | **3. Check your DISPLAY** | ||
+ | |||
+ | odroid@odroid:~$ w | ||
+ | 09:13:31 up 35 min, 2 users, load average: 0.09, 0.08, 0.12 | ||
+ | USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT | ||
+ | odroid ttySAC2 08:42 2.00s 0.75s 0.02s w | ||
+ | odroid :0 :0 05:39 ?xdm? 1:15 0.63s mate-session | ||
+ | odroid@odroid:~$ | ||
- | **2. Run calibrator** | + | **4. Run calibrator** |
- | You need to check DISPLAY=:N.0 | + | sudo DISPLAY=:0 xinput_calibrator |
- | sudo FRAMEBUFFER=/dev/fb2 startx & | + | |
- | sudo DISPLAY=:0.0 xinput_calibrator | + | |
Follow the directions on your screen.\\ | Follow the directions on your screen.\\ | ||
Line 119: | Line 166: | ||
sudo vi /etc/X11/xorg.conf.d/99-calibration.conf | sudo vi /etc/X11/xorg.conf.d/99-calibration.conf | ||
- | **3. Reboot** | + | **5. Reboot** |
sudo reboot | sudo reboot | ||
+ | |||
+ | ====== Advanced Usages ====== | ||
+ | * [[en:spi_lcdshiled:autoconsole|Automatically start console mode]] | ||
+ | * [[en:spi_lcdshiled:autox|Automatically start desktop GUI mode]] |