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_BTT_SKR_E3_TURBO.h 9.3KB

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