-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.1.x] Support some more LCD types #7824
Changes from 28 commits
2076b54
37eb88e
2756068
dd72bfd
4dd63f4
075e393
f44758c
2346eae
b0e32c4
42e3c7a
db378e3
a26cad4
9f90e8a
a68d68a
96800ae
2980dc5
f6cffaf
f77ff27
46c72c0
068d805
4836971
5013e7d
122f5aa
c84c537
ba55ef2
6a96b3a
9bc8c05
b8caa5e
faa1db8
2b37c11
29e35d8
77b78e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1503,6 +1503,37 @@ | |
// | ||
//#define OLED_PANEL_TINYBOY2 | ||
|
||
// | ||
// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller | ||
// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html | ||
// | ||
// 2 line display. | ||
// | ||
//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 | ||
|
||
// | ||
// MKS MINI12864 with graphic controller and SD support | ||
// http://reprap.org/wiki/MKS_MINI_12864 | ||
// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the one extra blank line here |
||
// | ||
//#define MKS_MINI_12864 | ||
|
||
// | ||
// Factory display for Creality CR-10 | ||
// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html | ||
// | ||
// this is a a RAMPS-compaitible version, but with a single 10-pin connector instead of 2, for CR-10 owners who want to replace the Melzi Creality board, but retain the display | ||
// | ||
//#define CR10_STOCKDISPLAY | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's see if I understand correctly. This is the option someone would select using the CR-10 display on a RAMPS-compatible board, and since the CR-10 sees it as a standard Melzi plus RRD Full Graphical Smart Display, this option may also be selected for this display in a CR-10 — since it just forces I think I have enough to work with from this PR to clean it up and merge it. I will follow up with a new PR soon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
|
||
// | ||
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER | ||
// http://reprap.org/wiki/MKS_12864OLED | ||
// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. product link goes under description. no extra blank lines w/o reason |
||
// Tiny, but very sharp OLED display | ||
// | ||
//#define MKS_12864OLED | ||
|
||
//============================================================================= | ||
//=============================== Extra Features ============================== | ||
//============================================================================= | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13583,8 +13583,14 @@ void setup() { | |
pe_deactivate_magnet(1); | ||
#endif | ||
#endif | ||
} | ||
|
||
#if defined (MKS_12864OLED) | ||
SET_OUTPUT(LCD_PINS_DC); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, this is the only place this pin is used. Does this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was in the patch file for the display. I can remove it and see if it still works. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pin coincides with |
||
SET_OUTPUT(LCD_PINS_RST); | ||
WRITE(LCD_PINS_RST, LOW); | ||
delay(1000); | ||
WRITE(LCD_PINS_RST, HIGH); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this supposed to be a different pin from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. patch file from MKS had it, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you point me to the author of that patch? I can redirect some of these questions to them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I commented out that whole reset section and renamed the pin to LCD_PINS_RS in pins_ramps.h, and it does not seem to have affected the display, it still works. The code was copied from the OEM recommendation, probably for an earlier marlin release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's an interesting piece. If it does no harm, I guess it can be left in. Anyway, off to figure out what's wrong with MKS_12864OLED. |
||
#endif | ||
} | ||
/** | ||
* The main Marlin program loop | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1138,6 +1138,7 @@ static_assert(1 >= 0 | |
* Note: BQ_LCD_SMART_CONTROLLER => REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER | ||
* REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER => REPRAP_DISCOUNT_SMART_CONTROLLER | ||
* SAV_3DGLCD => U8GLIB_SH1106 => ULTIMAKERCONTROLLER | ||
* MKS_12864OLED => U8GLIB_SH1106 => ULTIMAKERCONTROLLER | ||
* miniVIKI => ULTIMAKERCONTROLLER | ||
* VIKI2 => ULTIMAKERCONTROLLER | ||
* ELB_FULL_GRAPHIC_CONTROLLER => ULTIMAKERCONTROLLER | ||
|
@@ -1146,13 +1147,16 @@ static_assert(1 >= 0 | |
static_assert(1 >= 0 | ||
#if ENABLED(ULTIMAKERCONTROLLER) \ | ||
&& DISABLED(SAV_3DGLCD) && DISABLED(miniVIKI) && DISABLED(VIKI2) \ | ||
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) && DISABLED(PANEL_ONE) | ||
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) && DISABLED(PANEL_ONE) && DISABLED(MKS_12864OLED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this cause a conflict? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Address the rest of the tidying up, if you're still struggling with this, I'll load this up and see if I can help, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I beleive I have addressed all but the example configs, waiting to see if my configuration.h passes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you looking at the site (and not just via email ?) I have comments submitted that don't appear to be addressed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, now. |
||
+ 1 | ||
#endif | ||
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && DISABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(LCD_FOR_MELZI) | ||
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && DISABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(LCD_FOR_MELZI) && DISABLED(MKS_12864OLED) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This causes the conflict. I do not see the problem. |
||
+ 1 | ||
#endif | ||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(BQ_LCD_SMART_CONTROLLER) | ||
#if ENABLED(MKS_12864OLED) | ||
+ 1 | ||
#endif | ||
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(BQ_LCD_SMART_CONTROLLER) | ||
+ 1 | ||
#endif | ||
#if ENABLED(LCD_FOR_MELZI) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,12 @@ | |
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present | ||
#endif | ||
|
||
#if ENABLED(MKS_12864OLED) | ||
#define LCD_PINS_D5 -1 | ||
#define LCD_PINS_D6 -1 | ||
#define LCD_PINS_RST 27 | ||
#define LCD_PINS_DC 25 | ||
#endif | ||
// | ||
// Augmentation for auto-assigning RAMPS plugs | ||
// | ||
|
@@ -258,6 +264,23 @@ | |
#define LCD_PINS_D6 44 | ||
#define LCD_PINS_D7 64 | ||
#else | ||
#if ENABLED(CR10_STOCKDISPLAY) | ||
#define LCD_PINS_RS 27 | ||
#define LCD_PINS_ENABLE 29 | ||
#define LCD_PINS_D4 25 | ||
#define LCD_PINS_D5 -1 | ||
#define LCD_PINS_D6 -1 | ||
#define LCD_PINS_D7 -1 | ||
#if DISABLED(NEWPANEL) | ||
#define BEEPER_PIN 37 | ||
// Buttons are attached to a shift register | ||
// Not wired yet | ||
//#define SHIFT_CLK 38 | ||
//#define SHIFT_LD 42 | ||
//#define SHIFT_OUT 40 | ||
//#define SHIFT_EN 17 | ||
#endif | ||
#else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No TABS — Indentation is two spaces. Please change your editor settings. |
||
#define LCD_PINS_RS 16 | ||
#define LCD_PINS_ENABLE 17 | ||
#define LCD_PINS_D4 23 | ||
|
@@ -273,6 +296,7 @@ | |
//#define SHIFT_OUT 40 | ||
//#define SHIFT_EN 17 | ||
#endif | ||
#endif | ||
#endif | ||
|
||
#if ENABLED(NEWPANEL) | ||
|
@@ -281,10 +305,15 @@ | |
|
||
#define BEEPER_PIN 37 | ||
|
||
#define BTN_EN1 31 | ||
#define BTN_EN2 33 | ||
#define BTN_ENC 35 | ||
|
||
#if ENABLED(CR10_STOCKDISPLAY) | ||
#define BTN_EN1 17 | ||
#define BTN_EN2 23 | ||
#define BTN_ENC 35 | ||
#else | ||
#define BTN_EN1 31 | ||
#define BTN_EN2 33 | ||
#define BTN_ENC 35 | ||
#endif | ||
#define SD_DETECT_PIN 49 | ||
#define KILL_PIN 41 | ||
|
||
|
@@ -354,10 +383,6 @@ | |
// Pins for DOGM SPI LCD Support | ||
#define DOGLCD_A0 44 | ||
#define DOGLCD_CS 66 | ||
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 | ||
#define SDSS 53 | ||
|
||
#define KILL_PIN 64 | ||
// GLCD features | ||
//#define LCD_CONTRAST 190 | ||
// Uncomment screen orientation | ||
|
@@ -369,6 +394,29 @@ | |
#define BTN_EN2 63 | ||
#define BTN_ENC 59 | ||
// not connected to a pin | ||
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 | ||
#define SDSS 53 | ||
#define KILL_PIN 64 | ||
#define SD_DETECT_PIN 49 | ||
#elif ENABLED(MKS_MINI_12864) | ||
#define BEEPER_PIN 37 | ||
// Pins for DOGM SPI LCD Support | ||
#define DOGLCD_A0 27 | ||
#define DOGLCD_CS 25 | ||
// GLCD features | ||
//#define LCD_CONTRAST 190 | ||
// Uncomment screen orientation | ||
//#define LCD_SCREEN_ROT_90 | ||
//#define LCD_SCREEN_ROT_180 | ||
//#define LCD_SCREEN_ROT_270 | ||
// The encoder and click button | ||
#define BTN_EN1 31 | ||
#define BTN_EN2 33 | ||
#define BTN_ENC 35 | ||
// not connected to a pin | ||
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 | ||
#define SDSS 53 | ||
#define KILL_PIN 64 | ||
#define SD_DETECT_PIN 49 | ||
|
||
#else | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,9 +183,13 @@ | |
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes | ||
U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes | ||
#elif ENABLED(U8GLIB_SH1106) | ||
#if ENABLED(MKS_12864OLED) | ||
U8GLIB_SH1106_128X64 u8g(23, 17, 16, 25); // SW SPI Com: SCK = 23, MOSI = 17, CS = 16, A0 = 25 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's with the hard-coded pin numbers? According to these additions to the #if ENABLED(MKS_12864OLED)
#define LCD_PINS_DC 25
#define LCD_PINS_RST 27
#else
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#endif
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D7 29 So this line might be written instead as: U8GLIB_SH1106_128X64 u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS, LCD_PINS_DC); Was that your intention? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not familiar with your functions and macros. That was the OEM recommendation. If you show me the final code, I'll try it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, i understand, now. I'll try it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that worked |
||
#else | ||
// Generic support for SH1106 OLED I2C LCDs | ||
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes | ||
U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes | ||
U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes | ||
#endif | ||
#elif ENABLED(MINIPANEL) | ||
// The MINIPanel display | ||
//U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historically, users reverse the connectors. This is not a problem isolated to MKS_MINI12864. See my comments in the discussion regarding this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a EE, it is incorrect to install them backwards, defeats the reason for the key. I believe it is a trick by the vendor to keep everything single sourced.