Last active
December 13, 2024 21:28
-
-
Save climatex/363f78db24959f8886149c3b740f35d1 to your computer and use it in GitHub Desktop.
MegaFDC w/ OLED display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example with a 128x64 OLED display (SSD1309) thru SPI: | |
ui.cpp line 8: | |
replace "U8G2_ST7920_128X64_F_8080 display(U8G2_R0, DISP_D0, DISP_D1, DISP_D2, DISP_D3, DISP_D4, DISP_D5, DISP_D6, DISP_D7, DISP_E, U8X8_PIN_NONE, DISP_RS, DISP_RST);" | |
with "U8G2_SSD1309_128X64_NONAME2_F_4W_SW_SPI display(U8G2_R0, DISP_D7, DISP_D6, DISP_D3, DISP_D4, DISP_D5);" | |
then connect the display as follows, using the original pinheader for the ST7920: | |
pin 20 - GND | |
pin 19 - VCC | |
pin 14 - clock (SCL/D0) | |
pin 13 - data (SDA/D1/MISO) | |
pin 12 - reset (RES) | |
pin 11 - DC | |
pin 10 - CS | |
WARNING: only connect displays that are +5V compatible, | |
otherwise connect display VCC to +3.3V of Mega2560 and use level shifters on data lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment