Browse Source

KRATOS32 / K.32 board and LCD controllers (#21334)

K.3D 3 years ago
parent
commit
1a23ffd776
No account linked to committer's email address

+ 13
- 3
Marlin/Configuration.h View File

@@ -2182,6 +2182,11 @@
2182 2182
 //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
2183 2183
 
2184 2184
 //
2185
+// K.3D Full Graphic Smart Controller
2186
+//
2187
+//#define K3D_FULL_GRAPHIC_SMART_CONTROLLER
2188
+
2189
+//
2185 2190
 // ReprapWorld Graphical LCD
2186 2191
 // https://reprapworld.com/?products_details&products_id/1218
2187 2192
 //
@@ -2318,7 +2323,7 @@
2318 2323
 //#define OLED_PANEL_TINYBOY2
2319 2324
 
2320 2325
 //
2321
-// MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER
2326
+// MKS OLED 1.3" 128×64 Full Graphics Controller
2322 2327
 // https://reprap.org/wiki/MKS_12864OLED
2323 2328
 //
2324 2329
 // Tiny, but very sharp OLED display
@@ -2327,7 +2332,7 @@
2327 2332
 //#define MKS_12864OLED_SSD1306  // Uses the SSD1306 controller
2328 2333
 
2329 2334
 //
2330
-// Zonestar OLED 128×64 FULL GRAPHICS CONTROLLER
2335
+// Zonestar OLED 128×64 Full Graphics Controller
2331 2336
 //
2332 2337
 //#define ZONESTAR_12864LCD           // Graphical (DOGM) with ST7920 controller
2333 2338
 //#define ZONESTAR_12864OLED          // 1.3" OLED with SH1106 controller (default)
@@ -2344,10 +2349,15 @@
2344 2349
 //#define OVERLORD_OLED
2345 2350
 
2346 2351
 //
2347
-// FYSETC OLED 2.42" 128×64 FULL GRAPHICS CONTROLLER with WS2812 RGB
2352
+// FYSETC OLED 2.42" 128×64 Full Graphics Controller with WS2812 RGB
2348 2353
 // Where to find : https://www.aliexpress.com/item/4000345255731.html
2349 2354
 //#define FYSETC_242_OLED_12864   // Uses the SSD1309 controller
2350 2355
 
2356
+//
2357
+// K.3D SSD1309 OLED 2.42" 128×64 Full Graphics Controller
2358
+//
2359
+//#define K3D_242_OLED_CONTROLLER   // Software SPI
2360
+
2351 2361
 //=============================================================================
2352 2362
 //========================== Extensible UI Displays ===========================
2353 2363
 //=============================================================================

+ 1
- 0
Marlin/src/core/boards.h View File

@@ -279,6 +279,7 @@
279 279
 #define BOARD_ARCHIM2                 3024  // UltiMachine Archim2 (with TMC2130 drivers)
280 280
 #define BOARD_ALLIGATOR               3025  // Alligator Board R2
281 281
 #define BOARD_CNCONTROLS_15D          3026  // Cartesio CN Controls V15 on DUE
282
+#define BOARD_KRATOS32                3027  // K.3D Kratos32 (Arduino Due Shield)
282 283
 
283 284
 //
284 285
 // SAM3X8C ARM Cortex M3

+ 6
- 2
Marlin/src/inc/Conditionals_LCD.h View File

@@ -229,14 +229,18 @@
229 229
   #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
230 230
   #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
231 231
 
232
-#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER)
232
+#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER)
233 233
 
234 234
   #define IS_RRD_FG_SC 1
235 235
 
236 236
 #elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
237 237
 
238
-  // RepRapDiscount LCD or Graphical LCD with rotary click encoder
238
+  #define IS_RRD_SC 1   // RepRapDiscount LCD or Graphical LCD with rotary click encoder
239
+
240
+#elif ENABLED(K3D_242_OLED_CONTROLLER)
241
+
239 242
   #define IS_RRD_SC 1
243
+  #define U8GLIB_SSD1309
240 244
 
241 245
 #endif
242 246
 

+ 3
- 1
Marlin/src/inc/SanityCheck.h View File

@@ -2372,7 +2372,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
2372 2372
   + ENABLED(ULTIPANEL) \
2373 2373
   + ENABLED(ULTRA_LCD) \
2374 2374
   + ENABLED(YHCB2004) \
2375
-  + ENABLED(ZONESTAR_LCD)
2375
+  + ENABLED(ZONESTAR_LCD) \
2376
+  + ENABLED(K3D_FULL_GRAPHIC_SMART_CONTROLLER) \
2377
+  + ENABLED(K3D_242_OLED_CONTROLLER)
2376 2378
   #error "Please select only one LCD controller option."
2377 2379
 #endif
2378 2380
 

+ 1
- 1
Marlin/src/lcd/dogm/marlinui_DOGM.cpp View File

@@ -256,7 +256,7 @@ void MarlinUI::init_lcd() {
256 256
     OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
257 257
   #endif
258 258
 
259
-  #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED)
259
+  #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER)
260 260
     SET_OUTPUT(LCD_PINS_DC);
261 261
     #ifndef LCD_RESET_PIN
262 262
       #define LCD_RESET_PIN LCD_PINS_RS

+ 3
- 2
Marlin/src/lcd/dogm/marlinui_DOGM.h View File

@@ -123,9 +123,10 @@
123 123
     #define U8G_CLASS U8GLIB_SSD1306_128X64                     // 8 stripes
124 124
   #endif
125 125
 
126
-#elif ENABLED(FYSETC_242_OLED_12864)
126
+#elif EITHER(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER)
127 127
 
128
-  // FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER
128
+  // FYSETC OLED 2.42" 128 × 64 Full Graphics Controller
129
+  // or K3D OLED 2.42" 128 × 64 Full Graphics Controller
129 130
 
130 131
   #define FORCE_SOFT_SPI                                        // SW-SPI
131 132
 

+ 2
- 0
Marlin/src/pins/pins.h View File

@@ -447,6 +447,8 @@
447 447
   #include "sam/pins_PRINTRBOARD_G2.h"          // SAM3X8C                                env:DUE_USB
448 448
 #elif MB(CNCONTROLS_15D)
449 449
   #include "sam/pins_CNCONTROLS_15D.h"          // SAM3X8E                                env:DUE env:DUE_USB
450
+#elif MB(KRATOS32)
451
+  #include "sam/pins_KRATOS32.h"                // SAM3X8E                                env:DUE env:DUE_USB
450 452
 
451 453
 //
452 454
 // STM32 ARM Cortex-M0

+ 179
- 0
Marlin/src/pins/sam/pins_KRATOS32.h View File

@@ -0,0 +1,179 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * KRATOS32
26
+ */
27
+
28
+#include "env_validate.h"
29
+
30
+#define BOARD_INFO_NAME "K.3D KRATOS32"
31
+
32
+//
33
+// EEPROM
34
+//
35
+#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
36
+  #define I2C_EEPROM
37
+  #define MARLIN_EEPROM_SIZE             0x1F400  //   16KB
38
+#endif
39
+
40
+//
41
+// Servos
42
+//
43
+#define SERVO0_PIN                             6
44
+#define SERVO1_PIN                             5
45
+#define SERVO2_PIN                            39
46
+#define SERVO3_PIN                            40  // CAMERA_PIN (extended to the top of the LCD module)
47
+#define SERVO4_PIN                            45  // FIL_RUNOUT_PIN
48
+
49
+//
50
+// Limit Switches
51
+//
52
+#define X_MIN_PIN                             28
53
+#define X_MAX_PIN                             34
54
+#define Y_MIN_PIN                             30
55
+#define Y_MAX_PIN                             36
56
+#define Z_MIN_PIN                             32
57
+#define Z_MAX_PIN                             38
58
+
59
+//
60
+// Steppers
61
+//
62
+#define X_STEP_PIN                            24
63
+#define X_DIR_PIN                             23
64
+#define X_ENABLE_PIN                          26
65
+#ifndef X_CS_PIN
66
+  #define X_CS_PIN                            25
67
+#endif
68
+
69
+#define Y_STEP_PIN                            17
70
+#define Y_DIR_PIN                             16
71
+#define Y_ENABLE_PIN                          22
72
+#ifndef Y_CS_PIN
73
+  #define Y_CS_PIN                            27
74
+#endif
75
+
76
+#define Z_STEP_PIN                             2
77
+#define Z_DIR_PIN                              3
78
+#define Z_ENABLE_PIN                          15
79
+#ifndef Z_CS_PIN
80
+  #define Z_CS_PIN                            29
81
+#endif
82
+
83
+#define E0_STEP_PIN                           61
84
+#define E0_DIR_PIN                            60
85
+#define E0_ENABLE_PIN                         62
86
+#ifndef E0_CS_PIN
87
+  #define E0_CS_PIN                           31
88
+#endif
89
+
90
+#define E1_STEP_PIN                           64
91
+#define E1_DIR_PIN                            63
92
+#define E1_ENABLE_PIN                         65
93
+#ifndef E1_CS_PIN
94
+  #define E1_CS_PIN                           37
95
+#endif
96
+
97
+#define E2_STEP_PIN                           68
98
+#define E2_DIR_PIN                            67
99
+#define E2_ENABLE_PIN                         69
100
+#ifndef E2_CS_PIN
101
+  #define E2_CS_PIN                           35
102
+#endif
103
+
104
+#define E3_STEP_PIN                           51
105
+#define E3_DIR_PIN                            53
106
+#define E3_ENABLE_PIN                         49
107
+#ifndef E3_CS_PIN
108
+  #define E3_CS_PIN                           33
109
+#endif
110
+
111
+//
112
+// Temperature Sensors
113
+//
114
+#define TEMP_0_PIN                             0  // Analog Input
115
+#define TEMP_1_PIN                             1  // Analog Input
116
+#define TEMP_2_PIN                             2  // Analog Input
117
+#define TEMP_3_PIN                             3  // Analog Input
118
+#define TEMP_BED_PIN                           4  // Analog Input
119
+
120
+//
121
+// Heaters / Fans
122
+//
123
+#define HEATER_0_PIN                          13
124
+#define HEATER_1_PIN                          12
125
+#define HEATER_2_PIN                          11
126
+#define HEATER_3_PIN                          10
127
+#define HEATER_BED_PIN                         7  // BED
128
+
129
+#ifndef FAN_PIN
130
+  #define FAN_PIN                              9
131
+#endif
132
+#define FAN1_PIN                               8
133
+
134
+//
135
+// Misc. Functions
136
+//
137
+#ifndef FIL_RUNOUT_PIN
138
+  #define FIL_RUNOUT_PIN                      45  // SERVO4_PIN
139
+#endif
140
+
141
+#ifndef PS_ON_PIN
142
+  #define PS_ON_PIN                           59
143
+#endif
144
+
145
+//
146
+// LCD / Controller
147
+//
148
+#if HAS_WIRED_LCD
149
+
150
+  #define BTN_EN1                             48
151
+  #define BTN_EN2                             50
152
+  #define BTN_ENC                             46
153
+
154
+  #define SDSS                                 4
155
+  #define SD_DETECT_PIN                       14
156
+
157
+  #define BEEPER_PIN                          41
158
+  #define KILL_PIN                            66
159
+
160
+  #if IS_RRD_FG_SC
161
+
162
+    #define LCD_PINS_RS                       42
163
+    #define LCD_PINS_ENABLE                   43
164
+    #define LCD_PINS_D4                       44
165
+
166
+    #define BTN_BACK                          52
167
+
168
+  #elif ENABLED(K3D_242_OLED_CONTROLLER)
169
+
170
+    #define LCD_PINS_DC                       44
171
+    #define LCD_PINS_RS                       42
172
+    #define DOGLCD_CS                         52
173
+    #define DOGLCD_MOSI                       43
174
+    #define DOGLCD_SCK                        47
175
+    #define DOGLCD_A0                LCD_PINS_DC
176
+
177
+  #endif
178
+
179
+#endif // HAS_WIRED_LCD

Loading…
Cancel
Save