• sales

    +86-0755-88291180

Luckfox Pico RV1103/RV1106【SPI driven LCD】

Download the SPI driver LCD example code

  

1】Pin connection diagram:

Pico pinout diagram


pico-plus pinout diagram


lcd module pinout diagram for Pico Pico-Plus




2】Use a self-compiled image (optional):

Modify the device tree file:

(You can use pre-compiled images without the need to modify the device tree yourself; image)

    You need to add the pin definitions related to the LCD in the device tree and enable the SPI functionality.

        Path to the device tree file:

            Luckfox Pico:<SDK Path>/sysdrv/source/kernel/arch/arm/boot/dts/rv1103g-luckfox-pico.dts

            Luckfox Pico Plus:<SDK Path>/sysdrv/source/kernel/arch/arm/boot/dts/rv1103g-luckfox-pico-plus.dts


            Define GPIO:

                To define a GPIO, usually two code segments need to be added. Note that the button is active at low level and requires pull-up. Here is an example showing how to add the definition of GPIO1_C7_d pin in the device tree.



gpio1pc0:gpio1pc0 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio1_pc0>;
regulator-name = "gpio1_pc0";
regulator-always-on;
};


&pinctrl {

gpio1-pc0 {
gpio1_pc0:gpio1-pc0 {
rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};


          Commenting out the peripheral function of a pin:

                    To comment out the peripheral function of a pin, you can achieve it by commenting out the corresponding peripheral node in the device tree. Here is an example showing how to disable the PWM function of the GPIO1_C7_d pin in the device tree.


     

            Configuring SPI:

                    When configuring SPI, GPIO1_C2_d is used as the reset pin for the LCD. We need to configure it as a regular IO, so it is not configured as the MISO pin for SPI here, as shown in the diagram below (please refer to the comment on line 208). To make SPI work properly, you also need to configure the SPI controller and define the required SPI pins in the device tree. Here is an example showing how to configure SPI in the device tree.



&pinctrl {

spi0 {
/omit-if-no-ref/
spi0m0_pins: spi0m0-pins {
rockchip,pins =
/* spi0_clk_m0 */
<1 RK_PC1 4 &pcfg_pull_none>,
/* spie_miso_m0 */
<1 RK_PC3 6 &pcfg_pull_none>,
/* spi_mosi_m0 */
<1 RK_PC2 6 &pcfg_pull_none>;
};
};
};


    Comoile the kernel:

        Compile and select branch ./build.sh lunch

        Choose 0 to compile the pico-related image.

        Choose 1 to compile the pico-plus-related image.


    To compile with one click or only compile the kernel:

        To compile with one click, use "./build.sh".

        To compile only the kernel, use "./build.sh kernel".

3】Use a pre-configured image (optional):

Download the SPI driver LCD example code


4】 Write the image to Pico:

Burn the image using an SD card

Burn the image using Flash


5】Download the example package and transfer the "c" folder to the Pico development board:

Please use the ADB tool to transfer the entire "c" folder to the Pico development board.

adb push Pico_LCD_Module_Code\Luckfox_Pico\c /


6】Grant permissions and run the main program

Grant executable permissions                            chmod -R x ./c


Run the main program based on the LCD size             ./main 0.96


7】Achieve the desired effect



TAG: 0.49inch OLED Screen Display 64&amp;amp;amp;times;32 SSD1315 Arduino Raspberry Pi ESP32 Pico STM32 WiFi6 0.85inch Display Raspberry-Pi-ESP32-Pico-Display-image-1.83inch-LCD-NV3030B-ADD-NEW-Picture Sipeed NanoKVM-USB Finger-sized 4K USB KVM for Server/SBCs RDK X5 PoE Module For Power Over Ethernet/ IEEE 802.3af/at PoE For D-Robotics RDK X5 Core3566004032 STM32 1.54inch OLED 2.13inch e Paper HAT+ Black-White 250x122 E-Ink For Raspberry Pi /Jetson Nano /Sunrise X3 Pi /Pwnago ESP32-S3FH4R2 USB IR Infrared Thermal Imaging Camera C 45°/88° 160x120 For Phone/PC High Temp Warning/Take Photo /Recording video Raspberry Pi CM5 Compute Module 5 Dual Gigabit Ethernet RJ45 Expansion IO Base Board 树莓派Pico 2 RP2350B-Plus-W开发板WIFI官方Radio Module 2 ESP32-S3 A7670E 4G development board supports LTE Cat-1/2G/GNSS positioning/WiFi/Bluetooth ESP32 C3 Spotpear AV to TTL X1203 Raspberry Pi 5 UPS Board Uninterruptible Power Supply For Li-Battery (NOT includ) Core1121 LoRa LR1121 HF LF SPI For Sub-GHz and 2.4GHz Raspberry Pi 3.5 inch LCD G Display Resistive TouchScreen 60fps ST7796 320x480 Also For Arduino/Pico2/ESP32/RP2040/RP2350