Pc board has additional 16 pins female header with other GPIO lines free for other uses and projects. Rev 2 – Pins 1 – 16
1 – VCC + 5V
2 – GND
3 – VCC + 3V3
4 – GPIO 14
5 – GPIO 15
6 – GPIO 23
7 – GPIO 07
8 – GPIO 02
9 – GPIO 03
10 – GPIO 04
11 – GPIO 17
12 – GPIO 27
13 – GPIO 22
14 – VCC + 5V
15 – GND
16 – VCC + 3V3
Driver installation:
Make sure your filesystem is expanded, if not use raspi-config:
1 |
sudo raspi-config |
Correct procedure to update system with tft support:
1 2 3 |
sudo apt-mark hold raspberrypi-bootloader sudo apt-get update sudo apt-get upgrade |
Update firmware: https://github.com/Hexxeh/rpi-update
1 |
sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update |
Make directory rpi-update writable:
1 |
sudo chmod +x /usr/bin/rpi-update |
Since latest update DO NOT BACKUP MODULES DIRECTORY:
Rename and backup modules directory:
Enable SPI in raspi-blacklist.conf – comment out (#) the spi blacklist line
1 |
sudo nano /etc/modprobe.d/raspi-blacklist.conf |
Install notro rpi-firmware update
1 |
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update |
To make module load at start-up add this line at the end:
1 2 |
sudo nano /etc/modules fbtft_device name=adafruit22a rotate=270 |
To have the console start on the framebuffer with fonts VGA8X8 – edit /boot/cmdline.txt
1 |
sudo nano /boot/cmdline.txt |
at the end add:
1 |
fbcon=map:10 fbcon=font:VGA8X8 |
It should look like this:
1 |
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:VGA8X8 |
Other fonts: MINI4x6, VGA8x8, Acorn8x8, PEARL8x8, ProFont6x11, 7×14, VGA8x16, SUN8x16, 10×18, SUN12x22
fbcon=rotate:1 can be used to rotate the console. You can also use smaller fonts MINI4x6 (using small fonts w with cgminer – bitcoin miner)
1 |
fbcon=map:10 fbcon=font:MINI4x6 |
Raspbian images from 2013-12-20 and newer , fbturbo was enabled by default :
1 |
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf |
comment out – put #
1 |
# Option "fbdev" "/dev/fb0" |
Shutdown raspberry Pi
1 |
sudo shutdown -h now |
disconnect power & power raspberry pi back
To start startx type:
1 |
sudo FRAMEBUFFER=/dev/fb1 startx -- -dpi 60 |
Extras:
Install midnight commander:
1 |
sudo apt-get install mc |
Install cmatrix
1 |
sudo apt-get install cmatrix |
Playing video 240×320 on tft using mplayer
Pick video on youtube, convert (you can use http://wap4.org/) to 240×320 , mp4 format, upload to home dir.
Install mplayer
1 |
sudo apt-get install mplayer |
# Install ffmpeg if you haven’t already
1 |
sudo apt-get -y install ffmpeg |
# Pick the correct framebuffer – mine is /dev/fb1:
1 |
sudo mplayer -vo fbdev2:/dev/fb1 test.mp4 |
WIRING: ILI9430C SPI
RPI Pin Display Driver gpio
21——MISIO———–GPIO09
12——LED————-GPIO18
23——SCK————-GPIO11
19——MOSI————GPIO10
18——D/C————-GPIO24
22——RESET———–GPIO25
24——CS————–GPIO08
6——-GND————-GND (-)
1——-VCC————-VCC +3V3
Resources:
https://github.com/notro/fbtft/wiki
https://github.com/notro/fbtft/wiki/LCD-Modules#adafruit-22
Incoming search terms:
- MINI4x6 download