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_BIGTREE_SKR_V1.3.h 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2019 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. #ifndef TARGET_LPC1768
  23. #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
  24. #endif
  25. #ifndef BOARD_NAME
  26. #define BOARD_NAME "BIGTREE SKR V1.3"
  27. #endif
  28. // Ignore temp readings during develpment.
  29. //#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  30. //
  31. // Servos
  32. //
  33. #define SERVO0_PIN P2_00
  34. //
  35. // Limit Switches
  36. //
  37. #define X_MIN_PIN P1_29
  38. #define X_MAX_PIN P1_28
  39. #define Y_MIN_PIN P1_27
  40. #define Y_MAX_PIN P1_26
  41. #define Z_MIN_PIN P1_25
  42. #define Z_MAX_PIN P1_24
  43. //
  44. // Z Probe (when not Z_MIN_PIN)
  45. //
  46. #ifndef Z_MIN_PROBE_PIN
  47. #define Z_MIN_PROBE_PIN P1_24
  48. #endif
  49. //
  50. // Filament Runout Sensor
  51. //
  52. #ifndef FIL_RUNOUT_PIN
  53. #define FIL_RUNOUT_PIN P1_28
  54. #endif
  55. //
  56. // Steppers
  57. //
  58. #define X_STEP_PIN P2_02
  59. #define X_DIR_PIN P2_06
  60. #define X_ENABLE_PIN P2_01
  61. #ifndef X_CS_PIN
  62. #define X_CS_PIN P1_17
  63. #endif
  64. #define Y_STEP_PIN P0_19
  65. #define Y_DIR_PIN P0_20
  66. #define Y_ENABLE_PIN P2_08
  67. #ifndef Y_CS_PIN
  68. #define Y_CS_PIN P1_15
  69. #endif
  70. #define Z_STEP_PIN P0_22
  71. #define Z_DIR_PIN P2_11
  72. #define Z_ENABLE_PIN P0_21
  73. #ifndef Z_CS_PIN
  74. #define Z_CS_PIN P1_10
  75. #endif
  76. #define E0_STEP_PIN P2_13
  77. #define E0_DIR_PIN P0_11
  78. #define E0_ENABLE_PIN P2_12
  79. #ifndef E0_CS_PIN
  80. #define E0_CS_PIN P1_08
  81. #endif
  82. #define E1_STEP_PIN P0_01
  83. #define E1_DIR_PIN P0_00
  84. #define E1_ENABLE_PIN P0_10
  85. #ifndef E1_CS_PIN
  86. #define E1_CS_PIN P1_01
  87. #endif
  88. //
  89. // Software SPI pins for TMC2130 stepper drivers
  90. //
  91. #if ENABLED(TMC_USE_SW_SPI)
  92. #define TMC_SW_MOSI P4_28
  93. #define TMC_SW_MISO P0_05
  94. #define TMC_SW_SCK P0_04
  95. #endif
  96. #if HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2209)
  97. /**
  98. * TMC2208/TMC2209 stepper drivers
  99. *
  100. * Hardware serial communication ports.
  101. * If undefined software serial is used according to the pins below
  102. */
  103. //#define X_HARDWARE_SERIAL Serial
  104. //#define X2_HARDWARE_SERIAL Serial1
  105. //#define Y_HARDWARE_SERIAL Serial1
  106. //#define Y2_HARDWARE_SERIAL Serial1
  107. //#define Z_HARDWARE_SERIAL Serial1
  108. //#define Z2_HARDWARE_SERIAL Serial1
  109. //#define E0_HARDWARE_SERIAL Serial1
  110. //#define E1_HARDWARE_SERIAL Serial1
  111. //#define E2_HARDWARE_SERIAL Serial1
  112. //#define E3_HARDWARE_SERIAL Serial1
  113. //#define E4_HARDWARE_SERIAL Serial1
  114. //
  115. // Software serial
  116. //
  117. #define X_SERIAL_TX_PIN P4_29
  118. #define X_SERIAL_RX_PIN P1_17
  119. #define Y_SERIAL_TX_PIN P1_16
  120. #define Y_SERIAL_RX_PIN P1_15
  121. #define Z_SERIAL_TX_PIN P1_14
  122. #define Z_SERIAL_RX_PIN P1_10
  123. #define E0_SERIAL_TX_PIN P1_09
  124. #define E0_SERIAL_RX_PIN P1_08
  125. #define E1_SERIAL_TX_PIN P1_04
  126. #define E1_SERIAL_RX_PIN P1_01
  127. #define Z2_SERIAL_TX_PIN P1_04
  128. #define Z2_SERIAL_RX_PIN P1_01
  129. #endif
  130. //
  131. // Temperature Sensors
  132. // 3.3V max when defined as an analog input
  133. //
  134. #define TEMP_BED_PIN 0 // A0 (T0) - (67) - TEMP_BED_PIN
  135. #define TEMP_0_PIN 1 // A1 (T1) - (68) - TEMP_0_PIN
  136. #define TEMP_1_PIN 2 // A2 (T2) - (69) - TEMP_1_PIN
  137. //
  138. // Heaters / Fans
  139. //
  140. #define HEATER_0_PIN P2_07
  141. #if HOTENDS == 1
  142. #define FAN1_PIN P2_04
  143. #else
  144. #define HEATER_1_PIN P2_04
  145. #endif
  146. #define FAN_PIN P2_03
  147. #define HEATER_BED_PIN P2_05
  148. /*
  149. | _____ _____
  150. | NC | · · | GND 5V | · · | GND
  151. | RESET | · · | 1.31(SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
  152. | (MOSI)0.18 | · · | 3.25(BTN_EN2) (LCD_D5) 1.21 | · · | 1.20 (LCD_D4)
  153. | (SD_SS)0.16 | · · | 3.26(BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
  154. | (SCK)0.15 | · · | 0.17(MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
  155. |  ̄ ̄  ̄ ̄
  156. | EXP2 EXP1
  157. */
  158. #if HAS_SPI_LCD
  159. #define BEEPER_PIN P1_30 // (37) not 5V tolerant
  160. #define BTN_ENC P0_28 // (58) open-drain
  161. #if ENABLED(CR10_STOCKDISPLAY)
  162. #define LCD_PINS_RS P1_22
  163. #define BTN_EN1 P1_18
  164. #define BTN_EN2 P1_20
  165. #define LCD_PINS_ENABLE P1_23
  166. #define LCD_PINS_D4 P1_21
  167. #else
  168. #define LCD_PINS_RS P1_19
  169. #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
  170. #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
  171. #define LCD_PINS_ENABLE P1_18
  172. #define LCD_PINS_D4 P1_20
  173. #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
  174. #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
  175. #if ENABLED(FYSETC_MINI_12864)
  176. #define DOGLCD_CS P1_18
  177. #define DOGLCD_A0 P1_19
  178. #define DOGLCD_SCK P0_15
  179. #define DOGLCD_MOSI P0_18
  180. #define FORCE_SOFT_SPI
  181. #define LCD_BACKLIGHT_PIN -1
  182. #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
  183. // results in LCD soft SPI mode 3, SD soft SPI mode 0
  184. #define LCD_RESET_PIN P1_20 // Must be high or open for LCD to operate normally.
  185. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  186. #ifndef RGB_LED_R_PIN
  187. #define RGB_LED_R_PIN P1_21
  188. #endif
  189. #ifndef RGB_LED_G_PIN
  190. #define RGB_LED_G_PIN P1_22
  191. #endif
  192. #ifndef RGB_LED_B_PIN
  193. #define RGB_LED_B_PIN P1_23
  194. #endif
  195. #elif ENABLED(FYSETC_MINI_12864_2_1)
  196. #define NEOPIXEL_PIN P1_21
  197. #endif
  198. #else // !FYSETC_MINI_12864
  199. #if ENABLED(MKS_MINI_12864)
  200. #define DOGLCD_CS P1_21
  201. #define DOGLCD_A0 P1_22
  202. #endif
  203. #if ENABLED(ULTIPANEL)
  204. #define LCD_PINS_D5 P1_21
  205. #define LCD_PINS_D6 P1_22
  206. #define LCD_PINS_D7 P1_23
  207. #endif
  208. #endif // !FYSETC_MINI_12864
  209. #endif
  210. #endif // HAS_SPI_LCD
  211. //
  212. // SD Support
  213. //
  214. #ifndef SDCARD_CONNECTION
  215. #define SDCARD_CONNECTION LCD
  216. #endif
  217. #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
  218. #if SD_CONNECTION_IS(LCD)
  219. #define SCK_PIN P0_15
  220. #define MISO_PIN P0_17
  221. #define MOSI_PIN P0_18
  222. #define SS_PIN P0_16
  223. #elif SD_CONNECTION_IS(ONBOARD)
  224. #undef SD_DETECT_PIN
  225. #define SD_DETECT_PIN P0_27
  226. #define SCK_PIN P0_07
  227. #define MISO_PIN P0_08
  228. #define MOSI_PIN P0_09
  229. #define SS_PIN ONBOARD_SD_CS_PIN
  230. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  231. #error "No custom SD drive cable defined for this board."
  232. #endif
  233. /**
  234. * Special pins
  235. * P1_30 (37) (NOT 5V tolerant)
  236. * P1_31 (49) (NOT 5V tolerant)
  237. * P0_27 (57) (Open collector)
  238. * P0_28 (58) (Open collector)
  239. */