NHD-2.4-240320CF-CSXN#-F with ESP32 Devkit V1

Hi,

I like to use a NHD-2.4-240320CF-CSXN#-F from Newhaven Display (Product Specification) with a ESP32 Devkit V1 (Product Specifications).
Here is video where this display is used with an ESP32 Devkit V1.

My Sketch to test is:

//****  Screen and SPIFFS Headers and Defines ****
//************************************************

//#include<HardwareSerial.h>
#include<TFT_eSPI.h>
#include<SPI.h>
#include "LogoJR.h"
#include "LogoOV.h"

#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF
#define GREY    0x18E3

//HardwareSerial Serial1(1);
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite needle = TFT_eSprite(&tft);
TFT_eSprite Nav1 = TFT_eSprite(&tft);
TFT_eSprite Nav2 = TFT_eSprite(&tft);


//******************************************
//****  FreeRTOS Headers and Variables  ****
//******************************************

#include"freertos/FreeRTOS.h"
#include"freertos/Task.h"
//#include"freertos/semphr.h"
#include"esp_system.h"
#include<stdio.h>

#define OuterRadius 160
#define InnerRadius 130
#define xCenter 160
#define yCenter 160

void setup() {
  tft.init();
  tft.setRotation(0);
  Serial.begin(115200,SERIAL_8N1);
}

void loop() {  
  delay(20);
}

//*************************
//****  Splash Screen  ****
//*************************

void splash(){
  Serial.print("Splash Screen");
  tft.fillScreen(BLACK);
  tft.drawBitmap(45,85,logobunny,150,149,WHITE);
  delay(3000);
  tft.fillScreen(WHITE);
  tft.setWindow(20,91,20+199,91+136);
  tft.pushColors(logoOV,200*137);
  delay(3000);
  tft.fillScreen(GREY);
  tft.fillCircle(xCenter,yCenter,InnerRadius,BLACK);  
}

Configuration at User_Setup.h from the TFT_eSPI library is:

#define ST7789_DRIVER
#define TFT_WIDTH  240
#define TFT_HEIGHT 320
#define ESP32_PARALLEL
#define TFT_CS   -1  
#define TFT_DC   15  
#define TFT_RST  22 
#define TFT_WR   2  
#define TFT_RD   4  
#define TFT_D0   16   
#define TFT_D1   17   
#define TFT_D2   5   
#define TFT_D3   18  
#define TFT_D4   19
#define TFT_D5   21
#define TFT_D6   26
#define TFT_D7   25
#define SMOOTH_FONT
#define SPI_FREQUENCY  40000000
#define SPI_READ_FREQUENCY  20000000
#define SPI_TOUCH_FREQUENCY  2500000

I'm not able to get a picture. I have no idea what I've made wrong. Hope someone could help me.

#define ESP32_PARALLEL

#define TFT_CS  -1

Shirley, if God gave you a /CS pin it is wise to use it.

Your configuration looks ok but we have no idea whether your wiring is accurate in real life.
The Panel needs ribbon signal #31:

31 | IM0 | MPU | IM0=0: 16-bit i80 IM0=1: 8-bit i80

David.

#31 is contacted to 3.3V, CS is contacted to ground

I verified the wiring pretty often and I'm pretty sure it is OK.

You don't have to believe in God. Simply follow her advice.

it means it is wrong what I did??

No, it is not necessarily wrong. Just unwise (tm).

I would always match the default wiring in the library example if there is a problem.

You can always re-wire according to your personal preference when the screen has been verified.

I have an 8080-8 ST7789V display. I am 100% certain that it will run on an ESP32 board with Bodmer's TFT_eSPI.

I might check this later. And I might even repeat the test with a hard-wired /CS=0. I have 50% confidence that /CS=0 will be reliable. I will not know until I try it.

David.

Thanks!!!

I get a hint I should try this connection:

lc28 = d19
lc26 = d18
lc24 = d17
lc22 = d16

lc12 = d23
lc11 = d13
lc13 = d27
lc23 = d26
lc25 = d25
lc27 = d33
lc29 = d32
lc30 = d14

instead:
lc28 = d26
lc26 = d19
lc24 = d5
lc22 = d16

lc12 = d2
lc11 = d15
lc13 = d4
lc23 = d17
lc25 = d18
lc27 = d21
lc29 = d25
lc30 = d22

What do you think?

the other connection dosen't work, too

I found a demo code, but I can not compile. I get the error 'GPIOC' was not declared in this scope. Is this code written for Arduino?

The code could be found here:
http://newhavendisplay.com/learnmore/2_4-240320CF-CSXN-F/

Display works. I checked the fps connector many times, but it was still not OK. I changed it and the display works.