|
@@ -0,0 +1,280 @@
|
|
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
|
+#pragma once
|
|
23
|
+
|
|
24
|
+#define BOARD_INFO_NAME "BIGTREE SKR 1.4"
|
|
25
|
+
|
|
26
|
+//
|
|
27
|
+// SD Connection
|
|
28
|
+//
|
|
29
|
+#ifndef SDCARD_CONNECTION
|
|
30
|
+ #define SDCARD_CONNECTION LCD
|
|
31
|
+#endif
|
|
32
|
+
|
|
33
|
+//
|
|
34
|
+// Servos
|
|
35
|
+//
|
|
36
|
+#define SERVO0_PIN P2_00
|
|
37
|
+
|
|
38
|
+//
|
|
39
|
+// Limit Switches
|
|
40
|
+//
|
|
41
|
+#define X_STOP_PIN P1_29
|
|
42
|
+#define Y_STOP_PIN P1_28
|
|
43
|
+#define Z_STOP_PIN P1_27
|
|
44
|
+
|
|
45
|
+//
|
|
46
|
+// Z Probe (when not Z_MIN_PIN)
|
|
47
|
+//
|
|
48
|
+#ifndef Z_MIN_PROBE_PIN
|
|
49
|
+ #define Z_MIN_PROBE_PIN P0_10
|
|
50
|
+#endif
|
|
51
|
+
|
|
52
|
+//
|
|
53
|
+// Filament Runout Sensor
|
|
54
|
+//
|
|
55
|
+#define FIL_RUNOUT_PIN P1_26
|
|
56
|
+#define FIL_RUNOUT2_PIN P1_25
|
|
57
|
+
|
|
58
|
+//
|
|
59
|
+// Power Supply Control
|
|
60
|
+//
|
|
61
|
+#ifndef PS_ON_PIN
|
|
62
|
+ #define PS_ON_PIN P1_00
|
|
63
|
+#endif
|
|
64
|
+
|
|
65
|
+//
|
|
66
|
+// Power Loss Detection
|
|
67
|
+//
|
|
68
|
+#ifndef POWER_LOSS_PIN
|
|
69
|
+ #define POWER_LOSS_PIN P1_00
|
|
70
|
+#endif
|
|
71
|
+
|
|
72
|
+//
|
|
73
|
+// Steppers
|
|
74
|
+//
|
|
75
|
+#define X_STEP_PIN P2_02
|
|
76
|
+#define X_DIR_PIN P2_06
|
|
77
|
+#define X_ENABLE_PIN P2_01
|
|
78
|
+#ifndef X_CS_PIN
|
|
79
|
+ #define X_CS_PIN P1_10
|
|
80
|
+#endif
|
|
81
|
+
|
|
82
|
+#define Y_STEP_PIN P0_19
|
|
83
|
+#define Y_DIR_PIN P0_20
|
|
84
|
+#define Y_ENABLE_PIN P2_08
|
|
85
|
+#ifndef Y_CS_PIN
|
|
86
|
+ #define Y_CS_PIN P1_09
|
|
87
|
+#endif
|
|
88
|
+
|
|
89
|
+#define Z_STEP_PIN P0_22
|
|
90
|
+#define Z_DIR_PIN P2_11
|
|
91
|
+#define Z_ENABLE_PIN P0_21
|
|
92
|
+#ifndef Z_CS_PIN
|
|
93
|
+ #define Z_CS_PIN P1_08
|
|
94
|
+#endif
|
|
95
|
+
|
|
96
|
+#define E0_STEP_PIN P2_13
|
|
97
|
+#define E0_DIR_PIN P0_11
|
|
98
|
+#define E0_ENABLE_PIN P2_12
|
|
99
|
+#ifndef E0_CS_PIN
|
|
100
|
+ #define E0_CS_PIN P1_04
|
|
101
|
+#endif
|
|
102
|
+
|
|
103
|
+#define E1_STEP_PIN P1_15
|
|
104
|
+#define E1_DIR_PIN P1_14
|
|
105
|
+#define E1_ENABLE_PIN P1_16
|
|
106
|
+#ifndef E1_CS_PIN
|
|
107
|
+ #define E1_CS_PIN P1_01
|
|
108
|
+#endif
|
|
109
|
+
|
|
110
|
+#define TEMP_1_PIN P0_23_A0 // A2 (T2) - (69) - TEMP_1_PIN
|
|
111
|
+#define TEMP_BED_PIN P0_25_A2 // A0 (T0) - (67) - TEMP_BED_PIN
|
|
112
|
+
|
|
113
|
+//
|
|
114
|
+// Include common SKR pins
|
|
115
|
+//
|
|
116
|
+#include "pins_BTT_SKR.h"
|
|
117
|
+
|
|
118
|
+//
|
|
119
|
+// Software SPI pins for TMC2130 stepper drivers
|
|
120
|
+//
|
|
121
|
+#if ENABLED(TMC_USE_SW_SPI)
|
|
122
|
+ #ifndef TMC_SW_MOSI
|
|
123
|
+ #define TMC_SW_MOSI P1_17
|
|
124
|
+ #endif
|
|
125
|
+ #ifndef TMC_SW_MISO
|
|
126
|
+ #define TMC_SW_MISO P0_05
|
|
127
|
+ #endif
|
|
128
|
+ #ifndef TMC_SW_SCK
|
|
129
|
+ #define TMC_SW_SCK P0_04
|
|
130
|
+ #endif
|
|
131
|
+#endif
|
|
132
|
+
|
|
133
|
+#if HAS_TMC220x
|
|
134
|
+ /**
|
|
135
|
+ * TMC2208/TMC2209 stepper drivers
|
|
136
|
+ *
|
|
137
|
+ * Hardware serial communication ports.
|
|
138
|
+ * If undefined software serial is used according to the pins below
|
|
139
|
+ */
|
|
140
|
+ //#define X_HARDWARE_SERIAL Serial
|
|
141
|
+ //#define X2_HARDWARE_SERIAL Serial1
|
|
142
|
+ //#define Y_HARDWARE_SERIAL Serial1
|
|
143
|
+ //#define Y2_HARDWARE_SERIAL Serial1
|
|
144
|
+ //#define Z_HARDWARE_SERIAL Serial1
|
|
145
|
+ //#define Z2_HARDWARE_SERIAL Serial1
|
|
146
|
+ //#define E0_HARDWARE_SERIAL Serial1
|
|
147
|
+ //#define E1_HARDWARE_SERIAL Serial1
|
|
148
|
+ //#define E2_HARDWARE_SERIAL Serial1
|
|
149
|
+ //#define E3_HARDWARE_SERIAL Serial1
|
|
150
|
+ //#define E4_HARDWARE_SERIAL Serial1
|
|
151
|
+
|
|
152
|
+ //
|
|
153
|
+ // Software serial
|
|
154
|
+ //
|
|
155
|
+ #define X_SERIAL_TX_PIN P1_10
|
|
156
|
+ #define X_SERIAL_RX_PIN P1_10
|
|
157
|
+
|
|
158
|
+ #define Y_SERIAL_TX_PIN P1_09
|
|
159
|
+ #define Y_SERIAL_RX_PIN P1_09
|
|
160
|
+
|
|
161
|
+ #define Z_SERIAL_TX_PIN P1_08
|
|
162
|
+ #define Z_SERIAL_RX_PIN P1_08
|
|
163
|
+
|
|
164
|
+ #define E0_SERIAL_TX_PIN P1_04
|
|
165
|
+ #define E0_SERIAL_RX_PIN P1_04
|
|
166
|
+
|
|
167
|
+ #define E1_SERIAL_TX_PIN P1_01
|
|
168
|
+ #define E1_SERIAL_RX_PIN P1_01
|
|
169
|
+
|
|
170
|
+ #define Z2_SERIAL_TX_PIN P1_01
|
|
171
|
+ #define Z2_SERIAL_RX_PIN P1_01
|
|
172
|
+
|
|
173
|
+ // Reduce baud rate to improve software serial reliability
|
|
174
|
+ #define TMC_BAUD_RATE 19200
|
|
175
|
+#endif
|
|
176
|
+
|
|
177
|
+//
|
|
178
|
+// SD Connection
|
|
179
|
+//
|
|
180
|
+#if SD_CONNECTION_IS(LCD)
|
|
181
|
+ #define SS_PIN P0_16
|
|
182
|
+#endif
|
|
183
|
+
|
|
184
|
+/**
|
|
185
|
+ * _____ _____
|
|
186
|
+ * NC | · · | GND 5V | · · | GND
|
|
187
|
+ * RESET | · · | 1.31(SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
|
|
188
|
+ * (MOSI)0.18 | · · | 3.25(BTN_EN2) (LCD_D5) 1.21 | · · | 1.20 (LCD_D4)
|
|
189
|
+ * (SD_SS)0.16 | · · | 3.26(BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
|
|
190
|
+ * (SCK)0.15 | · · | 0.17(MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
|
|
191
|
+ * ----- -----
|
|
192
|
+ * EXP2 EXP1
|
|
193
|
+ */
|
|
194
|
+#if HAS_SPI_LCD
|
|
195
|
+ #define BTN_ENC P0_28 // (58) open-drain
|
|
196
|
+
|
|
197
|
+ #if ENABLED(CR10_STOCKDISPLAY)
|
|
198
|
+ #define LCD_PINS_RS P1_22
|
|
199
|
+
|
|
200
|
+ #define BTN_EN1 P1_18
|
|
201
|
+ #define BTN_EN2 P1_20
|
|
202
|
+
|
|
203
|
+ #define LCD_PINS_ENABLE P1_23
|
|
204
|
+ #define LCD_PINS_D4 P1_21
|
|
205
|
+
|
|
206
|
+ #else
|
|
207
|
+ #define LCD_PINS_RS P1_19
|
|
208
|
+
|
|
209
|
+ #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
|
|
210
|
+ #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
|
|
211
|
+
|
|
212
|
+ #define LCD_PINS_ENABLE P1_18
|
|
213
|
+ #define LCD_PINS_D4 P1_20
|
|
214
|
+
|
|
215
|
+ #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
|
|
216
|
+ #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
|
|
217
|
+
|
|
218
|
+ #if ENABLED(FYSETC_MINI_12864)
|
|
219
|
+ #define DOGLCD_CS P1_18
|
|
220
|
+ #define DOGLCD_A0 P1_19
|
|
221
|
+ #define DOGLCD_SCK P0_15
|
|
222
|
+ #define DOGLCD_MOSI P0_18
|
|
223
|
+
|
|
224
|
+ #define LCD_BACKLIGHT_PIN -1
|
|
225
|
+
|
|
226
|
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
|
|
227
|
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
|
|
228
|
+
|
|
229
|
+ #define LCD_RESET_PIN P1_20 // Must be high or open for LCD to operate normally.
|
|
230
|
+
|
|
231
|
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
|
232
|
+ #ifndef RGB_LED_R_PIN
|
|
233
|
+ #define RGB_LED_R_PIN P1_21
|
|
234
|
+ #endif
|
|
235
|
+ #ifndef RGB_LED_G_PIN
|
|
236
|
+ #define RGB_LED_G_PIN P1_22
|
|
237
|
+ #endif
|
|
238
|
+ #ifndef RGB_LED_B_PIN
|
|
239
|
+ #define RGB_LED_B_PIN P1_23
|
|
240
|
+ #endif
|
|
241
|
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
|
|
242
|
+ #define NEOPIXEL_PIN P1_21
|
|
243
|
+ #endif
|
|
244
|
+
|
|
245
|
+ #else // !FYSETC_MINI_12864
|
|
246
|
+
|
|
247
|
+ #if ENABLED(MKS_MINI_12864)
|
|
248
|
+ #define DOGLCD_CS P1_21
|
|
249
|
+ #define DOGLCD_A0 P1_22
|
|
250
|
+ #define DOGLCD_SCK P0_15
|
|
251
|
+ #define DOGLCD_MOSI P0_18
|
|
252
|
+ #define FORCE_SOFT_SPI
|
|
253
|
+ #endif
|
|
254
|
+
|
|
255
|
+ #if ENABLED(ULTIPANEL)
|
|
256
|
+ #define LCD_PINS_D5 P1_21
|
|
257
|
+ #define LCD_PINS_D6 P1_22
|
|
258
|
+ #define LCD_PINS_D7 P1_23
|
|
259
|
+ #endif
|
|
260
|
+
|
|
261
|
+ #endif // !FYSETC_MINI_12864
|
|
262
|
+
|
|
263
|
+ #endif
|
|
264
|
+
|
|
265
|
+#endif // HAS_SPI_LCD
|
|
266
|
+
|
|
267
|
+//
|
|
268
|
+// Neopixel LED
|
|
269
|
+//
|
|
270
|
+#ifndef NEOPIXEL_PIN
|
|
271
|
+ #define NEOPIXEL_PIN P1_24
|
|
272
|
+#endif
|
|
273
|
+
|
|
274
|
+/**
|
|
275
|
+ * Special pins
|
|
276
|
+ * P1_30 (37) (NOT 5V tolerant)
|
|
277
|
+ * P1_31 (49) (NOT 5V tolerant)
|
|
278
|
+ * P0_27 (57) (Open collector)
|
|
279
|
+ * P0_28 (58) (Open collector)
|
|
280
|
+ */
|