Difference between revisions of "Template:LCD Module FBCP Transplant"
(Created page with "==FBCP Transplant== The Framebuffer uses a memory area to store the display content, and changes the data in the memory to change the display content. There is an open-source...") |
|||
Line 44: | Line 44: | ||
===Auto-start when Power on=== | ===Auto-start when Power on=== | ||
<pre> | <pre> | ||
− | sudo cp ~/ | + | sudo cp ~/waveshare_fbcp/build/fbcp /usr/local/bin/fbcp |
sudo nano /etc/rc.local | sudo nano /etc/rc.local | ||
</pre> | </pre> |
Revision as of 10:43, 28 July 2021
FBCP Transplant
The Framebuffer uses a memory area to store the display content, and changes the data in the memory to change the display content.
There is an open-source project on github: fbcp-ili9341. Compared with other fbcp projects, this project uses partial refresh and DMA to achieve a refresh rate of up to 60fps.
Compile and Run
sudo apt-get install cmake -y cd ~ wget https://www.waveshare.com/w/upload/f/f9/Waveshare_fbcp.7z sudo apt-get install p7zip-full 7z x Waveshare_fbcp.7z cd waveshare_fbcp mkdir build cd build cmake [options] .. make -j sudo ./fbcp
Replace the above cmake [options] .. according to the LCD Module you are using.
#0.96inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_0INCH96_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 .. #1.14inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_1INCH14_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 .. #1.3inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_1INCH3_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 .. #1.54inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_1INCH54_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 .. #1.8inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_1INCH8_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 .. #2inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_2INCH_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 .. #2.4inch LCD Module cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_2INCH4_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 ..
Auto-start when Power on
sudo cp ~/waveshare_fbcp/build/fbcp /usr/local/bin/fbcp sudo nano /etc/rc.local
And then add fbcp& before exit 0, as the picture below.
Set the display resolution
Set the user interface display size in the /boot/config.txt file.
sudo nano /boot/config.txt
Then add the following lines at the end of the config.txt.
hdmi_force_hotplug=1 hdmi_cvt=[options] hdmi_group=2 hdmi_mode=1 hdmi_mode=87 display_rotate=0
Replace the above hdmi_cvt=[options] according to the LCD Module you are using.
#2.4inchinch LCD Module & 2inchinch LCD Module hdmi_cvt=640 480 60 1 0 0 0 #1.8inch LCD Module hdmi_cvt=400 300 60 1 0 0 0 #1.3inch LCD Module & 1.54inch LCD Module hdmi_cvt=300 300 60 1 0 0 0 #1.14inch LCD Module hdmi_cvt=300 170 60 1 0 0 0 #0.96inch LCD Module hdmi_cvt=300 150 60 1 0 0 0
【Note】If you are using Raspberry Pi 4B, you need to comment out the following lines on the [pi4] part. The modification is as below:
[pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack #dtoverlay=vc4-fkms-v3d #max_framebuffers=2
And then reboot the system
sudo reboot
After rebooting the system, the Raspberry Pi OS user interface will be displayed.