Support for a JYETech DSO138 TFT (using ili9341)

I am looking to drive this display using an esp32, and according to @david_prentice it should be using ili9341:
JYETech-DSO138-Display-2-4-TFT-LCD-module-320-X-240-resolution-suitable-for-DSO138-kits.jpg_220x220xz

https://www.aliexpress.com/item/32843627682.html .

I have seen this forum post : ILI9341 from NodeMCU through UNO

I was wondering if @LITTLEFisky had any success with his project?

Also Use JYETech 2.4 Inch LCD Display Screen Module with Arduino? which linked
https://jyetech.com/wp-content/uploads/2018/07/dso138-schematic-lcd.pdf

Also mentioned here:

Yep, was solved in post #7.

GitHub - Bodmer/TFT_eSPI: Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips You will need this library.
User_Setup.h (1,4 КБ) And put this file into %documents-folder%/Arduino/Libraries/TFT_eSPI/ . Make a backup of the original file. Pinout is in this file.

Initialise display with init();

@LITTLEFisky did you use an ESP32?

Yes, It's a ESP32-WROOM-32D

Thanks all - it is working, but maybe a little dim. I might try a different resistor...

Display Pin ESP32 Pin #define Schematic label Display Pin ESP32 Pin #define Schematic label
P1 (Not Connected) P2 (Not Connected)
P3 (Not Connected) P4 (Not Connected)
P5 Ground P6 3.3v
P7 27 TFT_CS LCD_nCS P8 14 TFT_DC LCD_RS
P9 12 TFT_WR LCD_nWR P10 13 TFT_RD LCD_nRD
P11 3.3v P12 (Not Connected)
P13 (Not Connected) P14 (Not Connected)
P15 (Not Connected) P16 180 Ohm resistor to 3.3v
P17 Ground P18 Ground
P19 Ground P20 Ground
P21 Ground P22 (Not connected)
P23 16 TFT_D0 DB0 P24 4 TFT_D1 DB1
P25 23 TFT_D2 DB2 P26 22 TFT_D3 DB3
P27 21 TFT_D4 DB4 P28 29 TFT_D5 DB5
P29 18 TFT_D6 DB6 P30 17 TFT_D7 DB7
P31 26 TFT_RST LCD_nRESET P32 3.3v
P33 3.3v P34 Ground
P35 (Not Connected) P36 (Not Connected)
P37 (Not Connected) P38 (Not Connected)
P39 (Not Connected) P40 (Not Connected)

user_setup.h

#define ESP32_PARALLEL


#define ILI9341_DRIVER


// ESP32 pins used for the parallel interface TFT
#define TFT_CS   27  // IO7 LCD_nCS -       Chip select control pin
#define TFT_WR   12  // IO9 LCD_nWR -       Write strobe control pin - must use a pin in the range 0-31

#define TFT_DC   14  // ?IO8 LCD_RS -       Data Command control pin - must use a pin in the range 0-31 (possibly Register Select)
#define TFT_RD   13  // IO10 - LCD_nRD

#define TFT_RST  26  // IO31 - LCD_nRESET - Reset pin

#define TFT_D0   16  // Must use pins in the range 0-31 for the data bus
#define TFT_D2   23  // so a single register write sets/clears all bits
#define TFT_D4   21
#define TFT_D6   18

#define TFT_D1   4   
#define TFT_D3   22
#define TFT_D5   19
#define TFT_D7   17


#define LOAD_GLCD   // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2  // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4  // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6  // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7  // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8  // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF  // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

#define SMOOTH_FONT

The data pins used in the above user_setup.h are actually D[17:10] if they correspond to the schematic of DSO138 LED module:
https://jyetech.com/wp-content/uploads/2018/07/dso138-schematic-lcd.pdf

According to the spec of ILI9341,

The IM3 IM2 IM1 IM0 should be set to 1001 for D[17:10], but they're shown as set in the above post to binary 0001 which would use D[7:-0] for registers and D[15:0] for data.

Shouldn't the IM3 and IM0 be set differently?


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.