Waveshare OLED working on Uno, but not Mega2560?

I have a project using a Waveshare 1.5" RGB OLED display and an Uno board. It is hooked up using the SPI interface and works perfectly. I now want to do the same project using a Mega 2560 board instead of the Uno. Everything else is the same. I have connected the display connections like this:

VCC - 5v
DIN - Pin 51
CLK - Pin 52
CS - Pin 53
DC - Pin 50
RST - Pin 8

All of these pins are defined in the sketch as noted. Everything else in the sketch is the same as the Uno version. I upload to the Mega, with proper board selected in IDE, and it compiles/uploads successfully, however the display is completely blank. I have tried it with a second display and nothing. I have also verified the 5v on the Mega. I have tried it again on the Uno, with the proper pins defined, and it works. What am I missing here? I am using the Adafruit_SSD1351.h library. Any ideas?

If you provided more information it would be easier for the community to help you.
For instance what revision of the Mega2560 do you have as the newer versions are plug compatible.

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