Skip to main content

3.5-inch Display (Resistive Touch)

  • Video Tutorial


The Walnut Pi official 3.5-inch display (resistive touch) uses the SPI bus with a maximum speed of 80MHz. The backlight is controllable, and the official driver supports system desktop display and other UI functions.

Note

The Walnut Pi does not currently support third-party Raspberry Pi 3.5-inch displays.

3.5_lcd1

The back side exposes GPIO pins via a patch ribbon cable connector, meaning that even when plugged into the Walnut Pi, you can still connect I2C, serial communication devices, and other modules.

3.5_lcd.png

Specifications
Resolution480x320 (Pixels)
Interface4-wire SPI (max speed: 80MHz)
Display ICst7796
Touch PanelXPT2046 (Resistive Touch)
Operating Temperature-20℃ ~ 60℃
Storage Temperature-30℃ ~ 70℃
Dimensions83x55mm
Weight75g

  • Pinout:
Pin No.LabelDescription
1, 173.3VPower Positive (3.3V Input)
2, 45VPower Positive (5V Input)
6, 9, 14, 20, 25GNDPower Ground
11TP_IRQTouch Panel Interrupt, LOW when pressed
18LCD_DCCommand/Data Select, LOW=Command, HIGH=Data
19SPI_MOSILCD SPI Data Input
21SPI_MISOTouch Panel SPI Data Output
22RSTReset
23SPI_CLKLCD/Touch Panel Clock Signal
24LCD_CSLCD Chip Select, Active LOW
26TP_CSTouch Panel Chip Select, Active LOW

Enabling LCD Display

The Walnut Pi system already includes the relevant display drivers, supported on both Desktop and Server editions. Use the following command to enable desktop display (supports TAB auto-completion):

sudo set-lcd lcd35-st7796 install

After configuration, reboot the board:

sudo reboot
Note:

You can also configure this by modifying the screen parameter in /boot/config.txt: screen=lcd35-st7796. config.txt Display Configuration Tutorial

Unplug the HDMI cable, wait patiently for the system to boot, and you will see the desktop interface on the LCD (Server edition displays the terminal), shown in the default orientation below:

3.5_lcd1


Note

The above command works for both the Walnut Pi Desktop edition and Server edition (the Server edition will display the terminal). After making this configuration, if an HDMI display is also connected, the display will take priority. To show on the LCD, you must unplug the HDMI cable.

Setting LCD Display Orientation

Use the following command to set the display orientation, supporting angles of 0, 90, 180, and 270 degrees. The default is 270 degrees. For the Desktop edition, 270 or 90 is recommended, as portrait orientation can cause content to be truncated.

sudo set-lcd lcd35-st7796 set_rotate 270

Disabling LCD Display

Use the following command to remove the LCD display function and boot from HDMI:

sudo set-lcd lcd35-st7796 remove

Using on Raspberry Pi

The Walnut Pi 3.5-inch touch display provides a driver package adapted for Raspberry Pi. Once installed, it can be used on a Raspberry Pi. For detailed usage instructions, refer to the README in the project:

Project link: https://github.com/walnutpi/rpi-lcd

3.5_lcd2