|
@@ -117,7 +117,6 @@
|
117
|
117
|
#define PIN_P0_16 P0_16
|
118
|
118
|
#define PIN_P0_15 P0_15
|
119
|
119
|
|
120
|
|
-
|
121
|
120
|
//
|
122
|
121
|
// Connector J8
|
123
|
122
|
//
|
|
@@ -196,6 +195,49 @@
|
196
|
195
|
#define SDSS P0_06
|
197
|
196
|
|
198
|
197
|
/**
|
|
198
|
+ * Example for trinamic drivers using the J8 connector on MKs Sbase.
|
|
199
|
+ * 2130s need 1 pin for each driver. 2208s need 2 pins for serial control.
|
|
200
|
+ * This board does not have enough pins to use hardware serial.
|
|
201
|
+ */
|
|
202
|
+
|
|
203
|
+#if HAS_DRIVER(TMC2130)
|
|
204
|
+ // J8
|
|
205
|
+ #define X_CS_PIN P1_22
|
|
206
|
+ #define Y_CS_PIN P1_23
|
|
207
|
+ #define Z_CS_PIN P2_12
|
|
208
|
+ #define E0_CS_PIN P2_11
|
|
209
|
+ #define E1_CS_PIN P4_28
|
|
210
|
+
|
|
211
|
+// Hardware SPI is on EXP2. See if you can make it work:
|
|
212
|
+// https://github.com/makerbase-mks/MKS-SBASE/issues/25
|
|
213
|
+#define TMC_USE_SW_SPI
|
|
214
|
+#if ENABLED(TMC_USE_SW_SPI)
|
|
215
|
+ #ifndef TMC_SW_MOSI
|
|
216
|
+ #define TMC_SW_MOSI P0_03 // AUX1
|
|
217
|
+ #endif
|
|
218
|
+ #ifndef TMC_SW_MISO
|
|
219
|
+ #define TMC_SW_MISO P0_02 // AUX1
|
|
220
|
+ #endif
|
|
221
|
+ #ifndef TMC_SW_SCK
|
|
222
|
+ #define TMC_SW_SCK P0_26 // TH4
|
|
223
|
+ #endif
|
|
224
|
+ #endif
|
|
225
|
+#endif
|
|
226
|
+#if HAS_DRIVER(TMC2208)
|
|
227
|
+ // The shortage of pins becomes apparent.
|
|
228
|
+ // Worst case you may have to give up the LCD
|
|
229
|
+ // RX pins need to be interrupt capable
|
|
230
|
+ #define X_SERIAL_TX_PIN P1_22 // J8-2
|
|
231
|
+ #define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable
|
|
232
|
+ #define Y_SERIAL_TX_PIN P1_23 // J8-3
|
|
233
|
+ #define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable
|
|
234
|
+ #define Z_SERIAL_TX_PIN P2_12 // J8-4
|
|
235
|
+ #define Z_SERIAL_RX_PIN P0_25 // TH3
|
|
236
|
+ #define E0_SERIAL_TX_PIN P4_28 // J8-6
|
|
237
|
+ #define E0_SERIAL_RX_PIN P0_26 // TH4
|
|
238
|
+#endif
|
|
239
|
+
|
|
240
|
+/**
|
199
|
241
|
* P0.27 is on EXP2 and the on-board SD card's socket. That means it can't be
|
200
|
242
|
* used as the SD_DETECT for the LCD's SD card.
|
201
|
243
|
*
|
|
@@ -240,11 +282,11 @@
|
240
|
282
|
/**
|
241
|
283
|
* Serial Ports
|
242
|
284
|
* P0_00 - Port 3
|
243
|
|
- * P0_01
|
|
285
|
+ * P0_01 - SD Card (Onboard)
|
244
|
286
|
* P0_10 - Port 2
|
245
|
|
- * P0_11
|
|
287
|
+ * P0_11 - Y_EN/Y_DIR
|
246
|
288
|
* P0_15 - Port 1
|
247
|
|
- * P0_16
|
|
289
|
+ * P0_16 - EXP1
|
248
|
290
|
* P0_02 - Port 0
|
249
|
291
|
* P0_03 - AUX1
|
250
|
292
|
* P0_29 - Port -1
|