My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins_BRICOLEMON_V1_0.h 22KB

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