❌ Connecting directly to display will cause damage.
The ATmega2560 operates at 5V. The display operates at 3.3V.
To connect safely, a "level-shifter" is needed.
Display | Arduino |
---|---|
VCC | 3.3V |
GND | GND |
D/C | D2 * |
SDI | D51 |
CS | D4 * |
CLK | D52 |
BUSY | D5 * |
* Can be changed. Set in constructor.
Note: The BUSY pin does not require level-shifting, as the ATmega2560 only reads this pin, never outputting 5V.
void setup() {
// Pin 53, PNP transistor
display.useCustomPowerSwitch(53, PNP);
//Later, when required:
display.customPowerOff();
display.customPowerOn();
}
⚠ Connecting directly to MicroSD module may cause damage.
These Arduinos use 5V. MicroSD operates at 3.3V.
Your MicroSD module may have an inbuilt level shifter. Many do not.
This diagram shows possible wiring for MicroSD modules which do not have an inbuilt level-shifter. Your may be able to connect directly.
❗ Take care when combining this wiring and useCustomPowerSwitch()
.
NPN
or ACTIVE_LOW
configurations will damage the SD card.
For greater protection, consider a bidirectional level shifter.