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_V1_4.h 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #ifndef BOARD_INFO_NAME
  24. #define BOARD_INFO_NAME "BIGTREE SKR 1.4"
  25. #endif
  26. //
  27. // SD Connection
  28. //
  29. #ifndef SDCARD_CONNECTION
  30. #define SDCARD_CONNECTION LCD
  31. #endif
  32. //
  33. // Servos
  34. //
  35. #define SERVO0_PIN P2_00
  36. //
  37. // TMC StallGuard DIAG pins
  38. //
  39. #define X_DIAG_PIN P1_29 // X-STOP
  40. #define Y_DIAG_PIN P1_28 // Y-STOP
  41. #define Z_DIAG_PIN P1_27 // Z-STOP
  42. #define E0_DIAG_PIN P1_26 // E0DET
  43. #define E1_DIAG_PIN P1_25 // E1DET
  44. //
  45. // Limit Switches
  46. //
  47. #if X_STALL_SENSITIVITY
  48. #define X_STOP_PIN X_DIAG_PIN
  49. #if X_HOME_DIR < 0
  50. #define X_MAX_PIN P1_26 // E0DET
  51. #else
  52. #define X_MIN_PIN P1_26 // E0DET
  53. #endif
  54. #else
  55. #define X_STOP_PIN P1_29 // X-STOP
  56. #endif
  57. #if Y_STALL_SENSITIVITY
  58. #define Y_STOP_PIN Y_DIAG_PIN
  59. #if Y_HOME_DIR < 0
  60. #define Y_MAX_PIN P1_25 // E1DET
  61. #else
  62. #define Y_MIN_PIN P1_25 // E1DET
  63. #endif
  64. #else
  65. #define Y_STOP_PIN P1_28 // Y-STOP
  66. #endif
  67. #if Z_STALL_SENSITIVITY
  68. #define Z_STOP_PIN Z_DIAG_PIN
  69. #if Z_HOME_DIR < 0
  70. #define Z_MAX_PIN P1_00 // PWRDET
  71. #else
  72. #define Z_MIN_PIN P1_00 // PWRDET
  73. #endif
  74. #else
  75. #define Z_STOP_PIN P1_27 // Z-STOP
  76. #endif
  77. //
  78. // Z Probe (when not Z_MIN_PIN)
  79. //
  80. #ifndef Z_MIN_PROBE_PIN
  81. #define Z_MIN_PROBE_PIN P0_10
  82. #endif
  83. //
  84. // Filament Runout Sensor
  85. //
  86. #define FIL_RUNOUT_PIN P1_26 // E0DET
  87. #define FIL_RUNOUT2_PIN P1_25 // E1DET
  88. //
  89. // Power Supply Control
  90. //
  91. #ifndef PS_ON_PIN
  92. #define PS_ON_PIN P1_00 // PWRDET
  93. #endif
  94. //
  95. // Power Loss Detection
  96. //
  97. #ifndef POWER_LOSS_PIN
  98. #define POWER_LOSS_PIN P1_00 // PWRDET
  99. #endif
  100. //
  101. // Steppers
  102. //
  103. #define X_STEP_PIN P2_02
  104. #define X_DIR_PIN P2_06
  105. #define X_ENABLE_PIN P2_01
  106. #ifndef X_CS_PIN
  107. #define X_CS_PIN P1_10
  108. #endif
  109. #define Y_STEP_PIN P0_19
  110. #define Y_DIR_PIN P0_20
  111. #define Y_ENABLE_PIN P2_08
  112. #ifndef Y_CS_PIN
  113. #define Y_CS_PIN P1_09
  114. #endif
  115. #define Z_STEP_PIN P0_22
  116. #define Z_DIR_PIN P2_11
  117. #define Z_ENABLE_PIN P0_21
  118. #ifndef Z_CS_PIN
  119. #define Z_CS_PIN P1_08
  120. #endif
  121. #define E0_STEP_PIN P2_13
  122. #define E0_DIR_PIN P0_11
  123. #define E0_ENABLE_PIN P2_12
  124. #ifndef E0_CS_PIN
  125. #define E0_CS_PIN P1_04
  126. #endif
  127. #define E1_STEP_PIN P1_15
  128. #define E1_DIR_PIN P1_14
  129. #define E1_ENABLE_PIN P1_16
  130. #ifndef E1_CS_PIN
  131. #define E1_CS_PIN P1_01
  132. #endif
  133. #define TEMP_1_PIN P0_23_A0 // A2 (T2) - (69) - TEMP_1_PIN
  134. #define TEMP_BED_PIN P0_25_A2 // A0 (T0) - (67) - TEMP_BED_PIN
  135. //
  136. // Include common SKR pins
  137. //
  138. #include "pins_BTT_SKR_common.h"
  139. //
  140. // Software SPI pins for TMC2130 stepper drivers
  141. //
  142. #if ENABLED(TMC_USE_SW_SPI)
  143. #ifndef TMC_SW_MOSI
  144. #define TMC_SW_MOSI P1_17
  145. #endif
  146. #ifndef TMC_SW_MISO
  147. #define TMC_SW_MISO P0_05
  148. #endif
  149. #ifndef TMC_SW_SCK
  150. #define TMC_SW_SCK P0_04
  151. #endif
  152. #endif
  153. #if HAS_TMC220x
  154. /**
  155. * TMC2208/TMC2209 stepper drivers
  156. *
  157. * Hardware serial communication ports.
  158. * If undefined software serial is used according to the pins below
  159. */
  160. //#define X_HARDWARE_SERIAL Serial
  161. //#define X2_HARDWARE_SERIAL Serial1
  162. //#define Y_HARDWARE_SERIAL Serial1
  163. //#define Y2_HARDWARE_SERIAL Serial1
  164. //#define Z_HARDWARE_SERIAL Serial1
  165. //#define Z2_HARDWARE_SERIAL Serial1
  166. //#define E0_HARDWARE_SERIAL Serial1
  167. //#define E1_HARDWARE_SERIAL Serial1
  168. //#define E2_HARDWARE_SERIAL Serial1
  169. //#define E3_HARDWARE_SERIAL Serial1
  170. //#define E4_HARDWARE_SERIAL Serial1
  171. //
  172. // Software serial
  173. //
  174. #define X_SERIAL_TX_PIN P1_10
  175. #define X_SERIAL_RX_PIN P1_10
  176. #define Y_SERIAL_TX_PIN P1_09
  177. #define Y_SERIAL_RX_PIN P1_09
  178. #define Z_SERIAL_TX_PIN P1_08
  179. #define Z_SERIAL_RX_PIN P1_08
  180. #define E0_SERIAL_TX_PIN P1_04
  181. #define E0_SERIAL_RX_PIN P1_04
  182. #define E1_SERIAL_TX_PIN P1_01
  183. #define E1_SERIAL_RX_PIN P1_01
  184. #define Z2_SERIAL_TX_PIN P1_01
  185. #define Z2_SERIAL_RX_PIN P1_01
  186. // Reduce baud rate to improve software serial reliability
  187. #define TMC_BAUD_RATE 19200
  188. #endif
  189. //
  190. // SD Connection
  191. //
  192. #if SD_CONNECTION_IS(LCD)
  193. #define SS_PIN P0_16
  194. #endif
  195. /**
  196. * _____ _____
  197. * NC | · · | GND 5V | · · | GND
  198. * RESET | · · | 1.31(SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
  199. * (MOSI)0.18 | · · | 3.25(BTN_EN2) (LCD_D5) 1.21 | · · | 1.20 (LCD_D4)
  200. * (SD_SS)0.16 | · · | 3.26(BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
  201. * (SCK)0.15 | · · | 0.17(MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
  202. * ----- -----
  203. * EXP2 EXP1
  204. */
  205. #if HAS_SPI_LCD
  206. #if ENABLED(ANET_FULL_GRAPHICS_LCD)
  207. #define LCD_PINS_RS P1_23
  208. #define BTN_EN1 P1_20
  209. #define BTN_EN2 P1_22
  210. #define BTN_ENC P1_18
  211. #define LCD_PINS_ENABLE P1_21
  212. #define LCD_PINS_D4 P1_19
  213. #elif ENABLED(CR10_STOCKDISPLAY)
  214. #define BTN_ENC P0_28 // (58) open-drain
  215. #define LCD_PINS_RS P1_22
  216. #define BTN_EN1 P1_18
  217. #define BTN_EN2 P1_20
  218. #define LCD_PINS_ENABLE P1_23
  219. #define LCD_PINS_D4 P1_21
  220. #else
  221. #define BTN_ENC P0_28 // (58) open-drain
  222. #define LCD_PINS_RS P1_19
  223. #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
  224. #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
  225. #define LCD_PINS_ENABLE P1_18
  226. #define LCD_PINS_D4 P1_20
  227. #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
  228. #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
  229. #if ENABLED(FYSETC_MINI_12864)
  230. #define DOGLCD_CS P1_18
  231. #define DOGLCD_A0 P1_19
  232. #define DOGLCD_SCK P0_15
  233. #define DOGLCD_MOSI P0_18
  234. #define LCD_BACKLIGHT_PIN -1
  235. #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
  236. // results in LCD soft SPI mode 3, SD soft SPI mode 0
  237. #define LCD_RESET_PIN P1_20 // Must be high or open for LCD to operate normally.
  238. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  239. #ifndef RGB_LED_R_PIN
  240. #define RGB_LED_R_PIN P1_21
  241. #endif
  242. #ifndef RGB_LED_G_PIN
  243. #define RGB_LED_G_PIN P1_22
  244. #endif
  245. #ifndef RGB_LED_B_PIN
  246. #define RGB_LED_B_PIN P1_23
  247. #endif
  248. #elif ENABLED(FYSETC_MINI_12864_2_1)
  249. #define NEOPIXEL_PIN P1_21
  250. #endif
  251. #else // !FYSETC_MINI_12864
  252. #if ENABLED(MKS_MINI_12864)
  253. #define DOGLCD_CS P1_21
  254. #define DOGLCD_A0 P1_22
  255. #define DOGLCD_SCK P0_15
  256. #define DOGLCD_MOSI P0_18
  257. #define FORCE_SOFT_SPI
  258. #endif
  259. #if ENABLED(ULTIPANEL)
  260. #define LCD_PINS_D5 P1_21
  261. #define LCD_PINS_D6 P1_22
  262. #define LCD_PINS_D7 P1_23
  263. #endif
  264. #endif // !FYSETC_MINI_12864
  265. #endif
  266. #endif // HAS_SPI_LCD
  267. //
  268. // Neopixel LED
  269. //
  270. #ifndef NEOPIXEL_PIN
  271. #define NEOPIXEL_PIN P1_24
  272. #endif
  273. /**
  274. * Special pins
  275. * P1_30 (37) (NOT 5V tolerant)
  276. * P1_31 (49) (NOT 5V tolerant)
  277. * P0_27 (57) (Open collector)
  278. * P0_28 (58) (Open collector)
  279. */