Dobrica Pavlinušić's random unstructured stuff

2.2 TFT LCD: TFT01-2.2SP


ILI9341 (or ILI9340 according to tftfb)




  • VCC to 3.3 volt (pin 17)
  • GND to GND (pin 20)
  • CS to CE0 (pin 24)
  • RESET to GPIO 25 (pin 22)
  • D/C to GPIO 24 (pin 18)
  • SDI/MOSI to MOSI (pin 19)
  • SCK to SCLk (pin 23)
  • LED to GPIO18 (pin 12)
  • SDO/MISO to MISO (pin 21)
# enable spi in raspi-config

pi@jpi1 ~ $ grep spi /boot/config.txt 

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

sudo reboot

pi@jpi1 ~ $ sudo modprobe fbtft_device name=adafruit22a verbose=1

pi@jpi1 ~ $ dmesg | tail -8
[  173.796933] fbtft_device: Deleting spi0.0
[  173.797590] spi spi0.0: setting up native-CS0 as GPIO 8
[  173.797807] fbtft_device:  GPIOS used by 'adafruit22a':
[  173.797833] fbtft_device:    'reset' = GPIO25
[  173.797851] fbtft_device:    'dc' = GPIO24
[  173.797864] fbtft_device:    'led' = GPIO18
[  173.838265] fb_ili9340: module is from the staging directory, the quality is unknown, you have been warned.
[  174.220426] graphics fb1: fb_ili9340 frame buffer, 240x320, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz

pi@jpi1 ~ $ fbset -fb /dev/fb1

mode "240x320"
    geometry 240 320 240 320 16
    timings 0 0 0 0 0 0 0
    nonstd 1
    rgba 5/11,6/5,5/0,0/0

pi@jpi1 ~ $ cat /dev/urandom > /dev/fb1 
cat: write error: No space left on device

# test
cd /usr/share/X11/xorg.conf.d/
sudo mv 99-fbturbo.conf ~/
FRAMEBUFFER=/dev/fb1 startx


Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.