|
@@ -0,0 +1,256 @@
|
|
1
|
+/**
|
|
2
|
+ * Marlin 3D Printer Firmware
|
|
3
|
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
4
|
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
5
|
+ *
|
|
6
|
+ * Based on Sprinter and grbl.
|
|
7
|
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
8
|
+ *
|
|
9
|
+ * This program is free software: you can redistribute it and/or modify
|
|
10
|
+ * it under the terms of the GNU General Public License as published by
|
|
11
|
+ * the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+ * (at your option) any later version.
|
|
13
|
+ *
|
|
14
|
+ * This program is distributed in the hope that it will be useful,
|
|
15
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+ * GNU General Public License for more details.
|
|
18
|
+ *
|
|
19
|
+ * You should have received a copy of the GNU General Public License
|
|
20
|
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+ *
|
|
22
|
+ */
|
|
23
|
+
|
|
24
|
+/**
|
|
25
|
+ * MKS SBASE pin assignments
|
|
26
|
+ */
|
|
27
|
+
|
|
28
|
+//#if !defined(TARGET_LPC1768)
|
|
29
|
+#if DISABLED(IS_REARM)
|
|
30
|
+ #error "Oops! Make sure you have Re-Arm selected."
|
|
31
|
+#endif
|
|
32
|
+
|
|
33
|
+#ifndef BOARD_NAME
|
|
34
|
+ #define BOARD_NAME "MKS SBASE"
|
|
35
|
+ #define DEFAULT_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
|
|
36
|
+#endif
|
|
37
|
+
|
|
38
|
+#define LARGE_FLASH true
|
|
39
|
+
|
|
40
|
+// unused
|
|
41
|
+/*
|
|
42
|
+#define D57 57
|
|
43
|
+#define D58 58
|
|
44
|
+*/
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+//
|
|
48
|
+// Servos
|
|
49
|
+//
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+//
|
|
53
|
+// Limit Switches
|
|
54
|
+//
|
|
55
|
+#define X_MIN_PIN 3 //10k pullup to 3.3V, 1K series
|
|
56
|
+#define X_MAX_PIN 2 //10k pullup to 3.3V, 1K series
|
|
57
|
+#define Y_MIN_PIN 14 //10k pullup to 3.3V, 1K series
|
|
58
|
+#define Y_MAX_PIN 15 //10k pullup to 3.3V, 1K series
|
|
59
|
+#define Z_MIN_PIN 19 //The original Mks Sbase DIO19 has a 10k pullup to 3.3V or 5V, 1K series, so when using a Zprobe we must use DIO41 (J8 P1.22)
|
|
60
|
+#define Z_MAX_PIN 18 //10k pullup to 3.3V, 1K series
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+//
|
|
65
|
+// Steppers
|
|
66
|
+//
|
|
67
|
+#define X_STEP_PIN 26
|
|
68
|
+#define X_DIR_PIN 28
|
|
69
|
+#define X_ENABLE_PIN 24
|
|
70
|
+
|
|
71
|
+#define Y_STEP_PIN 54
|
|
72
|
+#define Y_DIR_PIN 55
|
|
73
|
+#define Y_ENABLE_PIN 38
|
|
74
|
+
|
|
75
|
+#define Z_STEP_PIN 60
|
|
76
|
+#define Z_DIR_PIN 61
|
|
77
|
+#define Z_ENABLE_PIN 56
|
|
78
|
+
|
|
79
|
+#define E0_STEP_PIN 46
|
|
80
|
+#define E0_DIR_PIN 48
|
|
81
|
+#define E0_ENABLE_PIN 62
|
|
82
|
+
|
|
83
|
+#define E1_STEP_PIN 36
|
|
84
|
+#define E1_DIR_PIN 34
|
|
85
|
+#define E1_ENABLE_PIN 30
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+#define X2_STEP_PIN 36
|
|
89
|
+#define X2_DIR_PIN 34
|
|
90
|
+#define X2_ENABLE_PIN 30
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+//
|
|
94
|
+// Temperature Sensors
|
|
95
|
+// 3.3V max when defined as an analog input
|
|
96
|
+//
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+#define TEMP_0_PIN 0 //A0 (TH1)
|
|
100
|
+#define TEMP_BED_PIN 1 //A1 (TH2)
|
|
101
|
+#define TEMP_1_PIN 2 //A2 (TH3)
|
|
102
|
+#define TEMP_2_PIN 3 //A3 (TH4)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+//
|
|
106
|
+// Heaters / Fans
|
|
107
|
+//
|
|
108
|
+
|
|
109
|
+#define HEATER_BED_PIN 10
|
|
110
|
+#define HEATER_0_PIN 8
|
|
111
|
+#define HEATER_1_PIN 59
|
|
112
|
+#define FAN_PIN 9
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+#define PS_ON_PIN 69
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+//
|
|
119
|
+// Connector J7
|
|
120
|
+//
|
|
121
|
+
|
|
122
|
+// 5V
|
|
123
|
+// NC
|
|
124
|
+// GND
|
|
125
|
+#define PIN_P0_17 50
|
|
126
|
+#define PIN_P0_16 16
|
|
127
|
+#define PIN_P0_14 80
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+//
|
|
131
|
+// Connector J8
|
|
132
|
+//
|
|
133
|
+
|
|
134
|
+// GND
|
|
135
|
+#define PIN_P1_22 41
|
|
136
|
+#define PIN_P1_23 53
|
|
137
|
+#define PIN_P2_12 12
|
|
138
|
+#define PIN_P2_11 35
|
|
139
|
+#define PIN_P4_28 13
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+//
|
|
143
|
+// Prusa i3 MK2 Multi Material Multiplexer Support
|
|
144
|
+//
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+#define E_MUX0_PIN 50 // J7-4
|
|
148
|
+#define E_MUX1_PIN 16 // J7-5
|
|
149
|
+#define E_MUX2_PIN 80 // J7-6
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+/**
|
|
153
|
+ * Smart LCD adapter
|
|
154
|
+ *
|
|
155
|
+ * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
|
|
156
|
+ * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
|
|
157
|
+ * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
|
|
158
|
+ * is needed to pick up 5V for the EXP1 connection.
|
|
159
|
+ *
|
|
160
|
+ * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
|
|
161
|
+ * on the LCD display during accesses of the SD card. The menus/code has been arranged so
|
|
162
|
+ * that the garbage/lines are erased immediately after the SD card accesses are completed.
|
|
163
|
+ */
|
|
164
|
+
|
|
165
|
+#if ENABLED(ULTRA_LCD) //
|
|
166
|
+
|
|
167
|
+ #define BEEPER_PIN 49 // EXP1.1
|
|
168
|
+
|
|
169
|
+ #define BTN_ENC 37 // EXP1.2
|
|
170
|
+ #define BTN_EN1 31 // EXP2.5
|
|
171
|
+ #define BTN_EN2 33 // EXP2.3
|
|
172
|
+
|
|
173
|
+ #define SD_DETECT_PIN 57 // EXP2.7
|
|
174
|
+ #define KILL_PIN -1 // Not connected
|
|
175
|
+ #define LCD_PINS_RS 16 // EXP1.4
|
|
176
|
+ #define LCD_SDSS 58 // EXP2.4
|
|
177
|
+ #define LCD_BACKLIGHT_PIN -1 // Not connected
|
|
178
|
+ #define LCD_PINS_ENABLE 51 // EXP1.3
|
|
179
|
+ #define LCD_PINS_D4 80 // EXP1.5
|
|
180
|
+
|
|
181
|
+ #define DOGLCD_A0 -1 // Not connected
|
|
182
|
+ #define DOGLCD_CS -1 // Not connected
|
|
183
|
+
|
|
184
|
+#ifdef ULTIPANEL
|
|
185
|
+
|
|
186
|
+ #define LCD_PINS_D5 -1 // EXP1.6 Not connected
|
|
187
|
+ #define LCD_PINS_D6 -1 // EXP1.7 Not connected
|
|
188
|
+ #define LCD_PINS_D7 -1 // EXP1.8 Not connected
|
|
189
|
+#endif
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+ #if ENABLED(SDSUPPORT)
|
|
193
|
+ #define SDCARD_SORT_ALPHA // Using SORT feature to keep one directory level in RAM
|
|
194
|
+ // When going up/down directory levels the SD card is
|
|
195
|
+ // accessed but the garbage/lines are removed when the
|
|
196
|
+ // LCD updates
|
|
197
|
+
|
|
198
|
+ // SD Card Sorting options
|
|
199
|
+ #if ENABLED(SDCARD_SORT_ALPHA)
|
|
200
|
+ #define SDSORT_LIMIT 255 // Maximum number of sorted items (10-256).
|
|
201
|
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
|
|
202
|
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
|
|
203
|
+ #define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting.
|
|
204
|
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
|
|
205
|
+ #define SDSORT_CACHE_NAMES true // Keep sorted items in RAM longer for speedy performance. Most expensive option.
|
|
206
|
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
|
|
207
|
+ #endif
|
|
208
|
+ #endif
|
|
209
|
+#endif // ULTRA_LCD
|
|
210
|
+
|
|
211
|
+//
|
|
212
|
+// Ethernet pins
|
|
213
|
+//
|
|
214
|
+#ifndef ULTIPANEL
|
|
215
|
+#define ENET_MDIO 71 // J12-4
|
|
216
|
+#define ENET_RX_ER 73 // J12-6
|
|
217
|
+#define ENET_RXD1 75 // J12-8
|
|
218
|
+#endif
|
|
219
|
+#define ENET_MOC 70 // J12-3
|
|
220
|
+#define REF_CLK 72 // J12-5
|
|
221
|
+#define ENET_RXD0 74 // J12-7
|
|
222
|
+#define ENET_CRS 76 // J12-9
|
|
223
|
+#define ENET_TX_EN 77 // J12-10
|
|
224
|
+#define ENET_TXD0 78 // J12-11
|
|
225
|
+#define ENET_TXD1 79 // J12-12
|
|
226
|
+
|
|
227
|
+/**
|
|
228
|
+ * PWMS
|
|
229
|
+ *
|
|
230
|
+ * There are 6 PWMS. Each PWM can be assigned to one of two pins.
|
|
231
|
+ *
|
|
232
|
+ * SERVO2 does NOT have a PWM assigned to it.
|
|
233
|
+ *
|
|
234
|
+ * PWM1.1 DIO4 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
|
|
235
|
+ * PWM1.1 DIO26 E0_STEP_PIN
|
|
236
|
+ * PWM1.2 DIO11 SERVO0_PIN
|
|
237
|
+ * PWM1.2 DIO54 X_STEP_PIN
|
|
238
|
+ * PWM1.3 DIO6 SERVO1_PIN J5-1
|
|
239
|
+ * PWM1.3 DIO60 Y_STEP_PIN
|
|
240
|
+ * PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3
|
|
241
|
+ * PWM1.4 DIO46 Z_STEP_PIN
|
|
242
|
+ * PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
|
|
243
|
+ * PWM1.5 DIO9 RAMPS_D9_PIN
|
|
244
|
+ * PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
|
|
245
|
+ * PWM1.6 DIO10 RAMPS_D10_PIN
|
|
246
|
+ */
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+ /**
|
|
250
|
+ * special pins
|
|
251
|
+ * D37 - not 5V tolerant
|
|
252
|
+ * D49 - not 5V tolerant
|
|
253
|
+ * D57 - open collector
|
|
254
|
+ * D58 - open collector
|
|
255
|
+ *
|
|
256
|
+ */
|