Skip to content

Commit 19b73a6

Browse files
ellenspthinkyhead
authored andcommitted
📺 FYSETC_MINI_12864_2_1 with BTT_SKR_E3_DIP (MarlinFirmware#24986)
1 parent db60e0e commit 19b73a6

File tree

1 file changed

+97
-26
lines changed

1 file changed

+97
-26
lines changed

Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h

Lines changed: 97 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -166,32 +166,41 @@
166166
* EXP1
167167
*/
168168

169+
#define EXP1_01_PIN PA15
170+
#define EXP1_02_PIN PB6
171+
#define EXP1_03_PIN PA9
172+
#define EXP1_04_PIN -1 // RESET
173+
#define EXP1_05_PIN PA10
174+
#define EXP1_06_PIN PB9
175+
#define EXP1_07_PIN PB8
176+
#define EXP1_08_PIN PB7
177+
169178
#if HAS_WIRED_LCD
170179

171180
#if ENABLED(CR10_STOCKDISPLAY)
172181

173-
#define BEEPER_PIN PA15
182+
#define BEEPER_PIN EXP1_01_PIN
174183

175-
#define BTN_ENC PB6
176-
#define BTN_EN1 PA9
177-
#define BTN_EN2 PA10
184+
#define BTN_ENC EXP1_02_PIN
185+
#define BTN_EN1 EXP1_03_PIN
186+
#define BTN_EN2 EXP1_05_PIN
178187

179-
#define LCD_PINS_RS PB8
180-
#define LCD_PINS_ENABLE PB7
181-
#define LCD_PINS_D4 PB9
188+
#define LCD_PINS_RS EXP1_07_PIN
189+
#define LCD_PINS_ENABLE EXP1_08_PIN
190+
#define LCD_PINS_D4 EXP1_06_PIN
182191

183192
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
184193

185194
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
186195
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
187196
#endif
188197

189-
#define LCD_PINS_RS PB9
190-
#define LCD_PINS_ENABLE PB6
191-
#define LCD_PINS_D4 PB8
192-
#define LCD_PINS_D5 PA10
193-
#define LCD_PINS_D6 PA9
194-
#define LCD_PINS_D7 PA15
198+
#define LCD_PINS_RS EXP1_06_PIN
199+
#define LCD_PINS_ENABLE EXP1_02_PIN
200+
#define LCD_PINS_D4 EXP1_07_PIN
201+
#define LCD_PINS_D5 EXP1_05_PIN
202+
#define LCD_PINS_D6 EXP1_03_PIN
203+
#define LCD_PINS_D7 EXP1_01_PIN
195204
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
196205

197206
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
@@ -207,19 +216,81 @@
207216
* EXP1
208217
*/
209218

210-
#define BTN_ENC PB6
211-
#define BTN_EN1 PA9
212-
#define BTN_EN2 PA10
219+
#define BTN_ENC EXP1_02_PIN
220+
#define BTN_EN1 EXP1_03_PIN
221+
#define BTN_EN2 EXP1_05_PIN
213222

214-
#define DOGLCD_CS PB8
215-
#define DOGLCD_A0 PB9
216-
#define DOGLCD_SCK PA15
217-
#define DOGLCD_MOSI PB7
223+
#define DOGLCD_CS EXP1_07_PIN
224+
#define DOGLCD_A0 EXP1_06_PIN
225+
#define DOGLCD_SCK EXP1_01_PIN
226+
#define DOGLCD_MOSI EXP1_08_PIN
218227
#define FORCE_SOFT_SPI
219228
#define LCD_BACKLIGHT_PIN -1
220229

230+
#elif ENABLED(FYSETC_MINI_12864_2_1)
231+
232+
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
233+
#error "CAUTION! FYSETC_MINI_12864_2_1 and it's clones require wiring modifications. See 'pins_BTT_SKR_MINI_E3_DIP.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
234+
#endif
235+
#if SD_CONNECTION_IS(LCD)
236+
#error "The LCD SD Card is not supported with this configuration."
237+
#endif
238+
239+
/**
240+
* FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864_V1 display pinout
241+
*
242+
* Board Display
243+
* ------ ------
244+
* (NEOPIXEL) PA15 | 1 2 | PB6 (BTN_ENC) 5V |10 9 | GND
245+
* (BTN_EN2) PA9 | 3 4 | RESET -- | 8 7 | --
246+
* (BTN_EN1) PA10 5 6 | PB9 (LCD_RESET) NEOPIXEL | 6 5 LCD RESET
247+
* (LCD_A0) PB8 | 7 8 | PB7 (LCD_CS) LCD_A0 | 4 3 | LCD_CS
248+
* GND | 9 10 | 5V BTN_ENC | 2 1 | BEEP
249+
* ------ ------
250+
* EXP1 EXP1
251+
*
252+
*
253+
* ----- ------
254+
* | 1 | RST -- |10 9 | --
255+
* | 2 | PA3 RX2 RESET_BTN | 8 7 | SD_DETECT
256+
* | 3 | PA2 TX2 LCD_MOSI | 6 5 EN2
257+
* | 4 | GND -- | 4 3 | EN1
258+
* | 5 | 5V LCD_SCK | 2 1 | --
259+
* ----- ------
260+
* TFT EXP2
261+
262+
*
263+
* Needs custom cable.
264+
*
265+
* BOARD EXP1 NEOPIXEL <--> LCD EXP1 NEOPIXEL
266+
* BOARD EXP1 BTN_ENC <--> LCD EXP1 BTN_ENC
267+
* BOARD EXP1 BTN_EN2 <--> LCD EXP2 EN2
268+
* BOARD EXP1 RESET <--> LCD EXP2 RESET_BTN
269+
* BOARD EXP1 BTN_EN1 <--> LCD EXP2 EN1
270+
* BOARD EXP1 LCD_RESET <--> LCD EXP1 LCD RESET
271+
* BOARD EXP1 LCD_A0 <--> LCD EXP1 LCD_A0
272+
* BOARD EXP1 LCD_CS <--> LCD EXP1 LCD_CS
273+
* BOARD TFT RX2 <--> LCD EXP2 LCD_MOSI
274+
* BOARD TFT TX2 <--> LCD EXP2 LCD_SCK
275+
*/
276+
277+
#define NEOPIXEL_PIN EXP1_01_PIN
278+
#define BTN_ENC EXP1_02_PIN
279+
#define BTN_EN1 EXP1_03_PIN
280+
#define BTN_EN2 EXP1_05_PIN
281+
#define LCD_RESET_PIN EXP1_06_PIN
282+
#define BEEPER_PIN -1
283+
#define DOGLCD_A0 EXP1_07_PIN
284+
#define DOGLCD_CS EXP1_08_PIN
285+
286+
#define DOGLCD_SCK PA2
287+
#define DOGLCD_MOSI PA3
288+
289+
#define LCD_BACKLIGHT_PIN -1
290+
#define FORCE_SOFT_SPI
291+
221292
#else
222-
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP."
293+
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1 and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP."
223294
#endif
224295

225296
#endif // HAS_WIRED_LCD
@@ -260,10 +331,10 @@
260331

261332
#define CLCD_SPI_BUS 1 // SPI1 connector
262333

263-
#define BEEPER_PIN PB6
334+
#define BEEPER_PIN EXP1_02_PIN
264335

265-
#define CLCD_MOD_RESET PA9
266-
#define CLCD_SPI_CS PB8
336+
#define CLCD_MOD_RESET EXP1_03_PIN
337+
#define CLCD_SPI_CS EXP1_07_PIN
267338

268339
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
269340

@@ -281,8 +352,8 @@
281352
#define SD_MISO_PIN PA6
282353
#define SD_MOSI_PIN PA7
283354
#elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
284-
#define SD_DETECT_PIN PA15
285-
#define SD_SS_PIN PA10
355+
#define SD_DETECT_PIN EXP1_01_PIN
356+
#define SD_SS_PIN EXP1_05_PIN
286357
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
287358
#error "SD CUSTOM_CABLE is not compatible with SKR E3 DIP."
288359
#endif

0 commit comments

Comments
 (0)