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.0KB

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