Skip to content

Instantly share code, notes, and snippets.

@braitsch
Last active October 23, 2023 11:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braitsch/0509bcf788a8b7320f32 to your computer and use it in GitHub Desktop.
Save braitsch/0509bcf788a8b7320f32 to your computer and use it in GitHub Desktop.
TinyLCD Setup

Instructions to install the NeoSec 3.5" TinyLCD drivers on a Raspberry PI:

  1. Enable SPI – comment out the spi blacklist line

     sudo nano /etc/modprobe.d/raspi-blacklist.conf
    
  2. Install FBTFT drivers as loadable modules

      sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
      sudo reboot
    
  3. Register device (the driver will load automatically)

     sudo modprobe fbtft_device name=tinylcd35
    
  4. dmesg will show the default pin assignements, and that the driver is loaded.

     [   79.030328] fbtft_device:  SPI devices registered:
     [   79.030380] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
     [   79.030396] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
     [   79.030406] fbtft_device:  'fb' Platform devices registered:
     [   79.030427] fbtft_device:      bcm2708_fb id=-1 pdata? no
     [   79.030490] fbtft_device: Deleting spi0.0
     [   79.031098] fbtft_device:  GPIOS used by 'tinylcd35':
     [   79.031122] fbtft_device:    'reset' = GPIO25
     [   79.031133] fbtft_device:    'dc' = GPIO24
     [   79.031143] fbtft_device:    'led' = GPIO18
     [   79.031152] fbtft_device:  SPI devices registered:
     [   79.031165] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
     [   79.031178] fbtft_device:      fb_tinylcd spi0.0 32000kHz 8 bits mode=0x00
     [   79.280788] graphics fb1: fb_tinylcd frame buffer, 320x480, 300 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz
    
  5. Tell the OS to load the driver on boot – edit /etc/modules

     fbtft_device name=tinytft35 verbose=0 rotate=90
    
  6. Tell the driver to show the console – edit /boot/cmdline.txt

     fbcon=map:10
    
@MedicInMirrorshades
Copy link

Is this still necessary to get a TFT running, particularly the TinyLCD 3.5"? Or is this outdated?

@JoeFinger
Copy link

I rebooted on step two and now it wont boot back on. what should i do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment