Problem with 2.4 inch LCD from waveshare not working on Mega [solved]

Hello guys :slight_smile:

I am trying to use the Waveshare 2.4 LCD module for my build: 2.4inch LCD Module.

When using an Arduino Uno and connecting it as depicted here: 2.4inch LCD Module - Arduino Uno hardware connection, everything works fine.

The problem starts when I try using it with an Arduino Mega. I tried plugging it in the same way as the Uno, but other than getting a white screen, I didn't get a response from the screen.
Then I checked each of my Mega pins and found pin 6 and 7 doesn't work as expected so I changed the DC pin from 7 to 3 and changed the code at DEV_Config.h line 51 from #define DEV_DC_PIN 7 to
#define DEV_DC_PIN 3 but unfortunately this didn't work as well.

I am using the supplied library by Waveshare, which can be found here: Demo code download.

VirusTotal scan of the files: Scan.

I believe I am missing something, as this is the first time I'm working with displays. Please guide me on how to overcome this.

Thanks!

so i managed to solve this by doing the following changes:
as stated here
UNO
MOSI = D11
SCK = D13
SS = D10

MEGA
MOSI = 51
SCK = 52
SS = 53
and also changing the code in dev_config.h to:

#define DEV_CS_PIN 53

#define DEV_DC_PIN 8

#define DEV_RST_PIN 9

#define DEV_BL_PIN 10
1 Like

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