瀏覽代碼

add README & modify spi_pins.h

still trying to fix file name
Bob-the-Kuhn 6 年之前
父節點
當前提交
bb23286383

+ 18
- 1
Marlin/src/HAL/HAL_LPC1768/spi_pins.h 查看文件

@@ -23,6 +23,22 @@
23 23
 #ifndef SPI_PINS_LPC1768_H
24 24
 #define SPI_PINS_LPC1768_H
25 25
 
26
+#include "../../inc/MarlinConfig.h"
27
+
28
+#if MB(MKS_SBASE)
29
+  
30
+#define LPC_SOFTWARE_SPI
31
+
32
+// A custom cable is needed. See the README file in the 
33
+// Marlin\src\config\examples\Mks\Sbase directory
34
+
35
+#define SCK_PIN           P1_22  // J8-2 (moved from EXP2 P0.7)
36
+#define MISO_PIN          P1_23  // J8-3 (moved from EXP2 P0.8)  
37
+#define MOSI_PIN          P2_12  // J8-4 (moved from EXP2 P0.5)  
38
+#define SS_PIN            P0_28  
39
+
40
+#else
41
+
26 42
 #define LPC_SOFTWARE_SPI
27 43
 
28 44
 /** onboard SD card */
@@ -47,8 +63,9 @@
47 63
   #define SDSS              SS_PIN
48 64
 #endif
49 65
 
50
-#if (defined(TARGET_LPC1768) && !(defined(LPC_SOFTWARE_SPI)))   // signal LCDs that they need to use the hardware SPI
66
+#if defined(TARGET_LPC1768) && !defined(LPC_SOFTWARE_SPI)   // signal LCDs that they need to use the hardware SPI
51 67
   #define SHARED_SPI
52 68
 #endif
53 69
 
70
+#endif // MKS_SBASE
54 71
 #endif /* SPI_PINS_LPC1768_H */

+ 27
- 0
Marlin/src/config/examples/Mks/Sbase/000-README_RepRap_Discount_Full_Graphic_Smart_Controller.txt 查看文件

@@ -0,0 +1,27 @@
1
+The MKS products (all?) have the EXP1 & EXP2 LCD connectors rotated 180 degrees from the ones on the RepRap LCD controllers.
2
+
3
+In order to attach the RepRap Discount Full Graphic Smart Controller you'll need to do something like one of the following for both EXP1 & EXP2:
4
+ a. On one end only, shave the keying plug off the cables and plug the cables in backwards.
5
+ b. On one end only, carefully pry the housings off the board, rotate them 180 degrees and press them back onto the pins.
6
+ c. Make custom cables where one connector is rotated 180 degrees.
7
+
8
+     MKS:  1  2  3  4  5  6  7  8  9 10
9
+  RepRap: 10  9  8  7  6  5  4  3  2  1
10
+
11
+
12
+/////////////////////////////////////////////////////////////////////
13
+
14
+3 DEC 2017
15
+
16
+The current Marlin 2.0.x firmware cannot properly access some of the pins on the EXP2 connector.  In order to use the RepRap Discount Full Graphic Smart Controller you'll need a custom cable that gets three of the signals from a different connector. In that cable move the pin/wire that:
17
+
18
+    used to go to P0.8 to J8-3
19
+    "     "  "  " P0.7 to J8-2
20
+    "     "  "  " P0.5 to J8-4
21
+
22
+If pins different than the J8 ones above are used then the spi_pins.h file will need to be modified.
23
+
24
+An octopus cable something like the Adafruit 1199 will simply the construction of the custom cable.  Just plug the Adafruit 1199 into one of the cables that came with the LCD and the individual pins into J8 and EXP2 as needed.
25
+
26
+Adafruit 10-pin IDC Socket Rainbow Breakout Cable [1199]
27
+  https://www.adafruit.com/product/1199

Loading…
取消
儲存