Raspberry Pi Pico (RP2040) + 3.2inch IPS SPI Module ILI9341 (Arduino Framework using Adafruit_ILI9341 library)

Display on 3.2inch IPS SPI Module ILI9341 with  Raspberry Pi Pico (in Arduino Framework using Adafruit_ILI9341 library).


Install Libraries:
Open Library Manager, install Adafruit_ILI9341 and dependencies.

Connection: 

ILI9341 Module	        Raspberry Pi Pico    
1 	VCC		3V3
2 	GND		GND
3 	LCD_CS		GP17
4 	LCD_RST		GP21
5 	LCD_RS		GP20
6 	SDI(MOSI)	GP19
7 	SCK		GP18
8 	LED		3V3
9 	SDO(MISO)	GP16
10 	CTP_SCL
11 	CTP_RST
12 	CTP_SDA
13 	CTP_INT
14 	SD_CS


Example:

Open Adafruit ILI9341 graphicstest example.

Modify pins assignment to match our connection.


#define TFT_DC 20
#define TFT_CS 17
#define TFT_RST 21

// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
// If using the breakout, change pins as desired
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);




updated@2023-08-17:
To fix the color for this ILI9341 Module, you have to call tft.invertDisplay(true) after tft.begin().
  tft.begin();          // Initialize screen
  tft.invertDisplay(true);



Next:
Adafruit_ImageReader exercises run on Raspberry Pi Pico to load images from SD Card, display on 320x240 IPS SPI ILI9341
Detect FT6336U Capacitive Touch Screen on Raspberry Pi Pico using Arduino-FT6336U library.


Comments

Popular posts from this blog

MicroPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI, using boochow/MicroPython-ST7735 library.

CameraWebServe: ESP32-S3 (arduino-esp32) + OV5640 camera module