Template: Waveshare-DSI-LCD-choose

From Waveshare Wiki
Jump to: navigation, search

Method 2: Program Pre-install Image

1. Click to download Waveshare DSI LCD - Pi4 pre-install image and unzip it to get ".img" file.
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,
4. After programming, open the "config.txt" file in the root directory of the TF card. Modify it to the corresponding model of the driver, save and then safely remove the TF card.

[all]
ignore_lcd=1
dtparam=i2c_vc=on
dtparam=i2c_arm=on
#Choose DSI screen model (Comment out the dtoverlay of the corresponding model)
#DSI Display Model choose(Remove the dtoverlay comment corresponding to the display model)

#For example, 8inch DSI LCD (C) / 10.1inch DSI LCD(C) uses:
#Example 8inch DSI LCD (C) / 10.1inch DSI LCD(C) use:
dtoverlay=WS_xinchDSI_Screen,SCREEN_type=8,I2C_bus=10
dtoverlay=WS_xinchDSI_Touch,invertedx,swappedxy,I2C_bus=10

#2.8inch DSI LCD use:
#dtoverlay=WS_xinchDSI_Screen,SCREEN_type=0,I2C_bus=10
#dtoverlay=WS_xinchDSI_Touch,invertedy,swappedxy,I2C_bus=10

#4inch DSI LCD use:
#dtoverlay=WS_xinchDSI_Screen,SCREEN_type=1,I2C_bus=10
#dtoverlay=WS_xinchDSI_Touch,invertedx,swappedxy,I2C_bus=10

#7inch DSI LCD(C) use:
#dtoverlay=WS_xinchDSI_Screen,SCREEN_type=2,I2C_bus=1
#dtoverlay=WS_xinchDSI_Touch,dtoverlay=WS_xinchDSI_Touch,I2C_bus=1

#7.9inch DSI LCD use:
#dtoverlay=WS_xinchDSI_Screen,SCREEN_type=5,I2C_bus=10
#dtoverlay=WS_xinchDSI_Touch,invertedx,invertedy,I2C_bus=10

#11.9inch DSI LCD use:
#dtoverlay=WS_xinchDSI_Screen,SCREEN_type=6,I2C_bus=10
#dtoverlay=WS_xinchDSI_Touch,invertedx,invertedy,I2C_bus=10

#8inch DSI LCD (C) / 10.1inch DSI LCD(C) use:
#dtoverlay=WS_xinchDSI_Screen,SCREEN_type=8,I2C_bus=10
#dtoverlay=WS_xinchDSI_Touch,invertedx,swappedxy,I2C_bus=10
Note: Before switching to other DSI screen drivers, you need to comment out the existing dtoverlay driver code with #.

5. Connect the TF card to the Raspberry Pi, and start the Raspberry Pi, wait for about 30 seconds to display and touch normally.