|
@@ -0,0 +1,257 @@
|
|
1
|
+/**
|
|
2
|
+ * Marlin 3D Printer Firmware
|
|
3
|
+ * Copyright (C) 2019 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
|
+
|
|
23
|
+/**
|
|
24
|
+ * Z-Bolt X Series board – based on Arduino Mega2560
|
|
25
|
+ */
|
|
26
|
+
|
|
27
|
+#if HOTENDS > 4 || E_STEPPERS > 4
|
|
28
|
+ #error "Z-Bolt X Series board supports up to 4 hotends / E-steppers."
|
|
29
|
+#endif
|
|
30
|
+
|
|
31
|
+#define BOARD_NAME "Z-Bolt X Series"
|
|
32
|
+
|
|
33
|
+#if ENABLED(TARGET_LPC1768)
|
|
34
|
+ #error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
|
|
35
|
+#elif defined(__STM32F1__)
|
|
36
|
+ #error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
|
|
37
|
+#endif
|
|
38
|
+
|
|
39
|
+#if DISABLED(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768)
|
|
40
|
+ #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
|
|
41
|
+ #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
|
42
|
+ #endif
|
|
43
|
+#endif
|
|
44
|
+
|
|
45
|
+//
|
|
46
|
+// Servos
|
|
47
|
+//
|
|
48
|
+#ifndef SERVO0_PIN
|
|
49
|
+ #define SERVO0_PIN 11
|
|
50
|
+#endif
|
|
51
|
+#ifndef SERVO3_PIN
|
|
52
|
+ #define SERVO3_PIN 4
|
|
53
|
+#endif
|
|
54
|
+
|
|
55
|
+//
|
|
56
|
+// Limit Switches
|
|
57
|
+//
|
|
58
|
+#define X_MIN_PIN 3
|
|
59
|
+#ifndef X_MAX_PIN
|
|
60
|
+ #define X_MAX_PIN 2
|
|
61
|
+#endif
|
|
62
|
+#define Y_MIN_PIN 14
|
|
63
|
+#define Y_MAX_PIN 15
|
|
64
|
+#define Z_MIN_PIN 18
|
|
65
|
+#define Z_MAX_PIN 19
|
|
66
|
+
|
|
67
|
+//
|
|
68
|
+// Z Probe (when not Z_MIN_PIN)
|
|
69
|
+//
|
|
70
|
+#ifndef Z_MIN_PROBE_PIN
|
|
71
|
+ #define Z_MIN_PROBE_PIN 32
|
|
72
|
+#endif
|
|
73
|
+
|
|
74
|
+//
|
|
75
|
+// Steppers
|
|
76
|
+//
|
|
77
|
+#define X_STEP_PIN 54
|
|
78
|
+#define X_DIR_PIN 55
|
|
79
|
+#define X_ENABLE_PIN 38
|
|
80
|
+#ifndef X_CS_PIN
|
|
81
|
+ #define X_CS_PIN -1
|
|
82
|
+#endif
|
|
83
|
+
|
|
84
|
+#define Y_STEP_PIN 60
|
|
85
|
+#define Y_DIR_PIN 61
|
|
86
|
+#define Y_ENABLE_PIN 56
|
|
87
|
+#ifndef Y_CS_PIN
|
|
88
|
+ #define Y_CS_PIN -1
|
|
89
|
+#endif
|
|
90
|
+
|
|
91
|
+#define Z_STEP_PIN 46
|
|
92
|
+#define Z_DIR_PIN 48
|
|
93
|
+#define Z_ENABLE_PIN 62
|
|
94
|
+#ifndef Z_CS_PIN
|
|
95
|
+ #define Z_CS_PIN -1
|
|
96
|
+#endif
|
|
97
|
+
|
|
98
|
+#define E0_STEP_PIN 26
|
|
99
|
+#define E0_DIR_PIN 28
|
|
100
|
+#define E0_ENABLE_PIN 24
|
|
101
|
+#ifndef E0_CS_PIN
|
|
102
|
+ #define E0_CS_PIN -1
|
|
103
|
+#endif
|
|
104
|
+
|
|
105
|
+#define E1_STEP_PIN 36
|
|
106
|
+#define E1_DIR_PIN 34
|
|
107
|
+#define E1_ENABLE_PIN 30
|
|
108
|
+#ifndef E1_CS_PIN
|
|
109
|
+ #define E1_CS_PIN -1
|
|
110
|
+#endif
|
|
111
|
+
|
|
112
|
+// Red
|
|
113
|
+#define E2_STEP_PIN 42
|
|
114
|
+#define E2_DIR_PIN 40
|
|
115
|
+#define E2_ENABLE_PIN 65
|
|
116
|
+#ifndef E2_CS_PIN
|
|
117
|
+ #define E2_CS_PIN -1
|
|
118
|
+#endif
|
|
119
|
+
|
|
120
|
+// Black
|
|
121
|
+#define E3_STEP_PIN 44
|
|
122
|
+#define E3_DIR_PIN 64
|
|
123
|
+#define E3_ENABLE_PIN 66
|
|
124
|
+#ifndef E3_CS_PIN
|
|
125
|
+ #define E3_CS_PIN -1
|
|
126
|
+#endif
|
|
127
|
+
|
|
128
|
+//
|
|
129
|
+// Temperature Sensors
|
|
130
|
+//
|
|
131
|
+#define TEMP_0_PIN 13 // Analog Input
|
|
132
|
+#define TEMP_1_PIN 15 // Analog Input
|
|
133
|
+#define TEMP_2_PIN 5 // Analog Input (BLACK)
|
|
134
|
+#define TEMP_3_PIN 9 // Analog Input (RED)
|
|
135
|
+#define TEMP_BED_PIN 14 // Analog Input
|
|
136
|
+
|
|
137
|
+//
|
|
138
|
+// Heaters / Fans
|
|
139
|
+//
|
|
140
|
+#define HEATER_0_PIN 10
|
|
141
|
+#define HEATER_1_PIN 7
|
|
142
|
+#define HEATER_2_PIN 6
|
|
143
|
+#define HEATER_3_PIN 5
|
|
144
|
+#define HEATER_BED_PIN 8
|
|
145
|
+
|
|
146
|
+#define FAN_PIN 9
|
|
147
|
+
|
|
148
|
+//
|
|
149
|
+// Misc. Functions
|
|
150
|
+//
|
|
151
|
+#define SDSS 53
|
|
152
|
+#define LED_PIN 13
|
|
153
|
+
|
|
154
|
+#ifndef FILWIDTH_PIN
|
|
155
|
+ #define FILWIDTH_PIN 5 // Analog Input on AUX2
|
|
156
|
+#endif
|
|
157
|
+
|
|
158
|
+// Оn the servos connector
|
|
159
|
+#ifndef FIL_RUNOUT_PIN
|
|
160
|
+ #define FIL_RUNOUT_PIN 4
|
|
161
|
+#endif
|
|
162
|
+
|
|
163
|
+#ifndef PS_ON_PIN
|
|
164
|
+ #define PS_ON_PIN 12
|
|
165
|
+#endif
|
|
166
|
+
|
|
167
|
+#define AUX2_PINS_FREE !( BOTH(ULTRA_LCD, NEWPANEL) && ANY(PANEL_ONE, VIKI2, miniVIKI, MINIPANEL, REPRAPWORLD_KEYPAD) )
|
|
168
|
+
|
|
169
|
+#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
|
|
170
|
+ #if NUM_SERVOS <= 1 // try to use servo connector first
|
|
171
|
+ #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
|
|
172
|
+ #elif AUX2_PINS_FREE
|
|
173
|
+ #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
|
|
174
|
+ #endif
|
|
175
|
+#endif
|
|
176
|
+
|
|
177
|
+//
|
|
178
|
+// M3/M4/M5 - Spindle/Laser Control
|
|
179
|
+//
|
|
180
|
+#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA)
|
|
181
|
+ #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
|
|
182
|
+ #define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup/pulldown!
|
|
183
|
+ #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
|
|
184
|
+ #define SPINDLE_DIR_PIN 5
|
|
185
|
+ #elif AUX2_PINS_FREE
|
|
186
|
+ #define SPINDLE_LASER_ENA_PIN 40 // Pin should have a pullup/pulldown!
|
|
187
|
+ #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
|
|
188
|
+ #define SPINDLE_DIR_PIN 65
|
|
189
|
+ #endif
|
|
190
|
+#endif
|
|
191
|
+
|
|
192
|
+#undef AUX2_PINS_FREE
|
|
193
|
+
|
|
194
|
+//
|
|
195
|
+// TMC software SPI
|
|
196
|
+//
|
|
197
|
+#if ENABLED(TMC_USE_SW_SPI)
|
|
198
|
+ #ifndef TMC_SW_MOSI
|
|
199
|
+ #define TMC_SW_MOSI 66
|
|
200
|
+ #endif
|
|
201
|
+ #ifndef TMC_SW_MISO
|
|
202
|
+ #define TMC_SW_MISO 44
|
|
203
|
+ #endif
|
|
204
|
+ #ifndef TMC_SW_SCK
|
|
205
|
+ #define TMC_SW_SCK 64
|
|
206
|
+ #endif
|
|
207
|
+#endif
|
|
208
|
+
|
|
209
|
+#if HAS_DRIVER(TMC2208)
|
|
210
|
+ /**
|
|
211
|
+ * TMC2208 stepper drivers
|
|
212
|
+ *
|
|
213
|
+ * Hardware serial communication ports.
|
|
214
|
+ * If undefined software serial is used according to the pins below
|
|
215
|
+ */
|
|
216
|
+ //#define X_HARDWARE_SERIAL Serial1
|
|
217
|
+ //#define X2_HARDWARE_SERIAL Serial1
|
|
218
|
+ //#define Y_HARDWARE_SERIAL Serial1
|
|
219
|
+ //#define Y2_HARDWARE_SERIAL Serial1
|
|
220
|
+ //#define Z_HARDWARE_SERIAL Serial1
|
|
221
|
+ //#define Z2_HARDWARE_SERIAL Serial1
|
|
222
|
+ //#define E0_HARDWARE_SERIAL Serial1
|
|
223
|
+ //#define E1_HARDWARE_SERIAL Serial1
|
|
224
|
+ //#define E2_HARDWARE_SERIAL Serial1
|
|
225
|
+ //#define E3_HARDWARE_SERIAL Serial1
|
|
226
|
+ //#define E4_HARDWARE_SERIAL Serial1
|
|
227
|
+
|
|
228
|
+ //
|
|
229
|
+ // Software serial
|
|
230
|
+ //
|
|
231
|
+
|
|
232
|
+ #define X_SERIAL_TX_PIN 40
|
|
233
|
+ #define X_SERIAL_RX_PIN 63
|
|
234
|
+ #define X2_SERIAL_TX_PIN -1
|
|
235
|
+ #define X2_SERIAL_RX_PIN -1
|
|
236
|
+
|
|
237
|
+ #define Y_SERIAL_TX_PIN 59
|
|
238
|
+ #define Y_SERIAL_RX_PIN 64
|
|
239
|
+ #define Y2_SERIAL_TX_PIN -1
|
|
240
|
+ #define Y2_SERIAL_RX_PIN -1
|
|
241
|
+
|
|
242
|
+ #define Z_SERIAL_TX_PIN 42
|
|
243
|
+ #define Z_SERIAL_RX_PIN 65
|
|
244
|
+ #define Z2_SERIAL_TX_PIN -1
|
|
245
|
+ #define Z2_SERIAL_RX_PIN -1
|
|
246
|
+
|
|
247
|
+ #define E0_SERIAL_TX_PIN 44
|
|
248
|
+ #define E0_SERIAL_RX_PIN 66
|
|
249
|
+ #define E1_SERIAL_TX_PIN -1
|
|
250
|
+ #define E1_SERIAL_RX_PIN -1
|
|
251
|
+ #define E2_SERIAL_TX_PIN -1
|
|
252
|
+ #define E2_SERIAL_RX_PIN -1
|
|
253
|
+ #define E3_SERIAL_TX_PIN -1
|
|
254
|
+ #define E3_SERIAL_RX_PIN -1
|
|
255
|
+ #define E4_SERIAL_TX_PIN -1
|
|
256
|
+ #define E4_SERIAL_RX_PIN -1
|
|
257
|
+#endif
|