My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pins_FLYF407ZG.h 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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. #if !defined(STM32F4) && !defined(STM32F4xx)
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 6 || E_STEPPERS > 6
  26. #error "FLYF407ZG supports up to 6 hotends / E-steppers."
  27. #endif
  28. #define BOARD_INFO_NAME "FLYF407ZG"
  29. #define BOARD_WEBSITE_URL "github.com/FLYmaker/FLYF407ZG"
  30. #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
  31. #undef E2END
  32. #define E2END 0xFFF // 4KB
  33. //
  34. // Servos
  35. //
  36. #define SERVO0_PIN PE11
  37. //
  38. // Limit Switches
  39. //
  40. #define X_MIN_PIN PC3
  41. #define X_MAX_PIN PC2
  42. #define Y_MIN_PIN PF2
  43. #define Y_MAX_PIN PF1
  44. #define Z_MIN_PIN PF0
  45. #define Z_MAX_PIN PC15
  46. //
  47. // Z Probe (when not Z_MIN_PIN)
  48. //
  49. #define Z_MIN_PROBE_PIN PC14 // Z3_PIN
  50. //
  51. // Steppers
  52. //
  53. #define X_STEP_PIN PB9
  54. #define X_DIR_PIN PE0
  55. #define X_ENABLE_PIN PE1
  56. #ifndef X_CS_PIN
  57. #define X_CS_PIN PG13
  58. #endif
  59. #define Y_STEP_PIN PB8
  60. #define Y_DIR_PIN PG11
  61. #define Y_ENABLE_PIN PG12
  62. #ifndef Y_CS_PIN
  63. #define Y_CS_PIN PG10
  64. #endif
  65. #define Z_STEP_PIN PA8
  66. #define Z_DIR_PIN PD6
  67. #define Z_ENABLE_PIN PD7
  68. #ifndef Z_CS_PIN
  69. #define Z_CS_PIN PD5
  70. #endif
  71. #define E0_STEP_PIN PC7
  72. #define E0_DIR_PIN PD3
  73. #define E0_ENABLE_PIN PD4
  74. #ifndef E0_CS_PIN
  75. #define E0_CS_PIN PD1
  76. #endif
  77. #define E1_STEP_PIN PC6
  78. #define E1_DIR_PIN PA15
  79. #define E1_ENABLE_PIN PD0
  80. #ifndef E1_CS_PIN
  81. #define E1_CS_PIN PA14
  82. #endif
  83. #define E2_STEP_PIN PD15
  84. #define E2_DIR_PIN PG7
  85. #define E2_ENABLE_PIN PG8
  86. #ifndef E2_CS_PIN
  87. #define E2_CS_PIN PG6
  88. #endif
  89. #define E3_STEP_PIN PD14
  90. #define E3_DIR_PIN PG4
  91. #define E3_ENABLE_PIN PG5
  92. #ifndef E3_CS_PIN
  93. #define E3_CS_PIN PG3
  94. #endif
  95. #define E4_STEP_PIN PD13
  96. #define E4_DIR_PIN PD11
  97. #define E4_ENABLE_PIN PG2
  98. #ifndef E4_CS_PIN
  99. #define E4_CS_PIN PD10
  100. #endif
  101. #define E5_STEP_PIN PD12
  102. #define E5_DIR_PIN PD8
  103. #define E5_ENABLE_PIN PD9
  104. #ifndef E5_CS_PIN
  105. #define E5_CS_PIN PB12
  106. #endif
  107. //
  108. // Temperature Sensors
  109. //
  110. #define TEMP_0_PIN PA0 // Analog Input
  111. #define TEMP_1_PIN PC1 // Analog Input
  112. #define TEMP_2_PIN PC0 // Analog Input
  113. #define TEMP_3_PIN PF10 // Analog Input
  114. #define TEMP_4_PIN PF5 // Analog Input
  115. #define TEMP_5_PIN PF4 // Analog Input
  116. #define TEMP_BED_PIN PF3 // Analog Input
  117. //
  118. // Heaters / Fans
  119. //
  120. #define HEATER_0_PIN PF7
  121. #define HEATER_1_PIN PF6
  122. #define HEATER_2_PIN PE6
  123. #define HEATER_3_PIN PE5
  124. #define HEATER_4_PIN PE4
  125. #define HEATER_5_PIN PA2
  126. #define HEATER_BED_PIN PE2
  127. #ifndef FAN_PIN
  128. #define FAN_PIN PF8
  129. #endif
  130. #define FAN1_PIN PF9
  131. #define FAN2_PIN PE3
  132. #define FAN3_PIN PA1
  133. #define FAN4_PIN PE13
  134. #define FAN5_PIN PB11
  135. //
  136. // Onboard SD support
  137. //
  138. #define SDIO_D0_PIN PC8
  139. #define SDIO_D1_PIN PC9
  140. //#define SD_CARD_DETECT_PIN PC13
  141. #define SDIO_D2_PIN PC10
  142. #define SDIO_D3_PIN PC11
  143. #define SDIO_CK_PIN PC12
  144. #define SDIO_CMD_PIN PD2
  145. #if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD
  146. #define SDIO_SUPPORT // Use SDIO for onboard SD
  147. #ifndef SDIO_SUPPORT
  148. #define SOFTWARE_SPI // Use soft SPI for onboard SD
  149. #define SDSS SDIO_D3_PIN
  150. #define SCK_PIN SDIO_CK_PIN
  151. #define MISO_PIN SDIO_D0_PIN
  152. #define MOSI_PIN SDIO_CMD_PIN
  153. #endif
  154. #endif
  155. //
  156. // Trinamic Software SPI
  157. //
  158. #if ENABLED(TMC_USE_SW_SPI)
  159. #ifndef TMC_SW_MOSI
  160. #define TMC_SW_MOSI PB15
  161. #endif
  162. #ifndef TMC_SW_MISO
  163. #define TMC_SW_MISO PB14
  164. #endif
  165. #ifndef TMC_SW_SCK
  166. #define TMC_SW_SCK PB13
  167. #endif
  168. #endif
  169. //
  170. // Trinamic Software Serial
  171. //
  172. #if HAS_TMC220x
  173. #define X_SERIAL_TX_PIN PG13
  174. #define X_SERIAL_RX_PIN PG13
  175. #define Y_SERIAL_TX_PIN PG10
  176. #define Y_SERIAL_RX_PIN PG10
  177. #define Z_SERIAL_TX_PIN PD5
  178. #define Z_SERIAL_RX_PIN PD5
  179. #define E0_SERIAL_TX_PIN PD1
  180. #define E0_SERIAL_RX_PIN PD1
  181. #define E1_SERIAL_TX_PIN PA14
  182. #define E1_SERIAL_RX_PIN PA14
  183. #define E2_SERIAL_TX_PIN PG6
  184. #define E2_SERIAL_RX_PIN PG6
  185. #define E3_SERIAL_TX_PIN PG3
  186. #define E3_SERIAL_RX_PIN PG3
  187. #define E4_SERIAL_TX_PIN PD10
  188. #define E4_SERIAL_RX_PIN PD10
  189. #define E5_SERIAL_TX_PIN PB12
  190. #define E5_SERIAL_RX_PIN PB12
  191. #endif
  192. //
  193. // LCD / Controller
  194. //
  195. #define SCK_PIN PB13
  196. #define MISO_PIN PB14
  197. #define MOSI_PIN PB15
  198. #define SDSS PF11
  199. #define SD_DETECT_PIN PB2
  200. #define BEEPER_PIN PB10
  201. #define LCD_PINS_RS PE12
  202. #define LCD_PINS_ENABLE PE14
  203. #define LCD_PINS_D4 PE10
  204. #define LCD_PINS_D5 PE9
  205. #define LCD_PINS_D6 PE8
  206. #define LCD_PINS_D7 PE7
  207. #define BTN_EN1 PC4
  208. #define BTN_EN2 PC5
  209. #define BTN_ENC PE15
  210. //
  211. // Filament runout
  212. //
  213. #define FIL_RUNOUT_PIN PA3
  214. //
  215. // ST7920 Delays
  216. //
  217. #ifndef ST7920_DELAY_1
  218. #define ST7920_DELAY_1 DELAY_NS(96)
  219. #endif
  220. #ifndef ST7920_DELAY_2
  221. #define ST7920_DELAY_2 DELAY_NS(48)
  222. #endif
  223. #ifndef ST7920_DELAY_3
  224. #define ST7920_DELAY_3 DELAY_NS(715)
  225. #endif