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_LITE_V1_0.h 20KB

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