www.joy
-
it.net
Pascalstr. 8 47506 Neukirchen
-
Vluyn
3. Use with a Framebuffer
We explain here how to set up the framebuffer
this LCD screen. This library was published under the
You must first deactivate SPI, if you have activated it earlier. Therefore,
go back to the configuration of the Raspberry Pi.
sudo raspi
-
config
There you deactivate SPI under
5 Interfacing Options
→
P4 SPI
. Now
you have to edit the
config.txt and comment out a command. You open
the
config.txt with :
sudo nano /boot/config.txt
There you remove the hash at
hdmi_force_hotplug=1
. You can save with
CTRL + O and leave the editor with CTRL + X. Now you must restart the
Raspberry Pi with the following command.
sudo reboot
Now you can install fbcp
-
ili9341 by executing the following commands
one after the other:
sudo apt
-
get install cmake
cd
~
git clone clone https://github.com/juj/fbcp
-
ili9341.git
cd fbcp
-
ili3941
mkdir build
You must edit the
display.h before continuing with the setup. Therefore,
open the
display.h with the following command:
sudo nano display.h
There you exchange
line 83
#
define
DISPLAY_SPI_DRIVE_SETTINGS
(
0
)
with
#
define
DISPLAY_SPI_DRIVE_SETTINGS
(
1
| BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)
#ifndef DISPLAY_SPI_DRIVE_SETTINGS
#define DISPLAY_SPI_DRIVE_SETTINGS (1 | BCM2835_SPI0_CS_CPOL | BCM2835_SPI0_CS_CPHA)
#endif
You save again with CTRL + O and leave the editor with CTRL + X. You can
now continue with the setup by executing the following commands one
after the other.
cd build
cmake
-
DST7789VW=ON
-
DGPIO_TFT_DATA_CONTROL=25
-
DGPIO_TFT_RESET_PIN=27
-
DGPIO_TFT_BACKLIGHT=18
-
DSPI_BUS_CLOCK_DIVISOR=8
-
DBACKLIGHT_CONTROL=ON ..
make
-
j
sudo ./fbcp
-
ili9341
Now you will see your desktop on your 1.3" display.