Переглянути джерело

Update MKS BASE and v1.6 pins (#16806)

Daniel Mazurkiewicz 4 роки тому
джерело
коміт
e561f744fa
Аккаунт користувача з таким Email не знайдено

+ 1
- 1
Marlin/src/pins/pins.h Переглянути файл

@@ -105,7 +105,7 @@
105 105
 #elif MB(BAM_DICE_DUE)
106 106
   #include "ramps/pins_BAM_DICE_DUE.h"          // ATmega1280, ATmega2560                 env:megaatmega1280 env:megaatmega2560
107 107
 #elif MB(MKS_BASE)
108
-  #include "ramps/pins_MKS_BASE.h"              // ATmega1280, ATmega2560                 env:megaatmega1280 env:megaatmega2560
108
+  #include "ramps/pins_MKS_BASE_10.h"           // ATmega1280, ATmega2560                 env:megaatmega1280 env:megaatmega2560
109 109
 #elif MB(MKS_BASE_14)
110 110
   #include "ramps/pins_MKS_BASE_14.h"           // ATmega2560                             env:megaatmega2560
111 111
 #elif MB(MKS_BASE_15)

Marlin/src/pins/ramps/pins_MKS_BASE.h → Marlin/src/pins/ramps/pins_MKS_BASE_10.h Переглянути файл

@@ -31,23 +31,7 @@
31 31
   #error "MKS BASE 1.0 supports up to 2 hotends / E-steppers. Comment out this line to continue."
32 32
 #endif
33 33
 
34
-#ifndef BOARD_INFO_NAME
35
-  #define BOARD_INFO_NAME "MKS BASE 1.0"
36
-#endif
37
-
38
-//
39
-// Heaters / Fans
40
-//
41
-// Power outputs EFBF or EFBE
42
-#define MOSFET_D_PIN              7
43
-
44
-#define CASE_LIGHT_PIN            2
45
-
46
-//
47
-// M3/M4/M5 - Spindle/Laser Control
48
-//
49
-#define SPINDLE_LASER_PWM_PIN     2   // Hardware PWM
50
-#define SPINDLE_LASER_ENA_PIN    15   // Pullup!
51
-#define SPINDLE_DIR_PIN          19
34
+#define BOARD_INFO_NAME "MKS BASE 1.0"
35
+#define MKS_BASE_VERSION 10
52 36
 
53
-#include "pins_RAMPS.h"
37
+#include "pins_MKS_BASE_common.h"

+ 11
- 32
Marlin/src/pins/ramps/pins_MKS_BASE_14.h Переглянути файл

@@ -30,52 +30,31 @@
30 30
 #endif
31 31
 
32 32
 #define BOARD_INFO_NAME "MKS BASE 1.4"
33
+#define MKS_BASE_VERSION 14
33 34
 
34 35
 //
35 36
 // Heaters / Fans
36 37
 //
37
-#define MOSFET_D_PIN              7   // PH4 ** Pin16 ** PWM7   //E1
38
-#define FAN_PIN                   9   // PH6 ** Pin18 ** PWM9
38
+#define FAN_PIN             9   // PH6 ** Pin18 ** PWM9
39 39
 
40 40
 // Other Mods
41
-#define CASE_LIGHT_PIN           11   // PB5 ** Pin24 ** PWM11
42
-#define SERVO3_PIN               12   // PB6 ** Pin25 ** D12
43
-#define PS_ON_PIN                 2   // X+ // PE4 ** Pin6  ** PWM2       **MUST BE HARDWARE PWM
44
-#define FILWIDTH_PIN             15   // Y+ // PJ0 ** Pin63 ** USART3_RX  **Pin should have a pullup!
45
-#define FIL_RUNOUT_PIN           19   // Z+ // PD2 ** Pin45 ** USART1_RX
46
-
47
-//
48
-// M3/M4/M5 - Spindle/Laser Control
49
-//
50
-#define SPINDLE_LASER_PWM_PIN     2   // X+ // PE4 ** Pin6  ** PWM2       **MUST BE HARDWARE PWM
51
-#define SPINDLE_LASER_ENA_PIN    15   // Y+ // PJ0 ** Pin63 ** USART3_RX  **Pin should have a pullup!
52
-#define SPINDLE_DIR_PIN          19   // Z+ // PD2 ** Pin45 ** USART1_RX
53
-
54
-//
55
-// Microstepping pins
56
-//
57
-#define X_MS1_PIN                 5   // PE3 ** Pin5  ** PWM5
58
-#define X_MS2_PIN                 6   // PH3 ** Pin15 ** PWM6
59
-#define Y_MS1_PIN                59   // PF5 ** Pin92 ** A5
60
-#define Y_MS2_PIN                58   // PF4 ** Pin93 ** A4
61
-#define Z_MS1_PIN                22   // PA0 ** Pin78 ** D22
62
-#define Z_MS2_PIN                39   // PG2 ** Pin70 ** D39
63
-#define E0_MS1_PIN               64   // PK2 ** Pin87 ** A10
64
-#define E0_MS2_PIN               63   // PK1 ** Pin88 ** A9
65
-#define E1_MS1_PIN               57   // PF3 ** Pin94 ** A3
66
-#define E1_MS2_PIN                4   // PG5 ** Pin1  ** PWM4
41
+#define CASE_LIGHT_PIN     11   // PB5 ** Pin24 ** PWM11
42
+#define SERVO3_PIN         12   // PB6 ** Pin25 ** D12
43
+#define PS_ON_PIN           2   // X+ // PE4 ** Pin6  ** PWM2       **MUST BE HARDWARE PWM
44
+#define FILWIDTH_PIN       15   // Y+ // PJ0 ** Pin63 ** USART3_RX  **Pin should have a pullup!
45
+#define FIL_RUNOUT_PIN     19   // Z+ // PD2 ** Pin45 ** USART1_RX
67 46
 
68 47
 #ifndef RGB_LED_R_PIN
69
-  #define RGB_LED_R_PIN          50
48
+  #define RGB_LED_R_PIN    50
70 49
 #endif
71 50
 #ifndef RGB_LED_R_PIN
72
-  #define RGB_LED_G_PIN          51
51
+  #define RGB_LED_G_PIN    51
73 52
 #endif
74 53
 #ifndef RGB_LED_R_PIN
75
-  #define RGB_LED_B_PIN          52
54
+  #define RGB_LED_B_PIN    52
76 55
 #endif
77 56
 
78
-#include "pins_RAMPS.h"
57
+#include "pins_MKS_BASE_common.h"
79 58
 
80 59
 /*
81 60
   Available connectors on MKS BASE v1.4

+ 2
- 15
Marlin/src/pins/ramps/pins_MKS_BASE_15.h Переглянути файл

@@ -30,19 +30,6 @@
30 30
 #endif
31 31
 
32 32
 #define BOARD_INFO_NAME "MKS BASE 1.5"
33
+#define MKS_BASE_VERSION 15
33 34
 
34
-#include "pins_MKS_BASE.h"
35
-
36
-/**
37
- * Microstepping pins
38
- */
39
-#define X_MS1_PIN            5   // Digital 3  / Pin 5   / PE3  / SERVO2_PIN
40
-#define X_MS2_PIN            6   // Digital 6  / Pin 14  / PH3  / SERVO1_PIN
41
-#define Y_MS1_PIN           59   // Analog 5   / Pin 92  / PF5
42
-#define Y_MS2_PIN           58   // Analog 4   / Pin 93  / PF4
43
-#define Z_MS1_PIN           22   // Digital 22 / Pin 78  / PA0
44
-#define Z_MS2_PIN           39   // Digital 39 / Pin 70  / PG2
45
-#define E0_MS1_PIN          63   // Analog 9   / Pin 86  / PK1
46
-#define E0_MS2_PIN          64   // Analog 10  / Pin 87  / PK2
47
-#define E1_MS1_PIN          57   // Analog 3   / Pin 93  / PF3
48
-#define E1_MS2_PIN           4   // Digital 4  / Pin 1   / PG5  / SERVO3_PIN
35
+#include "pins_MKS_BASE_common.h"

+ 25
- 14
Marlin/src/pins/ramps/pins_MKS_BASE_16.h Переглянути файл

@@ -30,19 +30,30 @@
30 30
 #endif
31 31
 
32 32
 #define BOARD_INFO_NAME "MKS BASE 1.6"
33
+#define MKS_BASE_VERSION 16
33 34
 
34
-#include "pins_MKS_BASE.h"
35
+//
36
+// Servos
37
+//
38
+#define SERVO1_PIN         12   // Digital 12 / Pin 25
35 39
 
36
-/**
37
- * Microstepping pins
38
- */
39
-#define X_MS1_PIN            5   // Digital 3  / Pin 5   / PE3  / SERVO2_PIN
40
-#define X_MS2_PIN            6   // Digital 6  / Pin 14  / PH3  / SERVO1_PIN
41
-#define Y_MS1_PIN           59   // Analog 5   / Pin 92  / PF5
42
-#define Y_MS2_PIN           58   // Analog 4   / Pin 93  / PF4
43
-#define Z_MS1_PIN           22   // Digital 22 / Pin 78  / PA0
44
-#define Z_MS2_PIN           39   // Digital 39 / Pin 70  / PG2
45
-#define E0_MS1_PIN          63   // Analog 9   / Pin 86  / PK1
46
-#define E0_MS2_PIN          64   // Analog 10  / Pin 87  / PK2
47
-#define E1_MS1_PIN          57   // Analog 3   / Pin 93  / PF3
48
-#define E1_MS2_PIN           4   // Digital 4  / Pin 1   / PG5  / SERVO3_PIN
40
+//
41
+// Omitted RAMPS pins
42
+//
43
+#ifndef SERVO2_PIN
44
+  #define SERVO2_PIN       -1
45
+#endif
46
+#ifndef SERVO3_PIN
47
+  #define SERVO3_PIN       -1
48
+#endif
49
+#ifndef FILWIDTH_PIN
50
+  #define FILWIDTH_PIN     -1
51
+#endif
52
+#ifndef FIL_RUNOUT_PIN
53
+  #define FIL_RUNOUT_PIN   -1
54
+#endif
55
+#ifndef PS_ON_PIN
56
+  #define PS_ON_PIN        -1
57
+#endif
58
+
59
+#include "pins_MKS_BASE_common.h"

+ 75
- 0
Marlin/src/pins/ramps/pins_MKS_BASE_common.h Переглянути файл

@@ -0,0 +1,75 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * MKS BASE – Arduino Mega2560 with RAMPS pin assignments
26
+ */
27
+
28
+#ifndef BOARD_INFO_NAME
29
+  #define BOARD_INFO_NAME "MKS BASE"
30
+#endif
31
+
32
+#if MKS_BASE_VERSION == 14 || MKS_BASE_VERSION == 15
33
+  //
34
+  // Heaters / Fans
35
+  //
36
+  // Power outputs EFBF or EFBE
37
+  #define MOSFET_D_PIN      7
38
+
39
+  //
40
+  // M3/M4/M5 - Spindle/Laser Control
41
+  //
42
+  #if HAS_CUTTER
43
+    #define SPINDLE_LASER_PWM_PIN  2   // Hardware PWM
44
+    #define SPINDLE_LASER_ENA_PIN 15   // Pullup!
45
+    #define SPINDLE_DIR_PIN       19
46
+  #endif
47
+
48
+  #ifndef CASE_LIGHT_PIN
49
+    #define CASE_LIGHT_PIN  2
50
+  #endif
51
+
52
+#endif
53
+
54
+//
55
+// Microstepping pins
56
+//
57
+#if MKS_BASE_VERSION >= 14      //     |===== 1.4 =====|===== 1.5+ =====|
58
+  #define X_MS1_PIN         5   // PE3 | Pin  5 | PWM5 |        | D3    | SERVO2_PIN
59
+  #define X_MS2_PIN         6   // PH3 | Pin 15 | PWM6 | Pin 14 | D6    | SERVO1_PIN
60
+  #define Y_MS1_PIN        59   // PF5 | Pin 92 | A5   |        |       |
61
+  #define Y_MS2_PIN        58   // PF4 | Pin 93 | A4   |        |       |
62
+  #define Z_MS1_PIN        22   // PA0 | Pin 78 | D22  |        |       |
63
+  #define Z_MS2_PIN        39   // PG2 | Pin 70 | D39  |        |       |
64
+  #if MKS_BASE_VERSION == 14
65
+    #define E0_MS1_PIN     64   // PK2 | Pin 87 | A10  |        |       |
66
+    #define E0_MS2_PIN     63   // PK1 | Pin 88 | A9   |        |       |
67
+  #else
68
+    #define E0_MS1_PIN     63   // PK1 |        |      | Pin 86 | A9    |
69
+    #define E0_MS2_PIN     64   // PK2 |        |      | Pin 87 | A10   |
70
+  #endif
71
+  #define E1_MS1_PIN       57   // PF3 | Pin 94 | A3   | Pin 93 | A3    |
72
+  #define E1_MS2_PIN        4   // PG5 | Pin  1 | PWM4 |        | D4    | SERVO3_PIN
73
+#endif
74
+
75
+#include "pins_RAMPS.h"

Завантаження…
Відмінити
Зберегти