|
@@ -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
|