Tom DeCricle
Published

gen4-FT812-50T SPI display for Raspberry-Pi

This project adds a 5" resistive touchscreen display to the Raspberry-Pi through the SPI bus.

IntermediateProtip1 hour438
gen4-FT812-50T SPI display for Raspberry-Pi

Things used in this project

Story

Read more

Schematics

Wiring Diagram

Connect the display's breakout board to the raspberry pi SPI header. Make sure to use the GPIO24 (SPI_PD) and GPIO25 (SPI_CS). This does not use the SPI0_CE0/CE1 pins.

Code

EVE2 Repo

Download the code zip file and extract then copy to your Raspberry Pi using SCP. Example: scp -r ./EVE-MCU-BRT_AN_025-Example-RPI <USER>@<ip_address>:/home/<USER>/Documents/ Open the file EVE-MCU-BRT_AN_025-Example-RPi/lib/eve/ports/eve_arch_rpi /EVE_Linux_RPi.c and notice the connections: printf ("J8 Pin 19 - MOSI (SPI0_D1)\n"); printf ("J8 Pin 21 - MISO (SPI0_D0)\n"); printf ("J8 Pin 23 - SCLK (SPI0_SCLK)\n"); printf ("J8 Pin 22 - CS (GPIO25) - Note this is not the SPI0_CS0 pin\n"); printf ("J8 Pin 18 - PD# (GPIO24) - Powerdown pin\n"); Connect your Raspberry Pi SPI pins the same (do not use the CE0/CE1 SPI, instead use the assigned CS GPIO25 as assigned above. Comment out this section of code (For some reason the library developer intitialised spidev0.0 but then checked to make sure we're using spidev1.0. Simply block commenting out this section of code if your using spidev0.0. To check 'ls /dev' and check for which spidev bus is available): /* if (spiHandle == -1) { printf("Please make sure /dev/spidev1.0 is enabled. The raspi-config\n"); printf("configuration tool can enable \"SPI\" under the section\n"); printf("\"Interfacing Options\". \n"); exit(-1); } */ go to the project download main directory on the raspberry-pi and make the project with make 'cd /home/<USER>/EVE-MCU-BRT_AN_025-Example-RPI' 'make' run the executable file that make generates './EVE-MCU-BRT_AN_025-Example-RPI-main'

Credits

Tom DeCricle
6 projects • 2 followers
Electrical Engineer with experience in Schematic Design, PCB Layout, PCB Fabrication & Assembly Procurement, Hardware/Firmware/Software Dev
Contact

Comments

Please log in or sign up to comment.