Bläddra i källkod

🎨 Define FYSETC S6 and TH3D EZBoard EXP1/2 pins

Scott Lahteine 3 år sedan
förälder
incheckning
7974dcd2aa
2 ändrade filer med 145 tillägg och 78 borttagningar
  1. 71
    26
      Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
  2. 74
    52
      Marlin/src/pins/stm32f4/pins_FYSETC_S6.h

+ 71
- 26
Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h Visa fil

@@ -27,20 +27,30 @@
27 27
 
28 28
 #include "env_validate.h"
29 29
 
30
+//#define V3_EZABL_ON_SERVO                       // As in TH3D Firmware Config
31
+
30 32
 #define BOARD_INFO_NAME   "TH3D EZBoard"
31 33
 #define BOARD_WEBSITE_URL "th3dstudio.com"
32 34
 
33 35
 //
34 36
 // Servos
35 37
 //
36
-#define SERVO0_PIN                         P2_04
38
+#if ENABLED(V3_EZABL_ON_SERVO)
39
+  #define SERVO0_PIN                       -1
40
+#else
41
+  #define SERVO0_PIN                       P2_04
42
+#endif
37 43
 
38 44
 //
39 45
 // Limit Switches
40 46
 //
41 47
 #define X_STOP_PIN                         P1_24
42 48
 #define Y_STOP_PIN                         P1_25
43
-#define Z_STOP_PIN                         P1_26
49
+#if ENABLED(V3_EZABL_ON_SERVO)
50
+  #define Z_STOP_PIN                       P2_04
51
+#else
52
+  #define Z_STOP_PIN                       P1_26
53
+#endif
44 54
 
45 55
 //
46 56
 // Filament Runout Sensor
@@ -103,13 +113,6 @@
103 113
 #endif
104 114
 
105 115
 #define TEMP_BED_PIN                    P0_24_A1  // Analog Input P0_24
106
-#define TEMP_1_PIN                      P0_25_A2  // Analog Input P0_25
107
-
108
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
109
-  #define FILWIDTH_PIN                  P0_26_A3  // Analog Input P0_26
110
-#else
111
-  #define TEMP_2_PIN                    P0_26_A3  // Analog Input P0_26
112
-#endif
113 116
 
114 117
 //
115 118
 // Heaters / Fans
@@ -141,6 +144,7 @@
141 144
 
142 145
 #define SDCARD_CONNECTION                ONBOARD
143 146
 
147
+//#define SD_DETECT_PIN                    P0_25  // SD_CD
144 148
 #define SD_SCK_PIN                         P0_07
145 149
 #define SD_MISO_PIN                        P0_08
146 150
 #define SD_MOSI_PIN                        P0_09
@@ -152,14 +156,14 @@
152 156
 //
153 157
 
154 158
 /**
155
- *                  _____
156
- *              5V | · · | GND
157
- *  (LCD_EN) P0_18 | · · | P0_16 (LCD_RS)
158
- *  (LCD_D4) P0_15 | · ·   P3_25 (BTN_EN2)
159
- *   (RESET) P2_11 | · · | P3_26 (BTN_EN1)
160
- * (BTN_ENC) P1_30 | · · | P1_31 (BEEPER)
161
- *                  -----
162
- *                  EXP1
159
+ *         ______
160
+ *     5V | 1  2 | GND
161
+ *  P0_18 | 3  4 | P0_16
162
+ *  P0_15 | 5  6   P3_25
163
+ *  P2_11 | 7  8 | P3_26
164
+ *  P1_30 | 9 10 | P1_31
165
+ *         ------
166
+ *          EXP1
163 167
  *
164 168
  * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
165 169
  * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
@@ -167,16 +171,57 @@
167 171
  * A remote SD card is currently not supported because the pins routed to the EXP2
168 172
  * connector are shared with the onboard SD card.
169 173
  */
174
+#define EXP1_03_PIN                        P0_18
175
+#define EXP1_04_PIN                        P0_16
176
+#define EXP1_05_PIN                        P0_15
177
+#define EXP1_06_PIN                        P3_25
178
+#define EXP1_07_PIN                        P2_11
179
+#define EXP1_08_PIN                        P3_26
180
+#define EXP1_09_PIN                        P1_30
181
+#define EXP1_10_PIN                        P1_31
170 182
 
171 183
 #if ENABLED(CR10_STOCKDISPLAY)
172
-  #define BEEPER_PIN                       P1_31
173
-  #define BTN_EN1                          P3_26
174
-  #define BTN_EN2                          P3_25
175
-  #define BTN_ENC                          P1_30
176
-  #define LCD_PINS_RS                      P0_16
177
-  #define LCD_PINS_ENABLE                  P0_18
178
-  #define LCD_PINS_D4                      P0_15
179
-  #define KILL_PIN                         P2_11
184
+  /**          ______
185
+   *       5V | 1  2 | GND
186
+   *   LCD_EN | 3  4 | LCD_RS
187
+   *   LCD_D4 | 5  6   EN2
188
+   *     KILL | 7  8 | EN1
189
+   *      ENC | 9 10 | BEEPER
190
+   *           ------
191
+   */
192
+  #define BEEPER_PIN                 EXP1_10_PIN
193
+  #define LCD_PINS_RS                EXP1_04_PIN
194
+  #define LCD_PINS_ENABLE            EXP1_03_PIN
195
+  #define LCD_PINS_D4                EXP1_05_PIN
196
+  #define KILL_PIN                   EXP1_07_PIN
197
+
198
+#elif ENABLED(MKS_MINI_12864)
199
+  /**          ______
200
+   *       5V | 1  2 | GND
201
+   * SPI-MOSI | 3  4 | SPI-CS
202
+   *       A0 | 5  6   EN2
203
+   *       -- | 7  8 | EN1
204
+   *      ENC | 9 10 | SPI-SCK
205
+   *           ------
206
+   */
207
+  #define DOGLCD_CS                  EXP1_04_PIN
208
+  #define DOGLCD_A0                  EXP1_05_PIN
209
+  #define DOGLCD_SCK                 EXP1_10_PIN
210
+  #define DOGLCD_MOSI                EXP1_03_PIN
211
+  #define LCD_CONTRAST_INIT                  160
212
+  #define LCD_CONTRAST_MIN                   120
213
+  #define LCD_CONTRAST_MAX                   180
214
+  #define FORCE_SOFT_SPI
215
+  #define LCD_BACKLIGHT_PIN                -1
216
+
180 217
 #elif HAS_WIRED_LCD
181
-  #error "Only the CR10_STOCKDISPLAY is supported with TH3D EZBoard."
218
+
219
+  #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard."
220
+
221
+#endif
222
+
223
+#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864)
224
+  #define BTN_EN1                    EXP1_08_PIN
225
+  #define BTN_EN2                    EXP1_06_PIN
226
+  #define BTN_ENC                    EXP1_09_PIN
182 227
 #endif

+ 74
- 52
Marlin/src/pins/stm32f4/pins_FYSETC_S6.h Visa fil

@@ -185,97 +185,125 @@
185 185
 #define FAN2_PIN                            PB2
186 186
 
187 187
 //
188
-// SPI
189
-//
190
-#define SD_SCK_PIN                          PA5
191
-#define SD_MISO_PIN                         PA6
192
-#define SD_MOSI_PIN                         PA7
193
-
194
-//
195 188
 // Misc. Functions
196 189
 //
197 190
 //#define LED_PIN                           PB14
198 191
 //#define PS_ON_PIN                         PE11
199 192
 //#define KILL_PIN                          PC5
200 193
 
201
-#define SDSS                                PA4
202
-#define SD_DETECT_PIN                       PB10
194
+/**
195
+ *         ______                 ______
196
+ *     5V | 1  2 | GND        5V | 1  2 | GND
197
+ *    PD1 | 3  4 | PD0     RESET | 3  4 | PB10
198
+ *   PC12 | 5  6   PC10      PA7 | 5  6   PC7
199
+ *    PD2 | 7  8 | PC11      PA4 | 7  8 | PC6
200
+ *    PA8 | 9 10 | PC9       PA5 | 9 10 | PA6
201
+ *         ------                 ------
202
+ *          EXP1                   EXP2
203
+ */
204
+#define EXP1_03_PIN                         PD1
205
+#define EXP1_04_PIN                         PD0
206
+#define EXP1_05_PIN                         PC12
207
+#define EXP1_06_PIN                         PC10
208
+#define EXP1_07_PIN                         PD2
209
+#define EXP1_08_PIN                         PC11
210
+#define EXP1_09_PIN                         PA8
211
+#define EXP1_10_PIN                         PC9
212
+
213
+#define EXP2_03_PIN                         -1    // RESET
214
+#define EXP2_04_PIN                         PB10
215
+#define EXP2_05_PIN                         PA7
216
+#define EXP2_06_PIN                         PC7
217
+#define EXP2_07_PIN                         PA4
218
+#define EXP2_08_PIN                         PC6
219
+#define EXP2_09_PIN                         PA5
220
+#define EXP2_10_PIN                         PA6
221
+
222
+//
223
+// SPI / SD Card
224
+//
225
+#define SD_SCK_PIN                   EXP2_09_PIN
226
+#define SD_MISO_PIN                  EXP2_10_PIN
227
+#define SD_MOSI_PIN                  EXP2_05_PIN
228
+
229
+#define SDSS                         EXP2_07_PIN
230
+#define SD_DETECT_PIN                EXP2_04_PIN
203 231
 
204 232
 //
205 233
 // LCD / Controller
206 234
 //
207 235
 #if ENABLED(FYSETC_242_OLED_12864)
208 236
 
209
-  #define BTN_EN1                           PC9
210
-  #define BTN_EN2                           PD1
211
-  #define BTN_ENC                           PA8
237
+  #define BTN_EN1                    EXP1_10_PIN
238
+  #define BTN_EN2                    EXP1_03_PIN
239
+  #define BTN_ENC                    EXP1_09_PIN
212 240
 
213
-  #define BEEPER_PIN                        PC6
241
+  #define BEEPER_PIN                 EXP2_08_PIN
214 242
 
215
-  #define LCD_PINS_DC                       PC12
216
-  #define LCD_PINS_RS                       PC7   // LCD_RST
217
-  #define DOGLCD_CS                         PD2
218
-  #define DOGLCD_MOSI                       PC10
219
-  #define DOGLCD_SCK                        PC11
243
+  #define LCD_PINS_DC                EXP1_05_PIN
244
+  #define LCD_PINS_RS                EXP2_06_PIN  // LCD_RST
245
+  #define DOGLCD_CS                  EXP1_07_PIN
246
+  #define DOGLCD_MOSI                EXP1_06_PIN
247
+  #define DOGLCD_SCK                 EXP1_08_PIN
220 248
   #define DOGLCD_A0                  LCD_PINS_DC
221 249
   #define FORCE_SOFT_SPI
222 250
 
223 251
   #define KILL_PIN                          -1    // NC
224
-  #define NEOPIXEL_PIN                      PD0
252
+  #define NEOPIXEL_PIN               EXP1_04_PIN
225 253
 
226 254
 #elif HAS_WIRED_LCD
227 255
 
228
-  #define BEEPER_PIN                        PC9
229
-  #define BTN_ENC                           PA8
256
+  #define BEEPER_PIN                 EXP1_10_PIN
257
+  #define BTN_ENC                    EXP1_09_PIN
230 258
 
231 259
   #if ENABLED(CR10_STOCKDISPLAY)
232
-    #define LCD_PINS_RS                     PD0
260
+    #define LCD_PINS_RS              EXP1_04_PIN
233 261
 
234
-    #define BTN_EN1                         PC11
235
-    #define BTN_EN2                         PC10
262
+    #define BTN_EN1                  EXP1_08_PIN
263
+    #define BTN_EN2                  EXP1_06_PIN
236 264
 
237
-    #define LCD_PINS_ENABLE                 PD1
238
-    #define LCD_PINS_D4                     PC12
265
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
266
+    #define LCD_PINS_D4              EXP1_05_PIN
239 267
 
240 268
   #else
241 269
 
242
-    #define LCD_PINS_RS                     PD2
270
+    #define LCD_PINS_RS              EXP1_07_PIN
243 271
 
244
-    #define BTN_EN1                         PC6
245
-    #define BTN_EN2                         PC7
272
+    #define BTN_EN1                  EXP2_08_PIN
273
+    #define BTN_EN2                  EXP2_06_PIN
246 274
 
247
-    #define LCD_SDSS                        PA4
275
+    #define LCD_SDSS                 EXP2_07_PIN
248 276
 
249
-    #define LCD_PINS_ENABLE                 PC11
250
-    #define LCD_PINS_D4                     PC10
277
+    #define LCD_PINS_ENABLE          EXP1_08_PIN
278
+    #define LCD_PINS_D4              EXP1_06_PIN
251 279
 
252 280
     #if ENABLED(FYSETC_MINI_12864)
253 281
       // See https://wiki.fysetc.com/Mini12864_Panel
254
-      #define DOGLCD_CS                     PC11
255
-      #define DOGLCD_A0                     PD2
282
+      #define DOGLCD_CS              EXP1_08_PIN
283
+      #define DOGLCD_A0              EXP1_07_PIN
256 284
       #if ENABLED(FYSETC_GENERIC_12864_1_1)
257
-        #define LCD_BACKLIGHT_PIN           PD0
285
+        #define LCD_BACKLIGHT_PIN    EXP1_04_PIN
258 286
       #endif
259
-      #define LCD_RESET_PIN                 PC10  // Must be high or open for LCD to operate normally.
287
+      #define LCD_RESET_PIN          EXP1_06_PIN  // Must be high or open for LCD to operate normally.
260 288
       #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
261 289
         #ifndef RGB_LED_R_PIN
262
-          #define RGB_LED_R_PIN             PC12
290
+          #define RGB_LED_R_PIN      EXP1_05_PIN
263 291
         #endif
264 292
         #ifndef RGB_LED_G_PIN
265
-          #define RGB_LED_G_PIN             PD0
293
+          #define RGB_LED_G_PIN      EXP1_04_PIN
266 294
         #endif
267 295
         #ifndef RGB_LED_B_PIN
268
-          #define RGB_LED_B_PIN             PD1
296
+          #define RGB_LED_B_PIN      EXP1_03_PIN
269 297
         #endif
270 298
       #elif ENABLED(FYSETC_MINI_12864_2_1)
271
-        #define NEOPIXEL_PIN                PC12
299
+        #define NEOPIXEL_PIN         EXP1_05_PIN
272 300
       #endif
273 301
     #endif
274 302
 
275 303
     #if IS_ULTIPANEL
276
-      #define LCD_PINS_D5                   PC12
277
-      #define LCD_PINS_D6                   PD0
278
-      #define LCD_PINS_D7                   PD1
304
+      #define LCD_PINS_D5            EXP1_05_PIN
305
+      #define LCD_PINS_D6            EXP1_04_PIN
306
+      #define LCD_PINS_D7            EXP1_03_PIN
279 307
       #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
280 308
         #define BTN_ENC_EN           LCD_PINS_D7  // Detect the presence of the encoder
281 309
       #endif
@@ -287,15 +315,9 @@
287 315
 
288 316
 // Alter timing for graphical display
289 317
 #if HAS_MARLINUI_U8GLIB
290
-  #ifndef BOARD_ST7920_DELAY_1
291
-    #define BOARD_ST7920_DELAY_1  DELAY_NS(96)
292
-  #endif
293
-  #ifndef BOARD_ST7920_DELAY_2
294
-    #define BOARD_ST7920_DELAY_2  DELAY_NS(48)
295
-  #endif
296
-  #ifndef BOARD_ST7920_DELAY_3
297
-    #define BOARD_ST7920_DELAY_3 DELAY_NS(640)
298
-  #endif
318
+  #define BOARD_ST7920_DELAY_1    DELAY_NS(96)
319
+  #define BOARD_ST7920_DELAY_2    DELAY_NS(48)
320
+  #define BOARD_ST7920_DELAY_3   DELAY_NS(640)
299 321
 #endif
300 322
 
301 323
 #ifndef RGB_LED_R_PIN

Laddar…
Avbryt
Spara