WAVESHARE 4inch DSI LCD 4inch Capacitive Touch Display User Guide
- May 15, 2024
- WAVESHARE
Table of Contents
- Introduction
- Working with Raspberry Pi
- Add a command corresponding to the display rotation angle at the beginning of
- display rotated 90 degrees video=DSI-1:480x800M@60,rotate=90
- display rotated 180 degrees video=DSI-1:480x800M@60, rotate=180
- display rotated 270 degrees video=DSI-1:480x800ME@60, rotate=270
- Modify the instruction of the touch rotation angle at the end of the conf
- 90° : dtoverlay=WS xinchDSI Touch, invertedx, invertedy
- 180°: dtoverlay=WS xinchDSI Touch, invertedy, swappedxy
- 270°: dtoverlay=WS xinchDSI Touch
- 0°: dtoverlay=WS xinchDSI Touch, invertedx, swappedxy
- Determine the currently used kernel version, such as the 5.15.61 kernel, and
- Check the bits of the system, 32-bit system enters 32 directory, 64-bit s
- cd o4 cd
- Resources
- FAQ
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
- Step 1: Download and enter the Waveshare-DSI-LCD driver folder git clone
- Step 2: Enter uname -a in the terminal to view the kernel version, and cd to
- 5.15.61 then run the following command cd 5.15.61
- Step 3: Please check the bits of your system, enter the 32 directory for 32
- cd 64
- Step 4: Enter your corresponding model command to install the driver, pay a
- 4inch DSI LCD 480×800 Driver: sudo bash ./WS_xinchDSI_MAIN.sh 40 I2C0
- Step 5: Wait for a few seconds, when the driver installation is complete an d
- Note: The above steps need to ensure that the Raspberry Pi can connect to t
4inch DSI LCD
Introduction
Features
- 4inch IPS capacitive touch screen with a hardware resolution of 480 × 800.
- Adopts optical bonding tech, picture is clearer.
- Tempered glass capacitive touch panel, hardness up to 6H.
- Drive LCD directly through Raspberry Pi’s DSI interface with a refresh rate of up to 60Hz.
- Working with Raspberry Pi, supports Raspberry Pi OS system.
- Supports Pi 4B/3B+/3A+, Another adapter cable is required for CM3+/4.
- Support backlight adjusted by software.
Working with Raspberry Pi
Hardware connection
- Use a 15PIN FPC cable to connect the 4inch DSI LCD to the DSI interface of the Raspberry Pi.
- The Raspberry Pi is installed on the display board with the back facing down, and the 5V power supply and I2C communication are connected through the 4PIN.
Software settings
Method 1: Install Manually
-
Download the image from the Raspberry Pi website .
-
Connect the TF card to the PC, and use SDFormattere software to format the TF card.
-
Open the Win32DiskImager softwaree , select the system image downloaded in step 2, and click “write” to write the system image.
-
After the image has finished writing, save, and quit the TF card safely.
-
Connect the TF card to the Raspberry Pi, start the Raspberry Pi, and log in to the terminal of the Raspberry Pi (you can connect the Raspberry Pi to an HDMI display or log in remotely with ssh).
Step 1: Download and enter the Waveshare-DSI-LCD driver folder git clone
https://github.com/waveshare/Waveshare-DSI-LCD cd Waveshare-DSI-LCD
Step 2: Enter uname -a in the terminal to view the kernel version, and cd to
the corresponding file directory
5.15.61 then run the following command cd 5.15.61
Step 3: Please check the bits of your system, enter the 32 directory for 32
-bit systems, and enter the 64 directory for 64-bit systems cd 32
cd 64
Step 4: Enter your corresponding model command to install the driver, pay a
ttention to the selection of the I2C DIP switch
4inch DSI LCD 480×800 Driver: sudo bash ./WS_xinchDSI_MAIN.sh 40 I2C0
Step 5: Wait for a few seconds, when the driver installation is complete an d
no error is prompted, restart and load the DSI driver and it can be used n ormally sudo reboot
Note: The above steps need to ensure that the Raspberry Pi can connect to t
he Internet normally.
Note: The above steps need to ensure that the Raspberry Pi can be connected to the Internet normally. -
Wait for the system to restart, it will be able to display and touch normally.
Method 2: Program Pre-install Image
-
Select your corresponding Raspberry Pi version image, download and decompress it as “.img” file.
Raspberry Pi 4B/CM4 version download: Waveshare DSI LCD – Pi4 pre-install image
Raspberry Pi 3B/3B+/CM3 version download: Waveshare DSI LCD – Pi3 pre-install image
2. Connect the TF card to the PC and use SDFormatteré to format the TF card.
3. Open Win32DiskImager software, choose the system image prepared in the first step, and then click “write” to write the system image. -
After the programming is finished, open the config.txt file in the root directory of the TF card, add the following code under [all], save and eject the TF card safely.
dtoverlay=WS xinchDSI Screen, SCREEN type=1,I2C bus=10
dtoverlay=WS xinchDSI Touch, invertedx, swappedxy,I2C bus=10 -
Connect the TF card to the Raspberry Pi, and start the Raspberry Pi, wait for about 30 seconds to display and touch normally.
Rotation
Method 1: Graphical Interface Rotation
In the start menu, select: Preferences->Screen
Configuration->Configure->Screens->DSI- 1->Orientation, select the
corresponding angle in it, click “v”, select Yes, and restart. Method 2: Rotation Display In Lite Version
sudo nano /boot/cmdline.txt
Add a command corresponding to the display rotation angle at the beginning of
the cmdline.txt file, save it and restart it to take effect
display rotated 90 degrees video=DSI-1:480x800M@60,rotate=90
display rotated 180 degrees video=DSI-1:480x800M@60, rotate=180
display rotated 270 degrees video=DSI-1:480x800ME@60, rotate=270
Touch To Rotate
sudo nano /boot/config.txt
Modify the instruction of the touch rotation angle at the end of the conf
ig.txt file, and it will take effect after restarting (there is a 0° touch direction instruction by default)
90° : dtoverlay=WS xinchDSI Touch, invertedx, invertedy
180°: dtoverlay=WS xinchDSI Touch, invertedy, swappedxy
270°: dtoverlay=WS xinchDSI Touch
0°: dtoverlay=WS xinchDSI Touch, invertedx, swappedxy
Backlight Control
Method 1: Graphical Interface Dimming
Using the application provided by Waveshare:
cd Waveshare-DSI-LCD
Determine the currently used kernel version, such as the 5.15.61 kernel, and
run the following command cd 5.15.61
Check the bits of the system, 32-bit system enters 32 directory, 64-bit s
ystem enters 64 directory cd 32
cd o4 cd
Backlight sudo ./install.sh
After the installation is complete, you can open the program in the Start menu
– > Accessories – > Brightness, as shown below: Method 2: Lite Version Dimming Command
To adjust the system command of the lite version, after entering the root
privilege, execute the following command on the Raspberry Pi terminal:
echo X > /sys/waveshare/rpi backlight/brightness
(X value in the range of 0~255)
For example:
sudo su root echo 100 > /sys/waveshare/rpi backlight/brightness
Note
-
Update the system, such as executing the following command
sudo apt-get update
sudo apt-get full-upgrade
After updating the system, some files of the originally installed driver may be overwritten, and the driver needs to be reinstalled to display normally. -
Replace the motherboard
If the driver originally installed on the Raspberry Pi 4 Model B, the user replaces the motherboard, such as modifying it to a Raspberry Pi 3 Model B+, the display will not display properly.
Because Pi4 and Pi3 need to load different driver files, you need to reinstall the driver on the new motherboard to display properly.
Resources
Software
Pre-installed images
- 4inch DSI LCD_220906_32_bullseye
- Waveshare DSI LCD – Pi4 pre-install image
- Waveshare DSI LCD – Pi3 pre-install image
FAQ
Question:Cameras cannot work when using the 2021-10-30-raspios-bullseye- armhf image.
Answer: Please configure as below and try to use the camera again. sudo raspi- config Choose Advanced Options -> Glamor -> Yes(Enabled) -> OK -> Finish -> Yes(Reboot)
Question:How to replace the Raspberry Pi startup logo image?
Answer: Replace the custom image with the image in /usr/share/plymouth/themes/pix/splash.png.
Anti-Piracy
Since the first-generation Raspberry Pi released, Waveshare has been working
on designing, developing, and producing various fantastic touch LCDs for the
Pi. Unfortunately, there are quite a few pirated/knock-off products in the
market. They’re usually some poor copies of our early hardware revisions, and
comes with none support service.
To avoid becoming a victim of pirated products, please pay attention to the
following features when purchasing: (Click to enlarge )
Beware of knock-offs
Please note that we’ve found some poor copies of this item in the market.
They are usually made of inferior materials and shipped without any testing.
You might be wondering if the one you’re watching or you’ve purchased in other
non – official stores is original, feel free to contact us.
Support
If you require technical support, please go to the page and open a ticket.
References
- waveshare.com/w/upload/6/6d/RPi-LCD-Anti-Piracy-l.jpg
- GitHub - waveshare/Waveshare-DSI-LCD
- DSI FFC Flexible Flat Cable 15cm
- File:4inch-DSI-LCD-Manual-02.jpg - Waveshare Wiki
- File:4inch-DSI-LCD-PI4.jpg - Waveshare Wiki
- File:4inch-DSI-LCD.jpg - Waveshare Wiki
- File:Top-2.png - Waveshare Wiki
- Waveshare Wiki