浏览代码

GT2560 v4.1B, YHCB2004 SPI character LCD (#21091)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Vert 3 年前
父节点
当前提交
490d4a504a
没有帐户链接到提交者的电子邮件

+ 8
- 0
Marlin/Configuration.h 查看文件

@@ -1954,6 +1954,14 @@
1954 1954
 //#define REPRAP_DISCOUNT_SMART_CONTROLLER
1955 1955
 
1956 1956
 //
1957
+// GT2560 (YHCB2004) LCD Display
1958
+//
1959
+// Requires Testato, Koepel softwarewire library and
1960
+// Andriy Golovnya's LiquidCrystal_AIP31068 library.
1961
+//
1962
+//#define YHCB2004
1963
+
1964
+//
1957 1965
 // Original RADDS LCD Display+Encoder+SDCardReader
1958 1966
 // http://doku.radds.org/dokumentation/lcd-display/
1959 1967
 //

+ 4
- 0
Marlin/src/inc/Conditionals_LCD.h 查看文件

@@ -50,6 +50,10 @@
50 50
 
51 51
   #define MINIPANEL
52 52
 
53
+#elif ENABLED(YHCB2004)
54
+
55
+  #define IS_ULTIPANEL 1
56
+
53 57
 #elif ENABLED(CARTESIO_UI)
54 58
 
55 59
   #define DOGLCD

+ 3
- 2
Marlin/src/inc/SanityCheck.h 查看文件

@@ -2296,8 +2296,6 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2296 2296
 #if 1 < 0 \
2297 2297
   + ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
2298 2298
   + ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
2299
-  + ENABLED(ULTIPANEL) \
2300
-  + ENABLED(ULTRA_LCD) \
2301 2299
   + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
2302 2300
   + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
2303 2301
   + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \
@@ -2346,6 +2344,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2346 2344
   + ENABLED(U8GLIB_SH1106_EINSTART) \
2347 2345
   + ENABLED(ULTI_CONTROLLER) \
2348 2346
   + ENABLED(ULTIMAKERCONTROLLER) \
2347
+  + ENABLED(ULTIPANEL) \
2348
+  + ENABLED(ULTRA_LCD) \
2349
+  + ENABLED(YHCB2004) \
2349 2350
   + ENABLED(ZONESTAR_LCD)
2350 2351
   #error "Please select only one LCD controller option."
2351 2352
 #endif

+ 4
- 0
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp 查看文件

@@ -93,6 +93,10 @@
93 93
 
94 94
   LCD_CLASS lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
95 95
 
96
+#elif ENABLED(YHCB2004)
97
+
98
+  LCD_CLASS lcd(YHCB2004_CLK, 20, 4, YHCB2004_MOSI, YHCB2004_MISO); // CLK, cols, rows, MOSI, MISO
99
+
96 100
 #else
97 101
 
98 102
   // Standard direct-connected LCD implementations

+ 5
- 0
Marlin/src/lcd/HD44780/marlinui_HD44780.h 查看文件

@@ -90,6 +90,11 @@
90 90
   #include <LiquidCrystal_I2C.h>
91 91
   #define LCD_CLASS LiquidCrystal_I2C
92 92
 
93
+#elif ENABLED(YHCB2004)
94
+
95
+  #include <LiquidCrystal_AIP31068_SPI.h>
96
+  #define LCD_CLASS LiquidCrystal_AIP31068_SPI
97
+
93 98
 #else
94 99
 
95 100
   // Standard directly connected LCD implementations

+ 47
- 22
Marlin/src/pins/mega/pins_GT2560_V3.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * GT2560 RevB + GT2560 V3.0 + GT2560 V3.1 + GT2560 V4.0 pin assignment
25
+ * Geeetech GT2560 RevB + GT2560 3.0/3.1 + GT2560 4.0/4.1 pin assignments
26 26
  */
27 27
 
28 28
 #if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
@@ -30,13 +30,13 @@
30 30
 #endif
31 31
 
32 32
 #ifndef BOARD_INFO_NAME
33
-  #define BOARD_INFO_NAME "GT2560 V3.0"
33
+  #define BOARD_INFO_NAME "GT2560 RevB/3.x/4.x"
34 34
 #endif
35 35
 
36 36
 //
37 37
 // Servos
38 38
 //
39
-#define SERVO0_PIN                            11  //13 untested  3Dtouch
39
+#define SERVO0_PIN                            11  // 13 untested  3Dtouch
40 40
 
41 41
 //
42 42
 // Limit Switches
@@ -142,7 +142,10 @@
142 142
 #define SDSS                                  53
143 143
 #define LED_PIN                               13  // Use 6 (case light) for external LED. 13 is internal (yellow) LED.
144 144
 #define PS_ON_PIN                             12
145
-#define SUICIDE_PIN                           54  // This pin must be enabled at boot to keep power flowing
145
+
146
+#if NUM_RUNOUT_SENSORS < 3
147
+  #define SUICIDE_PIN                         54  // This pin must be enabled at boot to keep power flowing
148
+#endif
146 149
 
147 150
 #ifndef CASE_LIGHT_PIN
148 151
   #define CASE_LIGHT_PIN                       6  // 21
@@ -153,26 +156,48 @@
153 156
 //
154 157
 #define BEEPER_PIN                            18
155 158
 
156
-#ifndef LCD_PINS_RS
157
-  #define LCD_PINS_RS                         20
158
-#endif
159
-#ifndef LCD_PINS_ENABLE
160
-  #define LCD_PINS_ENABLE                     17
161
-#endif
162
-#ifndef LCD_PINS_D4
163
-  #define LCD_PINS_D4                         16
164
-#endif
165
-#ifndef LCD_PINS_D5
166
-  #define LCD_PINS_D5                         21
167
-#endif
168
-#ifndef LCD_PINS_D6
169
-  #define LCD_PINS_D6                          5
170
-#endif
171
-#ifndef LCD_PINS_D7
172
-  #define LCD_PINS_D7                         36
159
+#if ENABLED(YHCB2004)
160
+  #ifndef YHCB2004_SCK
161
+    #define YHCB2004_SCK                      5
162
+  #endif
163
+  #ifndef YHCB2004_MOSI
164
+    #define YHCB2004_MOSI                     21
165
+  #endif
166
+  #ifndef YHCB2004_MISO
167
+    #define YHCB2004_MISO                     36
168
+  #endif
169
+#elif HAS_WIRED_LCD
170
+  #ifndef LCD_PINS_RS
171
+    #define LCD_PINS_RS                       20
172
+  #endif
173
+  #ifndef LCD_PINS_ENABLE
174
+    #define LCD_PINS_ENABLE                   17
175
+  #endif
176
+  #ifndef LCD_PINS_D4
177
+    #define LCD_PINS_D4                       16
178
+  #endif
179
+  #ifndef LCD_PINS_D5
180
+    #define LCD_PINS_D5                       21
181
+  #endif
182
+  #ifndef LCD_PINS_D6
183
+    #define LCD_PINS_D6                        5
184
+  #endif
185
+  #ifndef LCD_PINS_D7
186
+    #define LCD_PINS_D7                       36
187
+  #endif
173 188
 #endif
174 189
 
175
-#if IS_NEWPANEL
190
+#if ENABLED(YHCB2004)
191
+  #ifndef BTN_EN1
192
+    #define BTN_EN1                           16
193
+  #endif
194
+  #ifndef BTN_EN2
195
+    #define BTN_EN2                           17
196
+  #endif
197
+  #ifndef BTN_ENC
198
+    #define BTN_ENC                           19
199
+  #endif
200
+#elif IS_NEWPANEL
176 201
   #ifndef BTN_EN1
177 202
     #define BTN_EN1                           42
178 203
   #endif

+ 2
- 2
Marlin/src/pins/mega/pins_GT2560_V3_A20.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * Geeetech A20M pin assignment
25
+ * Geeetech A20M board pin assignments
26 26
  */
27 27
 
28 28
 #define LCD_PINS_RS                            5
@@ -30,7 +30,7 @@
30 30
 #define LCD_PINS_D4                           21
31 31
 #define LCD_PINS_D7                            6
32 32
 
33
-#define SPEAKER  // The speaker can produce tones
33
+#define SPEAKER                                  // The speaker can produce tones
34 34
 
35 35
 #if IS_NEWPANEL
36 36
   #define BTN_EN1                             16

+ 3
- 3
Marlin/src/pins/mega/pins_GT2560_V3_MC2.h 查看文件

@@ -21,9 +21,9 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
-/*****************************************************************
25
- * GT2560 V3.0 pin assignment (for Mecreator 2)
26
- *****************************************************************/
24
+/**
25
+ * Geeetech GT2560 V 3.0 board pin assignments (for Mecreator 2)
26
+ */
27 27
 
28 28
 #define BOARD_INFO_NAME "GT2560 V3.0 (MC2)"
29 29
 

+ 1
- 1
Marlin/src/pins/mega/pins_HJC2560C_REV2.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * HJC2560-C Rev2.x pin assignments
25
+ * Geeetech HJC2560-C Rev 2.x board pin assignments
26 26
  */
27 27
 
28 28
 #if NOT_TARGET(__AVR_ATmega2560__)

+ 1
- 2
Marlin/src/pins/stm32f1/pins_GTM32_MINI.h 查看文件

@@ -22,8 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * 24 May 2018 - @chepo for STM32F103VET6
26
- * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
25
+ * Geeetech GTM32 Mini board pin assignments
27 26
  */
28 27
 
29 28
 #if NOT_TARGET(__STM32F1__)

+ 1
- 2
Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h 查看文件

@@ -22,8 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * 24 May 2018 - @chepo for STM32F103VET6
26
- * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
25
+ * Geeetech GTM32 Mini A30 board pin assignments
27 26
  */
28 27
 
29 28
 #if NOT_TARGET(__STM32F1__)

+ 3
- 3
Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h 查看文件

@@ -22,15 +22,15 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * 24 May 2018 - @chepo for STM32F103VET6
26
- * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
25
+ * Geeetech GTM32 Pro VB/VD board pin assignments
26
+ * http://www.geeetech.com/wiki/index.php/File:Hardware_GTM32_PRO_VB.pdf
27 27
  */
28 28
 
29 29
 #if NOT_TARGET(__STM32F1__)
30 30
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
31 31
 #endif
32 32
 
33
-#define BOARD_INFO_NAME      "GTM32 Pro VB"
33
+#define BOARD_INFO_NAME      "GTM32 Pro VB/VD"
34 34
 #define DEFAULT_MACHINE_NAME "STM32F103VET6"
35 35
 
36 36
 #define BOARD_NO_NATIVE_USB

+ 2
- 3
Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h 查看文件

@@ -22,15 +22,14 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * 24 May 2018 - @chepo for STM32F103VET6
26
- * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
25
+ * Geeetech GTM32 Rev. B board pin assignments
27 26
  */
28 27
 
29 28
 #if NOT_TARGET(__STM32F1__)
30 29
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
31 30
 #endif
32 31
 
33
-#define BOARD_INFO_NAME      "GTM32 Pro VB"
32
+#define BOARD_INFO_NAME      "GTM32 Rev B"
34 33
 #define DEFAULT_MACHINE_NAME "M201"
35 34
 
36 35
 #define BOARD_NO_NATIVE_USB

+ 1
- 0
platformio.ini 查看文件

@@ -219,6 +219,7 @@ lib_deps           =
219 219
 # Feature Dependencies
220 220
 #
221 221
 [features]
222
+YHCB2004                = red-scorp/LiquidCrystal_AIP31068@^1.0.4, red-scorp/SoftSPIB@^1.1.1
222 223
 HAS_TFT_LVGL_UI         = lvgl=https://github.com/makerbase-mks/LVGL-6.1.1-MKS/archive/master.zip
223 224
                           src_filter=+<src/lcd/extui/lib/mks_ui>
224 225
                           extra_scripts=download_mks_assets.py

正在加载...
取消
保存