Browse Source

✨ SAMD51 Bricolemon / Bricolemon Lite boards (#23658)

Kelroy 2 years ago
parent
commit
f61f8e3022
No account linked to committer's email address

+ 2
- 0
Marlin/src/core/boards.h View File

@@ -443,6 +443,8 @@
443 443
 //
444 444
 
445 445
 #define BOARD_AGCM4_RAMPS_144         6100  // RAMPS 1.4.4
446
+#define BOARD_BRICOLEMON_V1_0         6101  // Bricolemon
447
+#define BOARD_BRICOLEMON_LITE_V1_0    6102  // Bricolemon Lite
446 448
 
447 449
 //
448 450
 // Custom board

+ 4
- 0
Marlin/src/pins/pins.h View File

@@ -730,6 +730,10 @@
730 730
 
731 731
 #elif MB(AGCM4_RAMPS_144)
732 732
   #include "samd/pins_RAMPS_144.h"              // SAMD51                                 env:SAMD51_grandcentral_m4
733
+#elif MB(BRICOLEMON_V1_0)
734
+  #include "samd/pins_BRICOLEMON_V1_0.h"        // SAMD51                                 env:SAMD51_grandcentral_m4
735
+#elif MB(BRICOLEMON_LITE_V1_0)
736
+  #include "samd/pins_BRICOLEMON_LITE_V1_0.h"   // SAMD51                                 env:SAMD51_grandcentral_m4
733 737
 
734 738
 //
735 739
 // Custom board (with custom PIO env)

+ 616
- 0
Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h View File

@@ -0,0 +1,616 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * BRICOLEMON LITE Board. Based on atsamd51 (AGCM4), bootloader and credits by ADAFRUIT.
26
+ * This board its a 3.3V LOGIC Board, following the ADAFRUIT example, all of the board is open source.
27
+ * Schematic: Refer to the Bricolemon
28
+ * 3DSTEP: https://github.com/bricogeek/bricolemon/blob/master/Documentacion/Bricolemon%20Lite/LC_BG_002_PCB_V1I4.step
29
+ * PinDemux: https://github.com/bricogeek/bricolemon/blob/master/Documentacion/Bricolemon/PinDEMUX.xlsx
30
+ *
31
+ * NOTE: We need the Serial port on the -1 to make it work!!. Remember to change it on configuration.h #define SERIAL_PORT -1
32
+ */
33
+
34
+#if NOT_TARGET(ARDUINO_GRAND_CENTRAL_M4)
35
+  #error "Oops! Select 'Adafruit Grand Central M4' in 'Tools > Board.'"
36
+#endif
37
+
38
+#ifndef BOARD_INFO_NAME
39
+  #define BOARD_INFO_NAME "BRICOLEMON LITE V1.0" // , Lemoncrest & BricoGeek collaboration.
40
+#endif
41
+
42
+/**
43
+ * EEPROM EMULATION: Works with some bugs already, but the board needs an I2C EEPROM memory soldered on.
44
+ */
45
+//#define FLASH_EEPROM_EMULATION
46
+#define I2C_EEPROM                                // EEPROM on I2C-0
47
+#define MARLIN_EEPROM_SIZE               0x70000  // 512K (CAT24C512)
48
+
49
+// This is another option to emulate an EEPROM, but it's more efficient to not lose the data in the first place.
50
+//#define SDCARD_EEPROM_EMULATION
51
+
52
+//
53
+// BLTOUCH PIN: This pin is the signal pin for the BLTOUCH sensor.
54
+//
55
+#define SERVO0_PIN                            33  // BLTouch PWM
56
+
57
+//
58
+// Limit Switches
59
+//
60
+#define X_STOP_PIN                            10
61
+#define Y_STOP_PIN                            11
62
+#define Z_STOP_PIN                            12
63
+
64
+//
65
+// Z Probe (when not Z_MIN_PIN)
66
+//
67
+#ifndef Z_MIN_PROBE_PIN
68
+  #define Z_MIN_PROBE_PIN                     12
69
+#endif
70
+
71
+//
72
+// Steppers
73
+//
74
+#define X_STEP_PIN                             3
75
+#define X_DIR_PIN                             22
76
+#define X_ENABLE_PIN                          26
77
+
78
+#define Y_STEP_PIN                             4
79
+#define Y_DIR_PIN                             23
80
+#define Y_ENABLE_PIN                          27
81
+
82
+#define Z_STEP_PIN                             5
83
+#define Z_DIR_PIN                             24
84
+#define Z_ENABLE_PIN                          28
85
+
86
+#define E0_STEP_PIN                            2
87
+#define E0_DIR_PIN                            25
88
+#define E0_ENABLE_PIN                         29
89
+
90
+// Filament runout. You may choose to use this pin for some other purpose. It's a normal GPIO that can be configured as I/O.
91
+// For example, a switch to detect any kind of behavior, Power supply pin .... etc.
92
+#define FIL_RUNOUT_PIN                        32
93
+
94
+//
95
+// Temperature Sensors
96
+//
97
+#define TEMP_0_PIN                             1
98
+#define TEMP_BED_PIN                           3
99
+
100
+//
101
+// Heaters / Fans
102
+//
103
+#define HEATER_0_PIN                           6
104
+#define HEATER_BED_PIN                         7
105
+#define FAN_PIN                                8
106
+#define FAN1_PIN                               9
107
+
108
+//
109
+// LCD / Controller
110
+//
111
+
112
+/**
113
+ * Bricolemon Expansion connectors
114
+ *
115
+ *               ------                    ------
116
+ *        VCC   | 1  2 | GND        KILL  | 1  2 | GND
117
+ *        LCD7  | 3  4 | LCDD6      RESET | 3  4 | SD_DETECT
118
+ *        LCD5  | 5  6   LCDD4      MOSI  | 5  6   BTN_EN1
119
+ *        LCDRS | 7  8 | LCDDE      SS    | 7  8 | BTN_EN2
120
+ *  BTN_ENCODER | 9 10 | BEEPER     SCLK  | 9 10 | MISO
121
+ *               ------                    ------
122
+ *                EXP1                      EXP2
123
+ *
124
+ *- This extra connector is for a serial display like the MKS TFT.
125
+ *               MKS TFT
126
+ *               ------
127
+ *        RX0   | .  . | NC
128
+ *        TX0   | .  .   NC
129
+ *        GND   | .  .   GND
130
+ *        5B    | .  . | 5V
131
+ *               ------
132
+ *
133
+ *- Special mapping of EXP1 to EXP3 to work with Ender displays.
134
+ *
135
+ *               Enable CR10_STOCKDISPLAY in Configuration.h and connect EXP1 to the display EXP3 with this mapping.
136
+ *               ------
137
+ *        VCC   | 1  2 | GND
138
+ *        LCDDE | 3  4 | LCDRS
139
+ *        LCDD4 | 5  6   BTN_EN2
140
+ *        RESET | 7  8 | BTN_EN1
141
+ *  BTN_ENCODER | 9 10 | BEEPER
142
+ *               ------
143
+ *
144
+ *- Digital pinout reference of the Bricolemon for advanced users/configurations.
145
+ *
146
+ *               ------                    ------
147
+ *          VCC | 1  2 | GND          D49 | 1  2 | GND
148
+ *          D39 | 3  4 | D38          RST | 3  4 | D44
149
+ *          D37 | 5  6   D36          D51 | 5  6   D42
150
+ *          D34 | 7  8 | D35          D53 | 7  8 | D43
151
+ *          D40 | 9 10 | D41          D52 | 9 10 | D50
152
+ *               ------                    ------
153
+ *                EXP1                      EXP2
154
+ *
155
+ *- Pin table overview
156
+ *    LCD---                   SPI---
157
+ *      LCD4        36           MISO        50
158
+ *      LCD5        37           SS          53
159
+ *      LCD6        38           SCKL        52
160
+ *      LCD7        39           MOSI        51
161
+ *      LCDRS       34         BEEPER
162
+ *      LCDDE       35           BEEP        41
163
+ *    ENCODER---               SD-CARD---
164
+ *      BTN_EN1     42
165
+ *      BTN_EN2     43           SD_DETECT   44
166
+ *      BTN_ENCODER 40         KILL_PIN      49
167
+ */
168
+
169
+#define EXP1_03_PIN                           39
170
+#define EXP1_04_PIN                           38
171
+#define EXP1_05_PIN                           37
172
+#define EXP1_06_PIN                           36
173
+#define EXP1_07_PIN                           34
174
+#define EXP1_08_PIN                           35
175
+#define EXP1_09_PIN                           40
176
+#define EXP1_10_PIN                           41
177
+
178
+#define EXP2_01_PIN                           49
179
+#define EXP2_04_PIN                           44
180
+#define EXP2_05_PIN                           51
181
+#define EXP2_06_PIN                           42
182
+#define EXP2_07_PIN                           53
183
+#define EXP2_08_PIN                           43
184
+#define EXP2_09_PIN                           52
185
+#define EXP2_10_PIN                           50
186
+
187
+#if ENABLED(CR10_STOCKDISPLAY)
188
+  #define EXP3_03_PIN                EXP1_03_PIN
189
+  #define EXP3_04_PIN                EXP1_04_PIN
190
+  #define EXP3_05_PIN                EXP1_05_PIN
191
+  #define EXP3_06_PIN                EXP1_06_PIN
192
+  #define EXP3_07_PIN                EXP1_07_PIN
193
+  #define EXP3_08_PIN                EXP1_08_PIN
194
+  #define EXP3_09_PIN                EXP1_09_PIN
195
+  #define EXP3_10_PIN                EXP1_10_PIN
196
+#endif
197
+
198
+/************************************/
199
+/***** Configurations Section  ******/
200
+/************************************/
201
+
202
+/**
203
+ * This section starts with the pins_RAMPS_144.h as example, after if you need any new
204
+ * display, you could use normal duponts and connect it with with the scheme showed before.
205
+ * Tested:
206
+ *   - Ender 3 Old display (Character LCD)
207
+ *   - Ender 3 New Serial DWING Display
208
+ *   - Reprap Display
209
+ *   - Ender 5 New Serial Display
210
+ *   - Any Reprap character display like
211
+ */
212
+
213
+#if HAS_WIRED_LCD
214
+
215
+  //
216
+  // LCD Display output pins
217
+  //
218
+  #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
219
+
220
+    #if LCD_SERIAL_PORT != 1
221
+      #error "LCD_SERIAL_PORT should be 1 for this display."
222
+    #endif
223
+
224
+    // DWIN Encoder
225
+    #define BTN_ENC                  EXP1_09_PIN
226
+    #define BTN_EN1                  EXP1_08_PIN
227
+    #define BTN_EN2                  EXP1_07_PIN
228
+
229
+    #ifndef BEEPER_PIN
230
+      #define BEEPER_PIN             EXP1_10_PIN
231
+      #undef SPEAKER
232
+    #endif
233
+
234
+  #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
235
+
236
+    // TO TEST
237
+    //#define LCD_PINS_RS            EXP2_01_PIN  // CS chip select /SS chip slave select
238
+    //#define LCD_PINS_ENABLE        EXP2_05_PIN  // SID (MOSI)
239
+    //#define LCD_PINS_D4            EXP2_09_PIN  // SCK (CLK) clock
240
+
241
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
242
+
243
+    // TO TEST
244
+    //#define LCD_PINS_RS            EXP1_09_PIN
245
+    //#define LCD_PINS_ENABLE        EXP2_06_PIN
246
+    //#define LCD_PINS_D4                     57  // Mega/Due:65 - AGCM4:57
247
+    //#define LCD_PINS_D5                     58  // Mega/Due:66 - AGCM4:58
248
+    //#define LCD_PINS_D6            EXP2_04_PIN
249
+    //#define LCD_PINS_D7                     56  // Mega/Due:64 - AGCM4:56
250
+
251
+  #else
252
+
253
+    #if ENABLED(CR10_STOCKDISPLAY)
254
+
255
+      // TO TEST
256
+      #define LCD_PINS_RS            EXP3_04_PIN
257
+      #define LCD_PINS_ENABLE        EXP3_03_PIN
258
+      #define LCD_PINS_D4            EXP3_05_PIN
259
+
260
+      #if !IS_NEWPANEL
261
+        // TO TEST
262
+        //#define BEEPER_PIN         EXP3_05_PIN
263
+      #endif
264
+
265
+    #elif ENABLED(ZONESTAR_LCD)
266
+
267
+      // TO TEST
268
+      //#define LCD_PINS_RS                   56  // Mega/Due:64 - AGCM4:56
269
+      //#define LCD_PINS_ENABLE      EXP2_04_PIN
270
+      //#define LCD_PINS_D4                   55  // Mega/Due:63 - AGCM4:55
271
+      //#define LCD_PINS_D5          EXP1_09_PIN
272
+      //#define LCD_PINS_D6          EXP2_06_PIN
273
+      //#define LCD_PINS_D7                   57  // Mega/Due:65 - AGCM4:57
274
+
275
+    #else
276
+
277
+      #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
278
+        // TO TEST
279
+        //#define LCD_PINS_DC                 25  // Set as output on init
280
+        //#define LCD_PINS_RS                 27  // Pull low for 1s to init
281
+        // DOGM SPI LCD Support
282
+        //#define DOGLCD_CS                   16
283
+        //#define DOGLCD_MOSI                 17
284
+        //#define DOGLCD_SCK                  23
285
+        //#define DOGLCD_A0          LCD_PINS_DC
286
+
287
+
288
+      #else
289
+        // Definitions for any standard Display
290
+        #define LCD_PINS_RS          EXP1_07_PIN
291
+        #define LCD_PINS_ENABLE      EXP1_08_PIN
292
+        #define LCD_PINS_D4          EXP1_06_PIN
293
+        #define LCD_PINS_D5          EXP1_05_PIN
294
+        #define LCD_PINS_D6          EXP1_04_PIN
295
+      #endif
296
+
297
+      #define LCD_PINS_D7            EXP1_03_PIN
298
+
299
+      #if !IS_NEWPANEL
300
+        #define BEEPER_PIN           EXP1_10_PIN
301
+      #endif
302
+
303
+    #endif
304
+
305
+    #if !IS_NEWPANEL
306
+      // Buttons attached to a shift register
307
+      // Not wired yet
308
+      //#define SHIFT_CLK_PIN        EXP1_04_PIN
309
+      //#define SHIFT_LD_PIN         EXP2_06_PIN
310
+      //#define SHIFT_OUT_PIN        EXP1_09_PIN
311
+      //#define SHIFT_EN_PIN                  17
312
+    #endif
313
+
314
+  #endif
315
+
316
+  //
317
+  // LCD Display input pins
318
+  //
319
+  #if IS_NEWPANEL
320
+
321
+    #if IS_RRD_SC
322
+
323
+      #define BEEPER_PIN             EXP1_10_PIN
324
+
325
+      #if ENABLED(CR10_STOCKDISPLAY)
326
+        // TO TEST
327
+        #define BTN_EN1              EXP3_08_PIN
328
+        #define BTN_EN2              EXP3_06_PIN
329
+
330
+      #else
331
+        // Definitions for any standard Display
332
+        #define BTN_EN1              EXP2_06_PIN
333
+        #define BTN_EN2              EXP2_08_PIN
334
+        #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
335
+          #define BTN_ENC_EN         LCD_PINS_D7  // Detect the presence of the encoder
336
+        #endif
337
+      #endif
338
+
339
+      #define BTN_ENC                EXP1_09_PIN
340
+      #ifndef SD_DETECT_PIN
341
+        #define SD_DETECT_PIN        EXP2_04_PIN
342
+      #endif
343
+      #define KILL_PIN               EXP2_01_PIN
344
+
345
+      #if ENABLED(BQ_LCD_SMART_CONTROLLER)
346
+        //#define LCD_BACKLIGHT_PIN  EXP1_03_PIN  // TO TEST
347
+      #endif
348
+
349
+    #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
350
+
351
+      // TO TEST
352
+      //#define BTN_EN1                       56  // Mega/Due:64 - AGCM4:56
353
+      //#define BTN_EN2                       72  // Mega/Due:59 - AGCM4:72
354
+      //#define BTN_ENC                       55
355
+      //#define SD_DETECT_PIN        EXP2_06_PIN
356
+
357
+    #elif ENABLED(LCD_I2C_PANELOLU2)
358
+
359
+      // TO TEST
360
+      //#define BTN_EN1                       47
361
+      //#define BTN_EN2              EXP2_08_PIN
362
+      //#define BTN_ENC                       32
363
+      //#define LCD_SDSS                    SDSS
364
+      //#define KILL_PIN             EXP1_10_PIN
365
+
366
+    #elif ENABLED(LCD_I2C_VIKI)
367
+
368
+      // TO TEST
369
+      //#define BTN_EN1              EXP1_09_PIN  // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
370
+      //#define BTN_EN2              EXP2_06_PIN
371
+      //#define BTN_ENC                       -1
372
+
373
+      //#define LCD_SDSS                    SDSS
374
+      //#define SD_DETECT_PIN        EXP2_01_PIN
375
+
376
+    #elif ANY(VIKI2, miniVIKI)
377
+
378
+      // TO TEST
379
+      //#define DOGLCD_CS                     45
380
+      //#define DOGLCD_A0            EXP2_04_PIN
381
+      //#define LCD_SCREEN_ROT_180
382
+
383
+      //#define BEEPER_PIN                    33
384
+      //#define STAT_LED_RED_PIN              32
385
+      //#define STAT_LED_BLUE_PIN    EXP1_08_PIN
386
+
387
+      //#define BTN_EN1                       22
388
+      //#define BTN_EN2                        7
389
+      //#define BTN_ENC              EXP1_03_PIN
390
+
391
+      //#define SD_DETECT_PIN                 -1  // Pin 49 for display SD interface, 72 for easy adapter board
392
+      //#define KILL_PIN                      31
393
+
394
+    #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
395
+
396
+      // TO TEST
397
+      //#define DOGLCD_CS                     29
398
+      //#define DOGLCD_A0                     27
399
+
400
+      //#define BEEPER_PIN                    23
401
+      //#define LCD_BACKLIGHT_PIN             33
402
+
403
+      //#define BTN_EN1              EXP1_08_PIN
404
+      //#define BTN_EN2              EXP1_05_PIN
405
+      //#define BTN_ENC                       31
406
+
407
+      //#define LCD_SDSS                    SDSS
408
+      //#define SD_DETECT_PIN        EXP2_01_PIN
409
+      //#define KILL_PIN             EXP1_10_PIN
410
+
411
+    #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864)
412
+
413
+      // TO TEST
414
+      //#define BEEPER_PIN           EXP1_05_PIN
415
+      //#define BTN_ENC              EXP1_08_PIN
416
+      //#define SD_DETECT_PIN        EXP2_01_PIN
417
+
418
+      //#ifndef KILL_PIN
419
+      //  #define KILL_PIN           EXP1_10_PIN
420
+      //#endif
421
+
422
+      #if ENABLED(MKS_MINI_12864)
423
+
424
+        // TO TEST
425
+        //#define DOGLCD_A0                   27
426
+        //#define DOGLCD_CS                   25
427
+
428
+        // GLCD features
429
+        // Uncomment screen orientation
430
+        //#define LCD_SCREEN_ROT_90
431
+        //#define LCD_SCREEN_ROT_180
432
+        //#define LCD_SCREEN_ROT_270
433
+
434
+        // not connected to a pin
435
+        //#define LCD_BACKLIGHT_PIN           57  // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
436
+
437
+        //#define BTN_EN1                     31
438
+        //#define BTN_EN2                     33
439
+
440
+      #elif ENABLED(FYSETC_MINI_12864)
441
+
442
+        // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
443
+
444
+        // TO TEST
445
+        //#define DOGLCD_A0                   16
446
+        //#define DOGLCD_CS                   17
447
+
448
+        //#define BTN_EN1                     33
449
+        //#define BTN_EN2                     31
450
+
451
+        //#define FORCE_SOFT_SPI                  // Use this if default of hardware SPI causes display problems
452
+                                                  //   results in LCD soft SPI mode 3, SD soft SPI mode 0
453
+
454
+        //#define LCD_RESET_PIN               23  // Must be high or open for LCD to operate normally.
455
+
456
+        #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
457
+          #ifndef RGB_LED_R_PIN
458
+            // TO TEST
459
+            //#define RGB_LED_R_PIN           25
460
+          #endif
461
+          #ifndef RGB_LED_G_PIN
462
+            // TO TEST
463
+            //#define RGB_LED_G_PIN           27
464
+          #endif
465
+          #ifndef RGB_LED_B_PIN
466
+            // TO TEST
467
+            //#define RGB_LED_B_PIN           29
468
+          #endif
469
+        #elif ENABLED(FYSETC_MINI_12864_2_1)
470
+          // TO TEST
471
+          //#define NEOPIXEL_PIN              25
472
+        #endif
473
+
474
+      #endif
475
+
476
+    #elif ENABLED(MINIPANEL)
477
+
478
+      // TO TEST
479
+      //#define BEEPER_PIN           EXP2_06_PIN
480
+      // not connected to a pin
481
+      //#define LCD_BACKLIGHT_PIN             57  // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
482
+
483
+      //#define DOGLCD_A0            EXP2_04_PIN
484
+      //#define DOGLCD_CS                     58  // Mega/Due:66 - AGCM4:58
485
+
486
+      // GLCD features
487
+      // Uncomment screen orientation
488
+      //#define LCD_SCREEN_ROT_90
489
+      //#define LCD_SCREEN_ROT_180
490
+      //#define LCD_SCREEN_ROT_270
491
+
492
+      //#define BTN_EN1              EXP1_09_PIN
493
+      //#define BTN_EN2                       55  // Mega/Due:63 - AGCM4:55
494
+      //#define BTN_ENC                       72  // Mega/Due:59 - AGCM4:72
495
+
496
+      //#define SD_DETECT_PIN        EXP2_01_PIN
497
+      //#define KILL_PIN                      56  // Mega/Due:64 - AGCM4:56
498
+
499
+    #elif ENABLED(ZONESTAR_LCD)
500
+
501
+      // TO TEST
502
+      //#define ADC_KEYPAD_PIN                12
503
+
504
+    #elif ENABLED(AZSMZ_12864)
505
+
506
+      // TO TEST
507
+
508
+    #else
509
+
510
+      // Beeper on AUX-4
511
+      //#define BEEPER_PIN                    33
512
+
513
+      // Buttons are directly attached to AUX-2
514
+      #if IS_RRW_KEYPAD
515
+        // TO TEST
516
+        //#define SHIFT_OUT_PIN      EXP1_09_PIN
517
+        //#define SHIFT_CLK_PIN      EXP2_04_PIN
518
+        //#define SHIFT_LD_PIN       EXP2_06_PIN
519
+        //#define BTN_EN1                     56  // Mega/Due:64 - AGCM4:56
520
+        //#define BTN_EN2                     72  // Mega/Due:59 - AGCM4:72
521
+        //#define BTN_ENC                     55  // Mega/Due:63 - AGCM4:55
522
+      #elif ENABLED(PANEL_ONE)
523
+        // TO TEST
524
+        //#define BTN_EN1                     72  // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72)
525
+        //#define BTN_EN2                     55  // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55)
526
+        //#define BTN_ENC            EXP2_01_PIN  // AUX3 PIN 7
527
+      #else
528
+        // TO TEST
529
+        //#define BTN_EN1            EXP1_05_PIN
530
+        //#define BTN_EN2            EXP1_08_PIN
531
+        //#define BTN_ENC                     31
532
+      #endif
533
+
534
+      #if ENABLED(G3D_PANEL)
535
+        // TO TEST
536
+        //#define SD_DETECT_PIN      EXP2_01_PIN
537
+        //#define KILL_PIN           EXP1_10_PIN
538
+      #endif
539
+
540
+    #endif
541
+  #endif // IS_NEWPANEL
542
+
543
+#endif // HAS_WIRED_LCD
544
+
545
+//
546
+// SD Support
547
+//
548
+
549
+/**
550
+ * Bricolemon has an SD slot, but to change it to your LCD or Custom, set the option to one of the following:
551
+ *
552
+ *           LCD - Use the SD drive in the external LCD controller.
553
+ *       ONBOARD - Use the SD drive on the control board.
554
+ *  CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
555
+ *
556
+ * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
557
+ */
558
+
559
+#ifndef SDCARD_CONNECTION
560
+  #define SDCARD_CONNECTION              ONBOARD
561
+#endif
562
+
563
+#if SD_CONNECTION_IS(ONBOARD)
564
+  #define SDSS                                83
565
+  #undef SD_DETECT_PIN
566
+  #define SD_DETECT_PIN                       95
567
+#else
568
+  #define SDSS                       EXP2_07_PIN
569
+#endif
570
+
571
+#if HAS_TMC_UART
572
+  /**
573
+   * Address for the UART Configuration of the TMC2209. Override in Configuration files.
574
+   * To test TMC2209 Steppers enable TMC_DEBUG in Configuration_adv.h and test the M122 command with voltage on the steppers.
575
+   */
576
+  #ifndef X_SLAVE_ADDRESS
577
+    #define X_SLAVE_ADDRESS                 0b00
578
+  #endif
579
+  #ifndef Y_SLAVE_ADDRESS
580
+    #define Y_SLAVE_ADDRESS                 0b01
581
+  #endif
582
+  #ifndef Z_SLAVE_ADDRESS
583
+    #define Z_SLAVE_ADDRESS                 0b10
584
+  #endif
585
+  #ifndef E0_SLAVE_ADDRESS
586
+    #define E0_SLAVE_ADDRESS                0b11
587
+  #endif
588
+
589
+  /**
590
+   * TMC2208/TMC2209 stepper drivers
591
+   *  It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations.
592
+   */
593
+  //#define X_HARDWARE_SERIAL  Serial1
594
+  //#define Y_HARDWARE_SERIAL  Serial1
595
+  //#define Z_HARDWARE_SERIAL  Serial1
596
+  //#define E0_HARDWARE_SERIAL Serial1
597
+
598
+  // This is the stable default value after testing, but, higher UART rates could be configured, remeber to test the Steppers with the M122 command to check if everything works.
599
+  #define TMC_BAUD_RATE 250000
600
+
601
+  //
602
+  // Software serial
603
+  //
604
+  #define X_SERIAL_TX_PIN                      0
605
+  #define X_SERIAL_RX_PIN                      1
606
+
607
+  #define Y_SERIAL_TX_PIN        X_SERIAL_TX_PIN
608
+  #define Y_SERIAL_RX_PIN        X_SERIAL_RX_PIN
609
+
610
+  #define Z_SERIAL_TX_PIN        X_SERIAL_TX_PIN
611
+  #define Z_SERIAL_RX_PIN        X_SERIAL_RX_PIN
612
+
613
+  #define E0_SERIAL_TX_PIN       X_SERIAL_TX_PIN
614
+  #define E0_SERIAL_RX_PIN       X_SERIAL_RX_PIN
615
+
616
+#endif

+ 676
- 0
Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h View File

@@ -0,0 +1,676 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * BRICOLEMON Board. Based on ATSAMD51 (AGCM4), bootloader and credits by ADAFRUIT.
26
+ */
27
+
28
+#if NOT_TARGET(ARDUINO_GRAND_CENTRAL_M4)
29
+  #error "Oops! Select 'Adafruit Grand Central M4' in 'Tools > Board.'"
30
+#endif
31
+
32
+#ifndef BOARD_INFO_NAME
33
+  #define BOARD_INFO_NAME "BRICOLEMON V1.0" // , Lemoncrest & BricoGeek collaboration.
34
+#endif
35
+
36
+/**
37
+ * BRICOLEMON Board. Based on atsamd51 (AGCM4), bootloader and credits by ADAFRUIT.
38
+ * This board its a 3.3V LOGIC Board, following the ADAFRUIT example, all of the board is open source.
39
+ * Schematic: https://github.com/bricogeek/bricolemon/blob/master/Documentacion/Bricolemon/EsquemaBricolemon_REVB.pdf
40
+ * 3DSTEP: https://github.com/bricogeek/bricolemon/blob/master/Documentacion/Bricolemon/BricolemonREVB.step
41
+ * PinDemux: https://github.com/bricogeek/bricolemon/blob/master/Documentacion/Bricolemon/PinDEMUX.xlsx
42
+ *
43
+ * NOTE: We need the Serial port on the -1 to make it work!!. Remember to change it on configuration.h #define SERIAL_PORT -1
44
+ */
45
+
46
+/**
47
+ * EEPROM EMULATION: Works with some bugs already, but the board needs an I2C EEPROM memory soldered on.
48
+ */
49
+//#define FLASH_EEPROM_EMULATION
50
+#define I2C_EEPROM                                // EEPROM on I2C-0
51
+#define MARLIN_EEPROM_SIZE               0x70000  // 512K (CAT24C512)
52
+
53
+//This its another option to emulate an EEPROM, but its more efficient to dont loose the data the first One.
54
+//#define SDCARD_EEPROM_EMULATION
55
+
56
+//
57
+// BLTouch
58
+//
59
+#define SERVO0_PIN                            33  // BLTouch PWM
60
+
61
+//
62
+//  Limit Switches
63
+//
64
+#define X_STOP_PIN                            10
65
+#define Y_STOP_PIN                            11
66
+#define Z_STOP_PIN                            12
67
+
68
+/**
69
+ * NOTE: Useful if extra TMC2209 are to be used as independent axes.
70
+ * We need to configure the new digital PIN, for this we could configure on the board the extra pin of this stepper, for example as a MIN_PIN/MAX_PIN. This pin is the D14.
71
+ */
72
+//#define Z2_STOP_PIN                         14
73
+//#define X2_STOP_PIN                         14
74
+//#define Y2_STOP_PIN                         14
75
+
76
+//
77
+// Z Probe (when not Z_MIN_PIN)
78
+//
79
+#ifndef Z_MIN_PROBE_PIN
80
+  #define Z_MIN_PROBE_PIN                     12
81
+#endif
82
+
83
+//
84
+// Steppers
85
+//
86
+#define X_STEP_PIN                             3
87
+#define X_DIR_PIN                             22
88
+#define X_ENABLE_PIN                          26
89
+
90
+#define Y_STEP_PIN                             4
91
+#define Y_DIR_PIN                             23
92
+#define Y_ENABLE_PIN                          27
93
+
94
+#define Z_STEP_PIN                             5
95
+#define Z_DIR_PIN                             24
96
+#define Z_ENABLE_PIN                          28
97
+
98
+#define E0_STEP_PIN                            2
99
+#define E0_DIR_PIN                            25
100
+#define E0_ENABLE_PIN                         29
101
+
102
+#define E1_STEP_PIN                           13
103
+#define E1_DIR_PIN                            46
104
+#define E1_ENABLE_PIN                         47
105
+
106
+// Filament runout. You may choose to use this pin for some other purpose. It's a normal GPIO that can be configured as I/O.
107
+// For example, a switch to detect any kind of behavior, Power supply pin .... etc.
108
+#define FIL_RUNOUT_PIN                        32
109
+
110
+// This board have the option to use an extra TMC2209 stepper, one of the use could be as a second extruder.
111
+#if EXTRUDERS < 2
112
+  // TODO: Corregir aquí que cuando tenemos dos extrusores o lo que sea, utiliza los endstop que le sobran, osea los max, no hay Z2_endstop
113
+  #if NUM_Z_STEPPER_DRIVERS > 1
114
+    #define Z2_STOP_PIN                       14
115
+  #endif
116
+#else
117
+  // If we want to configure the extra stepper as a Extruder, we should have undef all of the extra motors.
118
+  #undef X2_DRIVER_TYPE
119
+  #undef Y2_DRIVER_TYPE
120
+  #undef Z2_DRIVER_TYPE
121
+  #undef Z3_DRIVER_TYPE
122
+  #undef Z4_DRIVER_TYPE
123
+
124
+  // Si tenemos más de un extrusor lo que hacemos es definir el nuevo extrusor así como sus pines
125
+  // Acordarse de definir el #define TEMP_SENSOR_1, ya que este contiene el tipo de sonda del extrusor E1
126
+
127
+  #define FIL_RUNOUT2_PIN                     14
128
+
129
+#endif
130
+
131
+//
132
+// Extruder / Bed
133
+//
134
+
135
+// Temperature Sensors
136
+#define TEMP_0_PIN                             1
137
+
138
+// You could use one of the ADC for a temp chamber if you don't use the second extruder, for example.
139
+#if TEMP_SENSOR_CHAMBER > 0
140
+  #define TEMP_CHAMBER_PIN                     3
141
+#else
142
+  #define TEMP_1_PIN                           3
143
+#endif
144
+
145
+#define TEMP_BED_PIN                           2
146
+
147
+//
148
+// Heaters / Fans
149
+//
150
+#define HEATER_0_PIN                           6
151
+#define HEATER_1_PIN                          45
152
+#define HEATER_BED_PIN                         7
153
+
154
+// The board has 4 PWM fans, use and configure as desired
155
+#define FAN_PIN                                8
156
+#define FAN1_PIN                               9
157
+#define FAN2_PIN                              30
158
+#define FAN3_PIN                              31
159
+
160
+//
161
+// LCD / Controller
162
+//
163
+
164
+/**
165
+ * Bricolemon Expansion connectors
166
+ *
167
+ *               ------                    ------
168
+ *        VCC   | 1  2 | GND        KILL  | 1  2 | GND
169
+ *        LCD7  | 3  4 | LCDD6      RESET | 3  4 | SD_DETECT
170
+ *        LCD5  | 5  6   LCDD4      MOSI  | 5  6   BTN_EN1
171
+ *        LCDRS | 7  8 | LCDDE      SS    | 7  8 | BTN_EN2
172
+ *  BTN_ENCODER | 9 10 | BEEPER     SCLK  | 9 10 | MISO
173
+ *               ------                    ------
174
+ *                EXP1                      EXP2
175
+ *
176
+ *- This extra connector is for a serial display like the MKS TFT.
177
+ *               MKS TFT
178
+ *               ------
179
+ *        RX0   | .  . | NC
180
+ *        TX0   | .  .   NC
181
+ *        GND   | .  .   GND
182
+ *        5B    | .  . | 5V
183
+ *               ------
184
+ *
185
+ *- Special mapping of EXP1 to EXP3 to work with Ender displays.
186
+ *
187
+ *               Enable CR10_STOCKDISPLAY in Configuration.h and connect EXP1 to the display EXP3 with this mapping.
188
+ *               ------
189
+ *        VCC   | 1  2 | GND
190
+ *        LCDDE | 3  4 | LCDRS
191
+ *        LCDD4 | 5  6   BTN_EN2
192
+ *        RESET | 7  8 | BTN_EN1
193
+ *  BTN_ENCODER | 9 10 | BEEPER
194
+ *               ------
195
+ *
196
+ *- Digital pinout reference of the Bricolemon for advanced users/configurations.
197
+ *
198
+ *               ------                    ------
199
+ *          VCC | 1  2 | GND          D49 | 1  2 | GND
200
+ *          D39 | 3  4 | D38          RST | 3  4 | D44
201
+ *          D37 | 5  6   D36          D51 | 5  6   D42
202
+ *          D34 | 7  8 | D35          D53 | 7  8 | D43
203
+ *          D40 | 9 10 | D41          D52 | 9 10 | D50
204
+ *               ------                    ------
205
+ *                EXP1                      EXP2
206
+ *
207
+ *- Pin table overview
208
+ *    LCD---                   SPI---
209
+ *      LCD4        36           MISO        50
210
+ *      LCD5        37           SS          53
211
+ *      LCD6        38           SCKL        52
212
+ *      LCD7        39           MOSI        51
213
+ *      LCDRS       34         BEEPER
214
+ *      LCDDE       35           BEEP        41
215
+ *    ENCODER---               SD-CARD---
216
+ *      BTN_EN1     42           SD_DETECT   44
217
+ *      BTN_EN2     43         KILL_PIN      49
218
+ *      BTN_ENCODER 40
219
+ */
220
+
221
+#define EXP1_03_PIN                           39
222
+#define EXP1_04_PIN                           38
223
+#define EXP1_05_PIN                           37
224
+#define EXP1_06_PIN                           36
225
+#define EXP1_07_PIN                           34
226
+#define EXP1_08_PIN                           35
227
+#define EXP1_09_PIN                           40
228
+#define EXP1_10_PIN                           41
229
+
230
+#define EXP2_01_PIN                           49
231
+#define EXP2_04_PIN                           44
232
+#define EXP2_05_PIN                           51
233
+#define EXP2_06_PIN                           42
234
+#define EXP2_07_PIN                           53
235
+#define EXP2_08_PIN                           43
236
+#define EXP2_09_PIN                           52
237
+#define EXP2_10_PIN                           50
238
+
239
+#if ENABLED(CR10_STOCKDISPLAY)
240
+  #define EXP3_03_PIN                EXP1_03_PIN
241
+  #define EXP3_04_PIN                EXP1_04_PIN
242
+  #define EXP3_05_PIN                EXP1_05_PIN
243
+  #define EXP3_06_PIN                EXP1_06_PIN
244
+  #define EXP3_07_PIN                EXP1_07_PIN
245
+  #define EXP3_08_PIN                EXP1_08_PIN
246
+  #define EXP3_09_PIN                EXP1_09_PIN
247
+  #define EXP3_10_PIN                EXP1_10_PIN
248
+#endif
249
+
250
+/************************************/
251
+/***** Configurations Section  ******/
252
+/************************************/
253
+
254
+/**
255
+ * This sections starts with the pins_RAMPS_144.h as example, after if you need any new
256
+ * display, you could use normal duponts and connect it with with the scheme showed before.
257
+ * Tested:
258
+ *   - Ender 3 Old display (Character LCD)
259
+ *   - Ender 3 New Serial DWING Display
260
+ *   - Reprap Display
261
+ *   - Ender 5 New Serial Display
262
+ *   - Any Reprap character display like
263
+ */
264
+
265
+#if HAS_WIRED_LCD
266
+
267
+  //
268
+  // LCD Display output pins
269
+  //
270
+
271
+  #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
272
+
273
+    #if LCD_SERIAL_PORT != 1
274
+      #error "LCD_SERIAL_PORT should be 1 for this display."
275
+    #endif
276
+
277
+    // DWIN Encoder
278
+    #define BTN_ENC                  EXP1_09_PIN
279
+    #define BTN_EN1                  EXP1_08_PIN
280
+    #define BTN_EN2                  EXP1_07_PIN
281
+
282
+    #ifndef BEEPER_PIN
283
+      #define BEEPER_PIN             EXP1_10_PIN
284
+      #undef SPEAKER
285
+    #endif
286
+
287
+  #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
288
+
289
+    // TO TEST
290
+    //#define LCD_PINS_RS            EXP2_01_PIN  // CS chip select /SS chip slave select
291
+    //#define LCD_PINS_ENABLE        EXP2_05_PIN  // SID (MOSI)
292
+    //#define LCD_PINS_D4            EXP2_09_PIN  // SCK (CLK) clock
293
+
294
+  #elif BOTH(IS_NEWPANEL, PANEL_ONE)
295
+
296
+    // TO TEST
297
+    //#define LCD_PINS_RS            EXP1_09_PIN
298
+    //#define LCD_PINS_ENABLE        EXP2_06_PIN
299
+    //#define LCD_PINS_D4                     57  // Mega/Due:65 - AGCM4:57
300
+    //#define LCD_PINS_D5                     58  // Mega/Due:66 - AGCM4:58
301
+    //#define LCD_PINS_D6            EXP2_04_PIN
302
+    //#define LCD_PINS_D7                     56  // Mega/Due:64 - AGCM4:56
303
+
304
+  #else
305
+
306
+    #if ENABLED(CR10_STOCKDISPLAY)
307
+
308
+      // TO TEST
309
+      #define LCD_PINS_RS            EXP3_04_PIN
310
+      #define LCD_PINS_ENABLE        EXP3_03_PIN
311
+      #define LCD_PINS_D4            EXP3_05_PIN
312
+
313
+      #if !IS_NEWPANEL
314
+        // TO TEST
315
+        //#define BEEPER_PIN         EXP3_05_PIN
316
+      #endif
317
+
318
+    #elif ENABLED(ZONESTAR_LCD)
319
+
320
+      // TO TEST
321
+      //#define LCD_PINS_RS                   56  // Mega/Due:64 - AGCM4:56
322
+      //#define LCD_PINS_ENABLE      EXP2_04_PIN
323
+      //#define LCD_PINS_D4                   55  // Mega/Due:63 - AGCM4:55
324
+      //#define LCD_PINS_D5          EXP1_09_PIN
325
+      //#define LCD_PINS_D6          EXP2_06_PIN
326
+      //#define LCD_PINS_D7                   57  // Mega/Due:65 - AGCM4:57
327
+
328
+    #else
329
+
330
+      #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
331
+        // TO TEST
332
+        //#define LCD_PINS_DC                 25  // Set as output on init
333
+        //#define LCD_PINS_RS                 27  // Pull low for 1s to init
334
+        // DOGM SPI LCD Support
335
+        //#define DOGLCD_CS                   16
336
+        //#define DOGLCD_MOSI                 17
337
+        //#define DOGLCD_SCK                  23
338
+        //#define DOGLCD_A0          LCD_PINS_DC
339
+
340
+      #else
341
+        // Definitions for any standard Display
342
+        #define LCD_PINS_RS          EXP1_07_PIN
343
+        #define LCD_PINS_ENABLE      EXP1_08_PIN
344
+        #define LCD_PINS_D4          EXP1_06_PIN
345
+        #define LCD_PINS_D5          EXP1_05_PIN
346
+        #define LCD_PINS_D6          EXP1_04_PIN
347
+      #endif
348
+
349
+      #define LCD_PINS_D7            EXP1_03_PIN
350
+
351
+      #if !IS_NEWPANEL
352
+        #define BEEPER_PIN           EXP1_10_PIN
353
+      #endif
354
+
355
+    #endif
356
+
357
+    #if !IS_NEWPANEL
358
+      // Buttons attached to a shift register
359
+      // Not wired yet
360
+      //#define SHIFT_CLK_PIN        EXP1_04_PIN
361
+      //#define SHIFT_LD_PIN         EXP2_06_PIN
362
+      //#define SHIFT_OUT_PIN        EXP1_09_PIN
363
+      //#define SHIFT_EN_PIN                  17
364
+    #endif
365
+
366
+  #endif
367
+
368
+  //
369
+  // LCD Display input pins
370
+  //
371
+  #if IS_NEWPANEL
372
+
373
+    #if IS_RRD_SC
374
+
375
+      #define BEEPER_PIN             EXP1_10_PIN
376
+
377
+      #if ENABLED(CR10_STOCKDISPLAY)
378
+        // TO TEST
379
+        #define BTN_EN1              EXP1_08_PIN
380
+        #define BTN_EN2              EXP1_06_PIN
381
+      #else
382
+        // Definitions fpr any standard Display
383
+        #define BTN_EN1              EXP2_06_PIN
384
+        #define BTN_EN2              EXP2_08_PIN
385
+        #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
386
+          #define BTN_ENC_EN         LCD_PINS_D7  // Detect the presence of the encoder
387
+        #endif
388
+      #endif
389
+
390
+      #define BTN_ENC                EXP1_09_PIN
391
+      #ifndef SD_DETECT_PIN
392
+        #define SD_DETECT_PIN        EXP2_04_PIN
393
+      #endif
394
+      #define KILL_PIN               EXP2_01_PIN
395
+
396
+      #if ENABLED(BQ_LCD_SMART_CONTROLLER)
397
+        //#define LCD_BACKLIGHT_PIN  EXP1_03_PIN  // TO TEST
398
+      #endif
399
+
400
+    #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
401
+
402
+      // TO TEST
403
+      //#define BTN_EN1                       56  // Mega/Due:64 - AGCM4:56
404
+      //#define BTN_EN2                       72  // Mega/Due:59 - AGCM4:72
405
+      //#define BTN_ENC                       55
406
+      //#define SD_DETECT_PIN        EXP2_06_PIN
407
+
408
+    #elif ENABLED(LCD_I2C_PANELOLU2)
409
+
410
+      // TO TEST
411
+      //#define BTN_EN1                       47
412
+      //#define BTN_EN2              EXP2_08_PIN
413
+      //#define BTN_ENC                       32
414
+      //#define LCD_SDSS                    SDSS
415
+      //#define KILL_PIN             EXP1_10_PIN
416
+
417
+    #elif ENABLED(LCD_I2C_VIKI)
418
+
419
+      // TO TEST
420
+      //#define BTN_EN1              EXP1_09_PIN  // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
421
+      //#define BTN_EN2              EXP2_06_PIN
422
+      //#define BTN_ENC                       -1
423
+
424
+      //#define LCD_SDSS                    SDSS
425
+      //#define SD_DETECT_PIN        EXP2_01_PIN
426
+
427
+    #elif ANY(VIKI2, miniVIKI)
428
+
429
+      // TO TEST
430
+      //#define DOGLCD_CS                     45
431
+      //#define DOGLCD_A0            EXP2_04_PIN
432
+      //#define LCD_SCREEN_ROT_180
433
+
434
+      //#define BEEPER_PIN                    33
435
+      //#define STAT_LED_RED_PIN              32
436
+      //#define STAT_LED_BLUE_PIN    EXP1_08_PIN
437
+
438
+      //#define BTN_EN1                       22
439
+      //#define BTN_EN2                        7
440
+      //#define BTN_ENC              EXP1_03_PIN
441
+
442
+      //#define SD_DETECT_PIN                 -1  // Pin 49 for display SD interface, 72 for easy adapter board
443
+      //#define KILL_PIN                      31
444
+
445
+    #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
446
+
447
+      // TO TEST
448
+      //#define DOGLCD_CS                     29
449
+      //#define DOGLCD_A0                     27
450
+
451
+      //#define BEEPER_PIN                    23
452
+      //#define LCD_BACKLIGHT_PIN             33
453
+
454
+      //#define BTN_EN1              EXP1_08_PIN
455
+      //#define BTN_EN2              EXP1_05_PIN
456
+      //#define BTN_ENC                       31
457
+
458
+      //#define LCD_SDSS                    SDSS
459
+      //#define SD_DETECT_PIN        EXP2_01_PIN
460
+      //#define KILL_PIN             EXP1_10_PIN
461
+
462
+    #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864)
463
+
464
+      // TO TEST
465
+      //#define BEEPER_PIN           EXP1_05_PIN
466
+      //#define BTN_ENC              EXP1_08_PIN
467
+      //#define SD_DETECT_PIN        EXP2_01_PIN
468
+
469
+      //#ifndef KILL_PIN
470
+      //  #define KILL_PIN           EXP1_10_PIN
471
+      //#endif
472
+
473
+      #if ENABLED(MKS_MINI_12864)
474
+
475
+        // TO TEST
476
+        //#define DOGLCD_A0                   27
477
+        //#define DOGLCD_CS                   25
478
+
479
+        // GLCD features
480
+        // Uncomment screen orientation
481
+        //#define LCD_SCREEN_ROT_90
482
+        //#define LCD_SCREEN_ROT_180
483
+        //#define LCD_SCREEN_ROT_270
484
+
485
+        // not connected to a pin
486
+        //#define LCD_BACKLIGHT_PIN           57  // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
487
+
488
+        //#define BTN_EN1                     31
489
+        //#define BTN_EN2                     33
490
+
491
+      #elif ENABLED(FYSETC_MINI_12864)
492
+
493
+        // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
494
+
495
+        // TO TEST
496
+        //#define DOGLCD_A0                   16
497
+        //#define DOGLCD_CS                   17
498
+
499
+        //#define BTN_EN1                     33
500
+        //#define BTN_EN2                     31
501
+
502
+        //#define FORCE_SOFT_SPI                  // Use this if default of hardware SPI causes display problems
503
+                                                  //   results in LCD soft SPI mode 3, SD soft SPI mode 0
504
+
505
+        //#define LCD_RESET_PIN               23  // Must be high or open for LCD to operate normally.
506
+
507
+        #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
508
+          #ifndef RGB_LED_R_PIN
509
+            // TO TEST
510
+            //#define RGB_LED_R_PIN           25
511
+          #endif
512
+          #ifndef RGB_LED_G_PIN
513
+            // TO TEST
514
+            //#define RGB_LED_G_PIN           27
515
+          #endif
516
+          #ifndef RGB_LED_B_PIN
517
+            // TO TEST
518
+            //#define RGB_LED_B_PIN           29
519
+          #endif
520
+        #elif ENABLED(FYSETC_MINI_12864_2_1)
521
+          // TO TEST
522
+          //#define NEOPIXEL_PIN              25
523
+        #endif
524
+
525
+      #endif
526
+
527
+    #elif ENABLED(MINIPANEL)
528
+
529
+      // TO TEST
530
+      //#define BEEPER_PIN           EXP2_06_PIN
531
+      // not connected to a pin
532
+      //#define LCD_BACKLIGHT_PIN             57  // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
533
+
534
+      //#define DOGLCD_A0            EXP2_04_PIN
535
+      //#define DOGLCD_CS                     58  // Mega/Due:66 - AGCM4:58
536
+
537
+      // GLCD features
538
+      // Uncomment screen orientation
539
+      //#define LCD_SCREEN_ROT_90
540
+      //#define LCD_SCREEN_ROT_180
541
+      //#define LCD_SCREEN_ROT_270
542
+
543
+      //#define BTN_EN1              EXP1_09_PIN
544
+      //#define BTN_EN2                       55  // Mega/Due:63 - AGCM4:55
545
+      //#define BTN_ENC                       72  // Mega/Due:59 - AGCM4:72
546
+
547
+      //#define SD_DETECT_PIN        EXP2_01_PIN
548
+      //#define KILL_PIN                      56  // Mega/Due:64 - AGCM4:56
549
+
550
+    #elif ENABLED(ZONESTAR_LCD)
551
+
552
+      // TO TEST
553
+      //#define ADC_KEYPAD_PIN                12
554
+
555
+    #elif ENABLED(AZSMZ_12864)
556
+
557
+      // TO TEST
558
+
559
+    #else
560
+
561
+      // Beeper on AUX-4
562
+      //#define BEEPER_PIN                    33
563
+
564
+      // Buttons are directly attached to AUX-2
565
+      #if IS_RRW_KEYPAD
566
+        // TO TEST
567
+        //#define SHIFT_OUT_PIN      EXP1_09_PIN
568
+        //#define SHIFT_CLK_PIN      EXP2_04_PIN
569
+        //#define SHIFT_LD_PIN       EXP2_06_PIN
570
+        //#define BTN_EN1                     56  // Mega/Due:64 - AGCM4:56
571
+        //#define BTN_EN2                     72  // Mega/Due:59 - AGCM4:72
572
+        //#define BTN_ENC                     55  // Mega/Due:63 - AGCM4:55
573
+      #elif ENABLED(PANEL_ONE)
574
+        // TO TEST
575
+        //#define BTN_EN1                     72  // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72)
576
+        //#define BTN_EN2                     55  // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55)
577
+        //#define BTN_ENC            EXP2_01_PIN  // AUX3 PIN 7
578
+      #else
579
+        // TO TEST
580
+        //#define BTN_EN1            EXP1_05_PIN
581
+        //#define BTN_EN2            EXP1_08_PIN
582
+        //#define BTN_ENC                     31
583
+      #endif
584
+
585
+      #if ENABLED(G3D_PANEL)
586
+        // TO TEST
587
+        //#define SD_DETECT_PIN      EXP2_01_PIN
588
+        //#define KILL_PIN           EXP1_10_PIN
589
+      #endif
590
+
591
+    #endif
592
+  #endif // IS_NEWPANEL
593
+
594
+#endif // HAS_WIRED_LCD
595
+
596
+//
597
+// SD Support
598
+//
599
+
600
+/**
601
+ * Bricolemon has an SD slot, but to change it to your LCD or Custom, set the option to one of the following:
602
+ *
603
+ *           LCD - Use the SD drive in the external LCD controller.
604
+ *       ONBOARD - Use the SD drive on the control board.
605
+ *  CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
606
+ *
607
+ * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
608
+ */
609
+
610
+#ifndef SDCARD_CONNECTION
611
+  #define SDCARD_CONNECTION              ONBOARD
612
+#endif
613
+
614
+#if SD_CONNECTION_IS(ONBOARD)
615
+  #define SDSS                                83
616
+  #undef SD_DETECT_PIN
617
+  #define SD_DETECT_PIN                       95
618
+#else
619
+  #define SDSS                       EXP2_07_PIN
620
+#endif
621
+
622
+#if HAS_TMC_UART
623
+
624
+  /**
625
+   * Address for the UART Configuration of the TMC2209. Override in Configuration files.
626
+   * To test TMC2209 Steppers enable TMC_DEBUG in Configuration_adv.h and test the M122 command with voltage on the steppers.
627
+   */
628
+  #ifndef X_SLAVE_ADDRESS
629
+    #define X_SLAVE_ADDRESS                 0b00
630
+  #endif
631
+  #ifndef Y_SLAVE_ADDRESS
632
+    #define Y_SLAVE_ADDRESS                 0b01
633
+  #endif
634
+  #ifndef Z_SLAVE_ADDRESS
635
+    #define Z_SLAVE_ADDRESS                 0b10
636
+  #endif
637
+  #ifndef E0_SLAVE_ADDRESS
638
+    #define E0_SLAVE_ADDRESS                0b11
639
+  #endif
640
+  #ifndef E1_SLAVE_ADDRESS
641
+    #define E1_SLAVE_ADDRESS                0b00
642
+  #endif
643
+
644
+  /**
645
+   * TMC2208/TMC2209 stepper drivers
646
+   *  It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations.
647
+   *  Steppers 1,2,3,4 (X,Y,Z,E0) are on the Serial1, Sercom (RX = 0, TX = 1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX = 17, TX = 16)
648
+   */
649
+
650
+  //#define X_HARDWARE_SERIAL  Serial1
651
+  //#define Y_HARDWARE_SERIAL  Serial1
652
+  //#define Z_HARDWARE_SERIAL  Serial1
653
+  //#define E0_HARDWARE_SERIAL Serial1
654
+  //#define E1_HARDWARE_SERIAL Serial2
655
+
656
+  #define TMC_BAUD_RATE 250000
657
+
658
+  //
659
+  // Software serial
660
+  //
661
+  #define X_SERIAL_TX_PIN                      0
662
+  #define X_SERIAL_RX_PIN                      1
663
+
664
+  #define Y_SERIAL_TX_PIN        X_SERIAL_TX_PIN
665
+  #define Y_SERIAL_RX_PIN        X_SERIAL_RX_PIN
666
+
667
+  #define Z_SERIAL_TX_PIN        X_SERIAL_TX_PIN
668
+  #define Z_SERIAL_RX_PIN        X_SERIAL_RX_PIN
669
+
670
+  #define E0_SERIAL_TX_PIN       X_SERIAL_TX_PIN
671
+  #define E0_SERIAL_RX_PIN       X_SERIAL_RX_PIN
672
+
673
+  #define E1_SERIAL_TX_PIN                    17
674
+  #define E1_SERIAL_RX_PIN                    16
675
+
676
+#endif

Loading…
Cancel
Save