|
@@ -0,0 +1,237 @@
|
|
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
|
+#ifndef TARGET_LPC1768
|
|
24
|
+ #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
|
|
25
|
+#endif
|
|
26
|
+
|
|
27
|
+#ifndef BOARD_NAME
|
|
28
|
+ #define BOARD_NAME "BIGTREE SKR V1.3"
|
|
29
|
+#endif
|
|
30
|
+
|
|
31
|
+//
|
|
32
|
+// Servos
|
|
33
|
+//
|
|
34
|
+#define SERVO0_PIN P2_00
|
|
35
|
+
|
|
36
|
+//
|
|
37
|
+// Limit Switches
|
|
38
|
+//
|
|
39
|
+#define X_MIN_PIN P1_29
|
|
40
|
+#define X_MAX_PIN P1_28
|
|
41
|
+#define Y_MIN_PIN P1_27
|
|
42
|
+#define Y_MAX_PIN P1_26
|
|
43
|
+#define Z_MIN_PIN P1_25
|
|
44
|
+#define Z_MAX_PIN P1_24
|
|
45
|
+
|
|
46
|
+//
|
|
47
|
+// Z Probe (when not Z_MIN_PIN)
|
|
48
|
+//
|
|
49
|
+#ifndef Z_MIN_PROBE_PIN
|
|
50
|
+ #define Z_MIN_PROBE_PIN P1_24
|
|
51
|
+#endif
|
|
52
|
+
|
|
53
|
+//
|
|
54
|
+// Steppers
|
|
55
|
+//
|
|
56
|
+#define X_STEP_PIN P2_02
|
|
57
|
+#define X_DIR_PIN P2_06
|
|
58
|
+#define X_ENABLE_PIN P2_01
|
|
59
|
+#ifndef X_CS_PIN
|
|
60
|
+ #define X_CS_PIN P1_17
|
|
61
|
+#endif
|
|
62
|
+
|
|
63
|
+#define Y_STEP_PIN P0_19
|
|
64
|
+#define Y_DIR_PIN P0_20
|
|
65
|
+#define Y_ENABLE_PIN P2_08
|
|
66
|
+#ifndef Y_CS_PIN
|
|
67
|
+ #define Y_CS_PIN P1_15
|
|
68
|
+#endif
|
|
69
|
+
|
|
70
|
+#define Z_STEP_PIN P0_22
|
|
71
|
+#define Z_DIR_PIN P2_11
|
|
72
|
+#define Z_ENABLE_PIN P0_21
|
|
73
|
+#ifndef Z_CS_PIN
|
|
74
|
+ #define Z_CS_PIN P1_10
|
|
75
|
+#endif
|
|
76
|
+
|
|
77
|
+#define E0_STEP_PIN P2_13
|
|
78
|
+#define E0_DIR_PIN P0_11
|
|
79
|
+#define E0_ENABLE_PIN P2_12
|
|
80
|
+#ifndef E0_CS_PIN
|
|
81
|
+ #define E0_CS_PIN P1_08
|
|
82
|
+#endif
|
|
83
|
+
|
|
84
|
+#define E1_STEP_PIN P0_01
|
|
85
|
+#define E1_DIR_PIN P0_00
|
|
86
|
+#define E1_ENABLE_PIN P0_10
|
|
87
|
+#ifndef E1_CS_PIN
|
|
88
|
+ #define E1_CS_PIN P1_01
|
|
89
|
+#endif
|
|
90
|
+
|
|
91
|
+//
|
|
92
|
+// Software SPI pins for TMC2130 stepper drivers
|
|
93
|
+//
|
|
94
|
+#if ENABLED(TMC_USE_SW_SPI)
|
|
95
|
+ #define TMC_SW_MOSI P4_28
|
|
96
|
+ #define TMC_SW_MISO P0_05
|
|
97
|
+ #define TMC_SW_SCK P0_04
|
|
98
|
+#endif
|
|
99
|
+
|
|
100
|
+#if HAS_DRIVER(TMC2208)
|
|
101
|
+ /**
|
|
102
|
+ * TMC2208 stepper drivers
|
|
103
|
+ *
|
|
104
|
+ * Hardware serial communication ports.
|
|
105
|
+ * If undefined software serial is used according to the pins below
|
|
106
|
+ */
|
|
107
|
+ //#define X_HARDWARE_SERIAL Serial
|
|
108
|
+ //#define X2_HARDWARE_SERIAL Serial1
|
|
109
|
+ //#define Y_HARDWARE_SERIAL Serial1
|
|
110
|
+ //#define Y2_HARDWARE_SERIAL Serial1
|
|
111
|
+ //#define Z_HARDWARE_SERIAL Serial1
|
|
112
|
+ //#define Z2_HARDWARE_SERIAL Serial1
|
|
113
|
+ //#define E0_HARDWARE_SERIAL Serial1
|
|
114
|
+ //#define E1_HARDWARE_SERIAL Serial1
|
|
115
|
+ //#define E2_HARDWARE_SERIAL Serial1
|
|
116
|
+ //#define E3_HARDWARE_SERIAL Serial1
|
|
117
|
+ //#define E4_HARDWARE_SERIAL Serial1
|
|
118
|
+
|
|
119
|
+ //
|
|
120
|
+ // Software serial
|
|
121
|
+ //
|
|
122
|
+ #define X_SERIAL_TX_PIN P4_29
|
|
123
|
+ #define X_SERIAL_RX_PIN P1_17
|
|
124
|
+
|
|
125
|
+ #define Y_SERIAL_TX_PIN P1_16
|
|
126
|
+ #define Y_SERIAL_RX_PIN P1_15
|
|
127
|
+
|
|
128
|
+ #define Z_SERIAL_TX_PIN P1_14
|
|
129
|
+ #define Z_SERIAL_RX_PIN P1_10
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+ #define E0_SERIAL_TX_PIN P1_09
|
|
133
|
+ #define E0_SERIAL_RX_PIN P1_08
|
|
134
|
+
|
|
135
|
+ #define E1_SERIAL_TX_PIN P1_04
|
|
136
|
+ #define E1_SERIAL_RX_PIN P1_01
|
|
137
|
+#endif
|
|
138
|
+
|
|
139
|
+//
|
|
140
|
+// Temperature Sensors
|
|
141
|
+// 3.3V max when defined as an analog input
|
|
142
|
+//
|
|
143
|
+#define TEMP_BED_PIN 0 // A0 (T0) - (67) - TEMP_BED_PIN
|
|
144
|
+#define TEMP_0_PIN 1 // A1 (T1) - (68) - TEMP_0_PIN
|
|
145
|
+#define TEMP_1_PIN 2 // A2 (T2) - (69) - TEMP_1_PIN
|
|
146
|
+
|
|
147
|
+//
|
|
148
|
+// Heaters / Fans
|
|
149
|
+//
|
|
150
|
+#define HEATER_0_PIN P2_07
|
|
151
|
+#if HOTENDS == 1
|
|
152
|
+ #define FAN1_PIN P2_04
|
|
153
|
+#else
|
|
154
|
+ #define HEATER_1_PIN P2_04
|
|
155
|
+#endif
|
|
156
|
+#define FAN_PIN P2_03
|
|
157
|
+#define HEATER_BED_PIN P2_05
|
|
158
|
+
|
|
159
|
+//
|
|
160
|
+// Misc. Functions
|
|
161
|
+//
|
|
162
|
+#define SDSS P0_06
|
|
163
|
+
|
|
164
|
+/*
|
|
165
|
+| _____ _____
|
|
166
|
+| NC | · · | GND 5V | · · | GND
|
|
167
|
+| RESET | · · | 1.31(SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
|
|
168
|
+| (MOSI)0.18 | · · | 3.25(BTN_EN2) (LCD_D5) 1.21 | · · | 1.20 (LCD_D4)
|
|
169
|
+| (SD_SS)0.16 | · · | 3.26(BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
|
|
170
|
+| (SCK)0.15 | · · | 0.17(MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
|
|
171
|
+|  ̄ ̄  ̄ ̄
|
|
172
|
+| EXP2 EXP1
|
|
173
|
+*/
|
|
174
|
+#if ENABLED(ULTRA_LCD)
|
|
175
|
+
|
|
176
|
+ #define BEEPER_PIN P1_30 // (37) not 5V tolerant
|
|
177
|
+ #define BTN_ENC P0_28 // (58) open-drain
|
|
178
|
+ #define LCD_PINS_RS P1_19
|
|
179
|
+
|
|
180
|
+ #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
|
|
181
|
+ #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
|
|
182
|
+ #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
|
|
183
|
+
|
|
184
|
+ #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
|
|
185
|
+
|
|
186
|
+ #define LCD_PINS_ENABLE P1_18
|
|
187
|
+ #define LCD_PINS_D4 P1_20
|
|
188
|
+
|
|
189
|
+ #if ENABLED(ULTIPANEL)
|
|
190
|
+
|
|
191
|
+ #define LCD_PINS_D5 P1_21
|
|
192
|
+ #define LCD_PINS_D6 P1_22
|
|
193
|
+ #define LCD_PINS_D7 P1_23
|
|
194
|
+
|
|
195
|
+ #endif
|
|
196
|
+
|
|
197
|
+#endif // ULTRA_LCD
|
|
198
|
+
|
|
199
|
+//#define USB_SD_DISABLED
|
|
200
|
+#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device
|
|
201
|
+
|
|
202
|
+#define LPC_SD_LCD // Marlin uses the SD drive attached to the LCD
|
|
203
|
+//#define LPC_SD_ONBOARD // Marlin uses the SD drive on the control board
|
|
204
|
+
|
|
205
|
+#if ENABLED(LPC_SD_LCD)
|
|
206
|
+
|
|
207
|
+ #define SCK_PIN P0_15
|
|
208
|
+ #define MISO_PIN P0_17
|
|
209
|
+ #define MOSI_PIN P0_18
|
|
210
|
+ #define SS_PIN P0_16 // Chip select for SD card used by Marlin
|
|
211
|
+ #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
|
212
|
+
|
|
213
|
+#elif ENABLED(LPC_SD_ONBOARD)
|
|
214
|
+
|
|
215
|
+ #if ENABLED(USB_SD_ONBOARD)
|
|
216
|
+ // When sharing the SD card with a PC we want the menu options to
|
|
217
|
+ // mount/unmount the card and refresh it. So we disable card detect.
|
|
218
|
+ #define SHARED_SD_CARD
|
|
219
|
+ #undef SD_DETECT_PIN // redefine detect pin onboard tf card
|
|
220
|
+ #define SD_DETECT_PIN P0_27 // (57) open-drain
|
|
221
|
+ #endif
|
|
222
|
+
|
|
223
|
+ #define SCK_PIN P0_07
|
|
224
|
+ #define MISO_PIN P0_08
|
|
225
|
+ #define MOSI_PIN P0_09
|
|
226
|
+ #define SS_PIN P0_16 // Chip select for SD card used by Marlin
|
|
227
|
+ #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
|
|
228
|
+
|
|
229
|
+#endif
|
|
230
|
+
|
|
231
|
+ /**
|
|
232
|
+ * Special pins
|
|
233
|
+ * P1_30 (37) (NOT 5V tolerant)
|
|
234
|
+ * P1_31 (49) (NOT 5V tolerant)
|
|
235
|
+ * P0_27 (57) (Open collector)
|
|
236
|
+ * P0_28 (58) (Open collector)
|
|
237
|
+ */
|