My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pins_BTT_SKR_E3_TURBO.h 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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. #ifndef BOARD_INFO_NAME
  24. #define BOARD_INFO_NAME "BTT SKR E3 Turbo"
  25. #endif
  26. // Onboard I2C EEPROM
  27. #define I2C_EEPROM
  28. #define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32)
  29. //
  30. // Servos
  31. //
  32. #define SERVO0_PIN P1_23
  33. //
  34. // TMC StallGuard DIAG pins
  35. //
  36. #define X_DIAG_PIN P1_29 // X-STOP
  37. #define Y_DIAG_PIN P1_28 // Y-STOP
  38. #define Z_DIAG_PIN P1_27 // Z-STOP
  39. #define E0_DIAG_PIN P1_26 // E0DET
  40. #define E1_DIAG_PIN P1_25 // E1DET
  41. //
  42. // Limit Switches
  43. #define X_STOP_PIN X_DIAG_PIN
  44. #define Y_STOP_PIN Y_DIAG_PIN
  45. #define Z_STOP_PIN Z_DIAG_PIN
  46. //
  47. // Z Probe
  48. //
  49. #ifndef Z_MIN_PROBE_PIN
  50. #define Z_MIN_PROBE_PIN P1_22
  51. #endif
  52. //
  53. // Filament Runout Sensor
  54. //
  55. #define FIL_RUNOUT_PIN P1_26 // E0DET
  56. #define FIL_RUNOUT2_PIN P1_25 // E1DET
  57. //
  58. // Power Supply Control
  59. //
  60. #ifndef PS_ON_PIN
  61. #define PS_ON_PIN P1_21
  62. #endif
  63. // LED driving pin
  64. #define NEOPIXEL_PIN P1_24
  65. //
  66. // Power Loss Detection
  67. //
  68. #ifndef POWER_LOSS_PIN
  69. #define POWER_LOSS_PIN P1_20 // PWRDET
  70. #endif
  71. //
  72. // Steppers
  73. //
  74. #define X_STEP_PIN P1_04
  75. #define X_DIR_PIN P1_08
  76. #define X_ENABLE_PIN P1_00
  77. #ifndef X_CS_PIN
  78. #define X_CS_PIN P1_01
  79. #endif
  80. #define Y_STEP_PIN P1_14
  81. #define Y_DIR_PIN P1_15
  82. #define Y_ENABLE_PIN P1_09
  83. #ifndef Y_CS_PIN
  84. #define Y_CS_PIN P1_10
  85. #endif
  86. #define Z_STEP_PIN P4_29
  87. #define Z_DIR_PIN P4_28
  88. #define Z_ENABLE_PIN P1_16
  89. #ifndef Z_CS_PIN
  90. #define Z_CS_PIN P1_17
  91. #endif
  92. #define E0_STEP_PIN P2_06
  93. #define E0_DIR_PIN P2_07
  94. #define E0_ENABLE_PIN P0_04
  95. #ifndef E0_CS_PIN
  96. #define E0_CS_PIN P0_05
  97. #endif
  98. #define E1_STEP_PIN P2_11
  99. #define E1_DIR_PIN P2_12
  100. #define E1_ENABLE_PIN P0_21
  101. #ifndef E1_CS_PIN
  102. #define E1_CS_PIN P0_22
  103. #endif
  104. #if HAS_TMC_UART
  105. /**
  106. * TMC2208/TMC2209 stepper drivers
  107. *
  108. * Hardware serial communication ports.
  109. * If undefined software serial is used according to the pins below
  110. */
  111. //
  112. // Software serial
  113. //
  114. #define X_SERIAL_TX_PIN P1_01
  115. #define X_SERIAL_RX_PIN P1_01
  116. #define Y_SERIAL_TX_PIN P1_10
  117. #define Y_SERIAL_RX_PIN P1_10
  118. #define Z_SERIAL_TX_PIN P1_17
  119. #define Z_SERIAL_RX_PIN P1_17
  120. #define E0_SERIAL_TX_PIN P0_05
  121. #define E0_SERIAL_RX_PIN P0_05
  122. #define E1_SERIAL_TX_PIN P0_22
  123. #define E1_SERIAL_RX_PIN P0_22
  124. // Reduce baud rate to improve software serial reliability
  125. #define TMC_BAUD_RATE 19200
  126. #endif
  127. //
  128. // TMC Low Power Standby pins
  129. //
  130. #define X_STDBY_PIN P3_26
  131. #define Y_STDBY_PIN P3_25
  132. #define Z_STDBY_PIN P1_18
  133. #define E0_STDBY_PIN P1_19
  134. #define E1_STDBY_PIN P2_13
  135. //
  136. // Temperature Sensors
  137. //
  138. #define TEMP_0_PIN P0_24
  139. #define TEMP_1_PIN P0_23
  140. //#define TEMP_2_PIN P1_30 // Onboard thermistor
  141. #define TEMP_BED_PIN P0_25
  142. //
  143. // Heaters / Fans
  144. //
  145. #define HEATER_0_PIN P2_03 // EXTRUDER 0
  146. #define HEATER_1_PIN P2_04 // EXTRUDER 1
  147. #define HEATER_BED_PIN P2_05 // BED
  148. #define FAN_PIN P2_01
  149. #define FAN1_PIN P2_02
  150. /**
  151. * _____
  152. * 5V | 1 2 | GND
  153. * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS)
  154. * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2)
  155. * RESET | 7 8 | P0_19 (BTN_EN1)
  156. * (BTN_ENC) P0_16 | 9 10| P2_08 (BEEPER)
  157. * -----
  158. * EXP
  159. */
  160. #define EXPA1_03_PIN P0_18
  161. #define EXPA1_04_PIN P0_17
  162. #define EXPA1_05_PIN P0_15
  163. #define EXPA1_06_PIN P0_20
  164. #define EXPA1_07_PIN -1
  165. #define EXPA1_08_PIN P0_19
  166. #define EXPA1_09_PIN P0_16
  167. #define EXPA1_10_PIN P2_08
  168. #if HAS_WIRED_LCD
  169. #if ENABLED(CR10_STOCKDISPLAY)
  170. #define BEEPER_PIN EXPA1_10_PIN
  171. #define BTN_EN1 EXPA1_08_PIN
  172. #define BTN_EN2 EXPA1_06_PIN
  173. #define BTN_ENC EXPA1_09_PIN
  174. #define LCD_PINS_RS EXPA1_04_PIN
  175. #define LCD_PINS_ENABLE EXPA1_03_PIN
  176. #define LCD_PINS_D4 EXPA1_05_PIN
  177. #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
  178. #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_E3_TURBO.h' for details. Comment out this line to continue."
  179. #define LCD_PINS_RS EXPA1_05_PIN
  180. #define LCD_PINS_ENABLE EXPA1_09_PIN
  181. #define LCD_PINS_D4 EXPA1_04_PIN
  182. #define LCD_PINS_D5 EXPA1_06_PIN
  183. #define LCD_PINS_D6 EXPA1_08_PIN
  184. #define LCD_PINS_D7 EXPA1_10_PIN
  185. #define ADC_KEYPAD_PIN P1_23 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
  186. #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
  187. #define BTN_EN1 EXPA1_08_PIN
  188. #define BTN_EN2 EXPA1_06_PIN
  189. #define BTN_ENC EXPA1_09_PIN
  190. #define DOGLCD_CS EXPA1_04_PIN
  191. #define DOGLCD_A0 EXPA1_05_PIN
  192. #define DOGLCD_SCK EXPA1_10_PIN
  193. #define DOGLCD_MOSI EXPA1_03_PIN
  194. #define FORCE_SOFT_SPI
  195. #define LCD_BACKLIGHT_PIN -1
  196. #else
  197. #error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_SKR_E3_TURBO."
  198. #endif
  199. #endif // HAS_WIRED_LCD
  200. //
  201. // SD Support
  202. //
  203. #ifndef SDCARD_CONNECTION
  204. #define SDCARD_CONNECTION ONBOARD
  205. #endif
  206. #if SD_CONNECTION_IS(ONBOARD)
  207. #define SD_DETECT_PIN P2_00
  208. #define SCK_PIN P0_07
  209. #define MISO_PIN P0_08
  210. #define MOSI_PIN P0_09
  211. #define SS_PIN P0_06
  212. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  213. #error "SD CUSTOM_CABLE is not compatible with SKR E3 Turbo."
  214. #endif
  215. #define ON_BOARD_SPI_DEVICE 1 // SPI1