• sales

    +86-0755-88291180

Raspberry Pi 7inch DSI LCD (C) User Guide

Introduction

7inch Capacitive Touch Display for Raspberry Pi, 1024×600, IPS Wide Angle, MIPI DSI Interface

Features

  • 7inch IPS display with capacitive touch panel, hardware resolution is 1024 x 600
  • Capacitive touch, supports up to 5-points touch
  • Toughened glass capacitive touch panel, 6H hardness
  • DSI interface, refresh rate up to 60Hz.
  • Driver is provided for Raspberry Pi OS (Raspbian)
  • Brightness is adjustable by software

Hardware Connection

  • Connect the 7inch DSI LCD (C) (display hereafter) to the DSI interface of Raspberry Pi boards by 15PIN FPC cable.
  • For easy use, you can fix the Raspberry Pi board to the backside of the display by standoffs and screws provided.
  • Connect the 4PIN cable between the display and the 40PIN of Raspberry Pi according to the figure below.

Install Driver

Method 1
Use a pre-built image
We provide a ready-to-use image based on the 2021-05-07-raspios-buster-armhf-full image. Please download it and unzip it to get the img file. Write the .img file to your TF card and test it in your Raspberry Pi.
Method 2
Install the driver manually
  • Download the newest Raspberry Pi OS and unzip it.
  • Connect the TF card to your PC and format it by Panasonic_SDFormatter
  • Write the .img file to your TF card by Win32DiskImager image. Please take care of the drive and the file path when writing.
  • After writing, eject it from PC and connect to Raspberry Pi board.
  • Power and start the Raspberry Pi, open the terminal and run the following commands to install the driver.(You may need to remote connect the Pi via ssh or connect a HDMI display for installing)
git clone git://github.com/waveshare/7inch-DSI-LCD-C.git
cd 7inch-DSI-LCD-C
chmod +x WS_7inchDSI1024x600_MAIN.sh
sudo ./WS_7inchDSI1024x600_MAIN.sh
sudo reboot

Note: To install the driver, you should connect the Rasberry Pi to the network

  • Reboot the Raspberry Pi and test

Configure orientation

Display
  • Choose Menu -> Preferences -> Screen Configuration
  • Choose Configure->Screens->DSI-1->Orientation and select the diretion to adjust the orientation.

normal: Default setting
right: Rotate 90 degree (anticlockwise)
inverted:Rotate 180 degree
left: Rotate 270 degree (anticlockwise)

Note: If you use Raspberry Pi 4, you should enable the line dtoverlay=vc4-fkms-V3D in config.txt file

Touch

If you need to adjust the touch as well as the display orientation, you need to configure it further.

  • Install libinput
sudo apt-get install xserver-xorg-input-libinput
  • Create a xorg.conf.d fold in /etc/X11
sudo mkdir /etc/X11/xorg.conf.d
  • Copy the 40-libinput-conf file to the folder created
sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
  • Modify the file
sudo nano /etc/X11/xorg.conf.d/40-libinput.conf 
  • Find the touchscreen options and add the setting line according to the orientaion
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
  • Save and reboot your Pi
sudo reboot

After completing these steps. The LCD could rotate 90 degrees both display and touch function.

Note:

90 degree: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

180 degree: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"

270 degree: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

Brightness Control

Method 1

Modify the config.txt file.
Change the line dtoverlay=WS_7inchDSI1024x600_Screen to dtoverlay=WS_7inchDSI1024x600_Screen,Backlight=x
x is the value of the brighness, it should be in the range from 0 to 255, 0 is dimest and 255 is the brightest.
For example, you can set it as dtoverlay=WS_7inchDSI1024x600_Screen,Backlight=255
After setting, reboot the Raspberry Pi.

Method 2

Waveshare provides a tool for adjusting brightness in GUI (only supports Raspberry Pi OS), you can install it with the following commands.

cd 7inch-DSI-LCD-C
cd brightness
sudo ./install.sh

After installing, you can choose Menu -> Accessories -> Brightness to open the tool and adjust.

Use Camera

  • Description

The driver of the 7inch DSI LCD (C) will be in conflict with raspicam.

In this case, if you want to use the camera, you need to install the new libcamera.

libcamera-apps is an application based on libcamera, it have all the function of libcamera.

  • Hardware connection

Shutdown Raspberry Pi first, connect the camera to Raspberry Pi and power it on.

Note: Please do not replug the camera while the Raspberry Pi working, otherwise, the camera interface and camera may be damaged.

  • Update and open the camera
libcamera-apps support Pi 3 and Pi 4.
  • Update Raspberry Pi
sudo apt update
  • Configure dtoverlay in /boot/config.txt file according to the camera type.
sudo nano /boot/config.txt

Add the following lines to the config.txt file:

 #IMX219 Camera:
 dtoverlay=imx219
 #If you use OV5647 camera, please change it to this line:
 #dtoverlay=ov5647
 #If you use IMX477 camera, please change it to this line:
 #dtoverlay=imx477

Open camera by raspi-config:

sudo raspi-config

Choose Interface Options -》 P1 Camera and choose Yes -》 Finish -》 Yes, finally, reboot Raspberry Pi.

  • Install libcamera Method 1

Note 1: We commend you to use the Pi 4 to install and build the libcamera-apps.

Note 2: If you are not able to install it, recommend you use the ready-to-use image.

  • Install denpendencies of libcamera:
 sudo apt install libboost-dev -y
 sudo apt install libgnutls28-dev openssl libtiff5-dev -y
 sudo apt install qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 -y
 sudo apt install meson -y
 sudo pip3 install pyyaml ply
 sudo pip3 install --upgrade meson
  • Download and built the libcamera:
 git clone git://linuxtv.org/libcamera.git
 cd libcamera
 meson build
 cd build
 meson configure -Dpipelines=raspberrypi -Dtest=false
 cd ..
 ninja -C build
 sudo ninja -C build install
  • libepoxy
 sudo apt install libegl1-mesa-dev
 cd
 git clone https://github.com/anholt/libepoxy.git
 cd libepoxy
 mkdir _build
 cd _build
 meson
 ninja
 sudo ninja install
  • libcamera-apps

Install Libcamera-apps

 sudo apt install cmake libboost-program-options-dev libdrm-dev libexif-dev
 cd
 git clone https://github.com/raspberrypi/libcamera-apps.git
 cd libcamera-apps
 mkdir build
 cd build
 cmake ..
 make -j4
<pre>
Test the camera by libcamera-hello:
<pre>
 ./libcamera-hello

About the comamnd:

libcamera-still   #Similar to raspistill
libcamera-vid     #Similar to raspivid
libcamera-raw     #a version of libcamera-vid, use for save original video without compression.
libcamera-hello   #Basic command for previewing camera.
libcamera-jpeg    #A simple version of libcamera——Preview and captur JPEG.


Note, the libcamera-app will conver the original DSI driver, you need to install it again for displaying.

cd 7inch-DSI-LCD-C
sudo ./WS_7inchDSI1024x600_MAIN.sh
sudo reboot
  • Install libcamera,Method 2

For easy use, we make a script in Github.

Please update the Raspberry Pi first:

sudo apt-get update

You can install it by the following commands:

1. Download and install the libcamera-install file

git clone https://github.com/waveshare/libcamera-install
cd libcamera-install
sudo chmod +x install_libcamera_all.sh
sudo ./install_libcamera_all.sh

2. It is successful if the line "echo "install Succeed" is printed, and it is failed if the line "echo "install Fail" is printed.

After installing, three folders are saved in the libcamera-install directory, libcamera libcamera-apps libepoxy folders. If you want to reinstall the libcamera, you need to detect these folders first.


3. Restart the software.

sudo reboot

4. Test the camera to preview for 5s

cd /home/pilibcamera-install/libcamera-apps/build
./libcamera-hello
  • More

For more information about the libcamera, please refer to:

https://www.raspberrypi.com/documentation/accessories/camera.html

https://github.com/raspberrypi/libcamera-apps/blob/main/README.md

https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf