TroubleshootingArduino

dfr0669 with Mega2560 help

userHead Philip.Ellerbrock 2026-02-13 09:19:43 18 Views0 Replies

I'm trying to get an image to display on dfr0669 connected to a Mega2560. 

 

My wiring is below:

 

TFT_CS: 10

TFT_DC: 9

TFT_RS: 8

TFT_SD: 4

TFT_BL: 5

SCK: 52

MISO: 50

MOSI: 51

INT: 2

SCA: 20

SCL: 21

 

I'm using the example provided in DFRobot_GDL library. I'm defining pins as below:

 

/* AVR series mainboard */

#else

#define TFT_DC  9

#define TFT_CS  10

#define TFT_RST 8

#define TFT_BL  5

#define TFT_SD  4

#endif

/**

 

I have uncommented this line:

 

DFRobot_ILI9488_320x480_HW_SPI screen(/*dc=*/TFT_DC,/*cs=*/TFT_CS,/*rst=*/TFT_RST);

 

I have updated the filename/path with my image.

 

Using this sample code with the modifications above, serial monitor outputs “initialization failed”. I have done a few sample sketches via ChatGPT and I have been able to get the SD initialized with this wiring/pinout, but I am unable to get both to work together.

 

I'm using a Mega2560 as I will eventually need to move pins2, 4, 5, 8, 9, and 10 as I have a motor shield that will be inserted.