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_GTR_V1_0.h 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  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. #pragma once
  23. #ifndef TARGET_STM32F4
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 8 || E_STEPPERS > 8
  26. #error "BIGTREE GTR V1.0 supports up to 8 hotends / E-steppers."
  27. #elif HOTENDS > MAX_EXTRUDERS || E_STEPPERS > MAX_EXTRUDERS
  28. #error "Marlin extruder/hotends limit! Increase MAX_EXTRUDERS to continue."
  29. #endif
  30. #define BOARD_INFO_NAME "BIGTREE GTR 1.0"
  31. // Use one of these or SDCard-based Emulation will be used
  32. //#define I2C_EEPROM
  33. //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
  34. //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
  35. #define TP // Enable to define servo and probe pins
  36. //
  37. // Servos
  38. //
  39. #if ENABLED(TP)
  40. #define SERVO0_PIN PB11
  41. #endif
  42. #define PS_ON_PIN PH6
  43. //
  44. // Limit Switches
  45. //
  46. #define X_MIN_PIN PF2
  47. #define X_MAX_PIN PG14
  48. #define Y_MIN_PIN PC13
  49. #define Y_MAX_PIN PG9
  50. #define Z_MIN_PIN PE0
  51. #define Z_MAX_PIN PD3
  52. //
  53. // Pins on the extender
  54. //
  55. //#define X_MIN_PIN PI4
  56. //#define X2_MIN_PIN PF12
  57. //#define Y_MIN_PIN PF4
  58. //#define Y2_MIN_PIN PI7
  59. //#define Z_MIN_PIN PF6
  60. #if ENABLED(TP) && !defined(Z_MIN_PROBE_PIN)
  61. #define Z_MIN_PROBE_PIN PH11 // Z Probe must be PH11
  62. #endif
  63. //
  64. // Steppers
  65. //
  66. #define X_STEP_PIN PC15
  67. #define X_DIR_PIN PF0
  68. #define X_ENABLE_PIN PF1
  69. #ifndef X_CS_PIN
  70. #define X_CS_PIN PC14
  71. #endif
  72. #define Y_STEP_PIN PE3
  73. #define Y_DIR_PIN PE2
  74. #define Y_ENABLE_PIN PE4
  75. #ifndef Y_CS_PIN
  76. #define Y_CS_PIN PE1
  77. #endif
  78. #define Z_STEP_PIN PB8
  79. #define Z_DIR_PIN PB7 // PB7
  80. #define Z_ENABLE_PIN PB9
  81. #ifndef Z_CS_PIN
  82. #define Z_CS_PIN PB5
  83. #endif
  84. #define E0_STEP_PIN PG12
  85. #define E0_DIR_PIN PG11
  86. #define E0_ENABLE_PIN PG13
  87. #ifndef E0_CS_PIN
  88. #define E0_CS_PIN PG10
  89. #endif
  90. #define E1_STEP_PIN PD6
  91. #define E1_DIR_PIN PD5
  92. #define E1_ENABLE_PIN PD7
  93. #ifndef E1_CS_PIN
  94. #define E1_CS_PIN PD4
  95. #endif
  96. #define E2_STEP_PIN PD1
  97. #define E2_DIR_PIN PD0
  98. #define E2_ENABLE_PIN PD2
  99. #ifndef E2_CS_PIN
  100. #define E2_CS_PIN PC12
  101. #endif
  102. #define E3_STEP_PIN PF3
  103. #define E3_DIR_PIN PG3
  104. #define E3_ENABLE_PIN PF8
  105. #ifndef E3_CS_PIN
  106. #define E3_CS_PIN PG4
  107. #endif
  108. #define E4_STEP_PIN PD14
  109. #define E4_DIR_PIN PD11
  110. #define E4_ENABLE_PIN PG2
  111. #ifndef E4_CS_PIN
  112. #define E4_CS_PIN PE15
  113. #endif
  114. #define E5_STEP_PIN PE12
  115. #define E5_DIR_PIN PE10
  116. #define E5_ENABLE_PIN PF14
  117. #ifndef E5_CS_PIN
  118. #define E5_CS_PIN PE7
  119. #endif
  120. #define E6_STEP_PIN PG0
  121. #define E6_DIR_PIN PG1
  122. #define E6_ENABLE_PIN PE8
  123. #ifndef E6_CS_PIN
  124. #define E6_CS_PIN PF15
  125. #endif
  126. #define E7_STEP_PIN PH12
  127. #define E7_DIR_PIN PH15
  128. #define E7_ENABLE_PIN PI0
  129. #ifndef E7_CS_PIN
  130. #define E7_CS_PIN PH14
  131. #endif
  132. //
  133. // Software SPI pins for TMC2130 stepper drivers
  134. //
  135. #if ENABLED(TMC_USE_SW_SPI)
  136. #ifndef TMC_SW_MOSI
  137. #define TMC_SW_MOSI PG15
  138. #endif
  139. #ifndef TMC_SW_MISO
  140. #define TMC_SW_MISO PB6
  141. #endif
  142. #ifndef TMC_SW_SCK
  143. #define TMC_SW_SCK PB3
  144. #endif
  145. #endif
  146. #if HAS_TMC220x
  147. /**
  148. * TMC2208/TMC2209 stepper drivers
  149. *
  150. * Hardware serial communication ports.
  151. * If undefined software serial is used according to the pins below
  152. */
  153. //#define X_HARDWARE_SERIAL Serial
  154. //#define X2_HARDWARE_SERIAL Serial1
  155. //#define Y_HARDWARE_SERIAL Serial1
  156. //#define Y2_HARDWARE_SERIAL Serial1
  157. //#define Z_HARDWARE_SERIAL Serial1
  158. //#define Z2_HARDWARE_SERIAL Serial1
  159. //#define E0_HARDWARE_SERIAL Serial1
  160. //#define E1_HARDWARE_SERIAL Serial1
  161. //#define E2_HARDWARE_SERIAL Serial1
  162. //#define E3_HARDWARE_SERIAL Serial1
  163. //#define E4_HARDWARE_SERIAL Serial1
  164. //#define E5_HARDWARE_SERIAL Serial1
  165. //#define E6_HARDWARE_SERIAL Serial1
  166. //#define E7_HARDWARE_SERIAL Serial1
  167. //
  168. // Software serial
  169. //
  170. #define X_SERIAL_TX_PIN PC14
  171. #define X_SERIAL_RX_PIN PC14
  172. #define Y_SERIAL_TX_PIN PE1
  173. #define Y_SERIAL_RX_PIN PE1
  174. #define Z_SERIAL_TX_PIN PB5
  175. #define Z_SERIAL_RX_PIN PB5
  176. #define E0_SERIAL_TX_PIN PG10
  177. #define E0_SERIAL_RX_PIN PG10
  178. #define E1_SERIAL_TX_PIN PD4
  179. #define E1_SERIAL_RX_PIN PD4
  180. #define E2_SERIAL_TX_PIN PC12
  181. #define E2_SERIAL_RX_PIN PC12
  182. #define E3_SERIAL_TX_PIN PG4
  183. #define E3_SERIAL_RX_PIN PG4
  184. #define E4_SERIAL_TX_PIN PE15
  185. #define E4_SERIAL_RX_PIN PE15
  186. #define E5_SERIAL_TX_PIN PE7
  187. #define E5_SERIAL_RX_PIN PE7
  188. #define E6_SERIAL_TX_PIN PF15
  189. #define E6_SERIAL_RX_PIN PF15
  190. #define E7_SERIAL_TX_PIN PH14
  191. #define E7_SERIAL_RX_PIN PH14
  192. // Reduce baud rate to improve software serial reliability
  193. #define TMC_BAUD_RATE 19200
  194. #endif
  195. //
  196. // Temperature Sensors
  197. //
  198. #define TEMP_0_PIN PC1 // T1 <-> E0
  199. #define TEMP_1_PIN PC2 // T2 <-> E1
  200. #define TEMP_2_PIN PC3 // T3 <-> E2
  201. #define TEMP_3_PIN PA3 // T4 <-> E3
  202. #define TEMP_4_PIN PF9 // T5 <-> E4
  203. #define TEMP_5_PIN PF10 // T6 <-> E5
  204. //#define TEMP_6_PIN PF7 // T7 <-> E6
  205. //#define TEMP_7_PIN PF5 // T8 <-> E7
  206. #define TEMP_BED_PIN PC0 // T0 <-> Bed
  207. // SPI for Max6675 or Max31855 Thermocouple
  208. // Uses a separate SPI bus
  209. // If you have a two-way thermocouple, you can customize two THERMO_CSx_PIN pins (x:1~2)
  210. #define THERMO_SCK_PIN PI1 // SCK
  211. #define THERMO_DO_PIN PI2 // MISO
  212. #define THERMO_CS1_PIN PH9 // CS1
  213. #define THERMO_CS2_PIN PH2 // CS2
  214. #define MAX6675_SS_PIN THERMO_CS1_PIN
  215. #define MAX6675_SS2_PIN THERMO_CS2_PIN
  216. #define MAX6675_SCK_PIN THERMO_SCK_PIN
  217. #define MAX6675_DO_PIN THERMO_DO_PIN
  218. //
  219. // Heaters / Fans
  220. //
  221. #define HEATER_0_PIN PB1 // Heater0
  222. #define HEATER_1_PIN PA1 // Heater1
  223. #define HEATER_2_PIN PB0 // Heater2
  224. #define HEATER_3_PIN PD15 // Heater3
  225. #define HEATER_4_PIN PD13 // Heater4
  226. #define HEATER_5_PIN PD12 // Heater5
  227. //#define HEATER_6_PIN PE13 // Heater6
  228. //#define HEATER_7_PIN PI6 // Heater7
  229. #define HEATER_BED_PIN PA2 // Hotbed
  230. #define FAN_PIN PE5 // Fan0
  231. #define FAN1_PIN PE6 // Fan1
  232. #define FAN2_PIN PC8 // Fan2
  233. #define FAN3_PIN PI5 // Fan3
  234. #define FAN4_PIN PE9 // Fan4
  235. #define FAN5_PIN PE11 // Fan5
  236. //#define FAN6_PIN PC9 // Fan6
  237. //#define FAN7_PIN PE14 // Fan7
  238. //
  239. // By default the onboard SD (SPI1) is enabled
  240. //
  241. #define CUSTOM_SPI_PINS
  242. #if DISABLED(CUSTOM_SPI_PINS)
  243. #define SDSS PB12
  244. #endif
  245. // HAL SPI1 pins group
  246. #if ENABLED(CUSTOM_SPI_PINS)
  247. #define SDSS PA4
  248. #define SD_DETECT_PIN PC4
  249. #define LCD_SDSS PA4
  250. #define SCK_PIN PA5
  251. #define MISO_PIN PA6
  252. #define MOSI_PIN PA7
  253. #define SS_PIN PA4 // Chip select for SD card used by Marlin
  254. #endif
  255. /**
  256. * _____ _____
  257. * NC | · · | GND 5V | · · | GND
  258. * RESET | · · | PB10(SD_DETECT) (LCD_D7) PG5 | · · | PG6 (LCD_D6)
  259. * (MOSI)PB15 | · · | PH10(BTN_EN2) (LCD_D5) PG7 | · · | PG8 (LCD_D4)
  260. * (SD_SS)PB12 | · · | PD10(BTN_EN1) (LCD_RS) PA8 | · · | PC10 (LCD_EN)
  261. * (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA15 | · · | PC11 (BEEPER)
  262. *  ̄ ̄  ̄ ̄
  263. * EXP2 EXP1
  264. */
  265. //
  266. // LCDs and Controllers
  267. //
  268. #if HAS_SPI_LCD
  269. #define BEEPER_PIN PC11
  270. #define BTN_ENC PA15
  271. #if ENABLED(CR10_STOCKDISPLAY)
  272. #define LCD_PINS_RS PA8
  273. #define BTN_EN1 PD10
  274. #define BTN_EN2 PH10
  275. #define LCD_PINS_ENABLE PG7
  276. #define LCD_PINS_D4 PG8
  277. //#undef ST7920_DELAY_1
  278. //#undef ST7920_DELAY_2
  279. //#undef ST7920_DELAY_3
  280. #else
  281. #define LCD_PINS_RS PA8
  282. #define BTN_EN1 PD10
  283. #define BTN_EN2 PH10
  284. #if DISABLED(CUSTOM_SPI_PINS)
  285. #define SD_DETECT_PIN PB10
  286. #define LCD_SDSS PB12
  287. #endif
  288. #define LCD_PINS_ENABLE PC10
  289. #define LCD_PINS_D4 PG8
  290. #if ENABLED(FYSETC_MINI_12864)
  291. #define DOGLCD_CS PC10
  292. #define DOGLCD_A0 PA8
  293. //#define LCD_BACKLIGHT_PIN -1
  294. #define LCD_RESET_PIN PG8 // Must be high or open for LCD to operate normally.
  295. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  296. #ifndef RGB_LED_R_PIN
  297. #define RGB_LED_R_PIN PG7
  298. #endif
  299. #ifndef RGB_LED_G_PIN
  300. #define RGB_LED_G_PIN PG6
  301. #endif
  302. #ifndef RGB_LED_B_PIN
  303. #define RGB_LED_B_PIN PG5
  304. #endif
  305. #elif ENABLED(FYSETC_MINI_12864_2_1)
  306. #define NEOPIXEL_PIN PF13
  307. #endif
  308. #endif // !FYSETC_MINI_12864
  309. #if ENABLED(ULTIPANEL)
  310. #define LCD_PINS_D5 PG7
  311. #define LCD_PINS_D6 PG6
  312. #define LCD_PINS_D7 PG5
  313. #endif
  314. #endif
  315. // Alter timing for graphical display
  316. #if HAS_GRAPHICAL_LCD
  317. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  318. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  319. #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  320. #endif
  321. //#define DOGLCD_CS PB12
  322. //#define DOGLCD_A0 PA8
  323. //#define LCD_PINS_DC PB14
  324. //#define DOGLCD_MOSI PB15
  325. #endif // HAS_SPI_LCD