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_FLYF407ZG.h 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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. #define ALLOW_STM32DUINO
  24. #include "env_validate.h"
  25. #if 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. // Avoid conflict with fans and TIMER_TONE
  32. #define TEMP_TIMER 3
  33. #define STEP_TIMER 5
  34. //
  35. // EEPROM Emulation
  36. //
  37. #if NO_EEPROM_SELECTED
  38. #define FLASH_EEPROM_EMULATION
  39. //#define SRAM_EEPROM_EMULATION
  40. //#define I2C_EEPROM
  41. #endif
  42. #if ENABLED(FLASH_EEPROM_EMULATION)
  43. // Decrease delays and flash wear by spreading writes across
  44. // the 128kB sector allocated for EEPROM emulation.
  45. #define FLASH_EEPROM_LEVELING
  46. #elif ENABLED(I2C_EEPROM)
  47. #define MARLIN_EEPROM_SIZE 0x2000 // 8K
  48. #endif
  49. #ifndef MARLIN_EEPROM_SIZE
  50. #define MARLIN_EEPROM_SIZE 0x1000 // 4K
  51. #endif
  52. //
  53. // Servos
  54. //
  55. #define SERVO0_PIN PE11
  56. //
  57. // Limit Switches
  58. //
  59. #define X_MIN_PIN PC3
  60. #define X_MAX_PIN PC2
  61. #define Y_MIN_PIN PF2
  62. #define Y_MAX_PIN PF1
  63. #define Z_MIN_PIN PF0
  64. #define Z_MAX_PIN PC15
  65. //
  66. // Z Probe (when not Z_MIN_PIN)
  67. //
  68. #define Z_MIN_PROBE_PIN PC14 // Z3_PIN
  69. //
  70. // Steppers
  71. //
  72. #define X_STEP_PIN PB9
  73. #define X_DIR_PIN PE0
  74. #define X_ENABLE_PIN PE1
  75. #ifndef X_CS_PIN
  76. #define X_CS_PIN PG13
  77. #endif
  78. #define Y_STEP_PIN PB8
  79. #define Y_DIR_PIN PG11
  80. #define Y_ENABLE_PIN PG12
  81. #ifndef Y_CS_PIN
  82. #define Y_CS_PIN PG10
  83. #endif
  84. #define Z_STEP_PIN PA8
  85. #define Z_DIR_PIN PD6
  86. #define Z_ENABLE_PIN PD7
  87. #ifndef Z_CS_PIN
  88. #define Z_CS_PIN PD5
  89. #endif
  90. #define E0_STEP_PIN PC7
  91. #define E0_DIR_PIN PD3
  92. #define E0_ENABLE_PIN PD4
  93. #ifndef E0_CS_PIN
  94. #define E0_CS_PIN PD1
  95. #endif
  96. #define E1_STEP_PIN PC6
  97. #define E1_DIR_PIN PA15
  98. #define E1_ENABLE_PIN PD0
  99. #ifndef E1_CS_PIN
  100. #define E1_CS_PIN PA14
  101. #endif
  102. #define E2_STEP_PIN PD15
  103. #define E2_DIR_PIN PG7
  104. #define E2_ENABLE_PIN PG8
  105. #ifndef E2_CS_PIN
  106. #define E2_CS_PIN PG6
  107. #endif
  108. #define E3_STEP_PIN PD14
  109. #define E3_DIR_PIN PG4
  110. #define E3_ENABLE_PIN PG5
  111. #ifndef E3_CS_PIN
  112. #define E3_CS_PIN PG3
  113. #endif
  114. #define E4_STEP_PIN PD13
  115. #define E4_DIR_PIN PD11
  116. #define E4_ENABLE_PIN PG2
  117. #ifndef E4_CS_PIN
  118. #define E4_CS_PIN PD10
  119. #endif
  120. #define E5_STEP_PIN PD12
  121. #define E5_DIR_PIN PD8
  122. #define E5_ENABLE_PIN PD9
  123. #ifndef E5_CS_PIN
  124. #define E5_CS_PIN PB12
  125. #endif
  126. //
  127. // Temperature Sensors
  128. //
  129. #define TEMP_0_PIN PA0 // Analog Input
  130. #define TEMP_1_PIN PC1 // Analog Input
  131. #define TEMP_2_PIN PC0 // Analog Input
  132. #define TEMP_3_PIN PF10 // Analog Input
  133. #define TEMP_4_PIN PF5 // Analog Input
  134. #define TEMP_5_PIN PF4 // Analog Input
  135. #define TEMP_BED_PIN PF3 // Analog Input
  136. //
  137. // Heaters / Fans
  138. //
  139. #define HEATER_0_PIN PF7
  140. #define HEATER_1_PIN PF6
  141. #define HEATER_2_PIN PE6
  142. #define HEATER_3_PIN PE5
  143. #define HEATER_4_PIN PE4
  144. #define HEATER_5_PIN PE3
  145. #define HEATER_BED_PIN PE2
  146. #ifndef FAN_PIN
  147. #define FAN_PIN PF8
  148. #endif
  149. #define FAN1_PIN PF9
  150. #define FAN2_PIN PA2
  151. #define FAN3_PIN PA1
  152. #define FAN4_PIN PE13
  153. #define FAN5_PIN PB11
  154. /**
  155. * ------ ------
  156. * PB10 | 1 2 | PE15 PB14 | 1 2 | PB13
  157. * PE14 | 3 4 | PE12 PC5 | 3 4 | PF11
  158. * PE10 5 6 | PE9 PC4 5 6 | PB15
  159. * PE8 | 7 8 | PE7 PB2 | 7 8 | RESET
  160. * GND | 9 10 | 5V GND | 9 10 | --
  161. * ------ ------
  162. * EXP1 EXP2
  163. */
  164. #define EXP1_01_PIN PB10
  165. #define EXP1_02_PIN PE15
  166. #define EXP1_03_PIN PE14
  167. #define EXP1_04_PIN PE12
  168. #define EXP1_05_PIN PE10
  169. #define EXP1_06_PIN PE9
  170. #define EXP1_07_PIN PE8
  171. #define EXP1_08_PIN PE7
  172. #define EXP2_01_PIN PB14
  173. #define EXP2_02_PIN PB13
  174. #define EXP2_03_PIN PC5
  175. #define EXP2_04_PIN PF11
  176. #define EXP2_05_PIN PC4
  177. #define EXP2_06_PIN PB15
  178. #define EXP2_07_PIN PB2
  179. #define EXP2_08_PIN -1 // RESET
  180. //
  181. // Onboard SD support
  182. //
  183. //#define SD_CARD_DETECT_PIN PC13
  184. #ifndef SDCARD_CONNECTION
  185. #define SDCARD_CONNECTION ONBOARD
  186. #endif
  187. #if SD_CONNECTION_IS(ONBOARD)
  188. #define SDIO_SUPPORT // Use SDIO for onboard SD
  189. #if DISABLED(SDIO_SUPPORT)
  190. #define SOFTWARE_SPI // Use soft SPI for onboard SD
  191. #define SDSS PC11
  192. #define SD_SCK_PIN PC12
  193. #define SD_MISO_PIN PC8
  194. #define SD_MOSI_PIN PD2
  195. #endif
  196. #elif SD_CONNECTION_IS(LCD)
  197. #define SD_SCK_PIN EXP2_02_PIN
  198. #define SD_MISO_PIN EXP2_01_PIN
  199. #define SD_MOSI_PIN EXP2_06_PIN
  200. #define SDSS EXP2_04_PIN
  201. #define SD_DETECT_PIN EXP2_07_PIN
  202. #endif
  203. //
  204. // Trinamic Software SPI
  205. //
  206. #if ENABLED(TMC_USE_SW_SPI)
  207. #ifndef TMC_SW_SCK
  208. #define TMC_SW_SCK EXP2_02_PIN
  209. #endif
  210. #ifndef TMC_SW_MISO
  211. #define TMC_SW_MISO EXP2_01_PIN
  212. #endif
  213. #ifndef TMC_SW_MOSI
  214. #define TMC_SW_MOSI EXP2_06_PIN
  215. #endif
  216. #endif
  217. //
  218. // Trinamic Software Serial
  219. //
  220. #if HAS_TMC_UART
  221. #define X_SERIAL_TX_PIN PG13
  222. #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
  223. #define Y_SERIAL_TX_PIN PG10
  224. #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
  225. #define Z_SERIAL_TX_PIN PD5
  226. #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
  227. #define E0_SERIAL_TX_PIN PD1
  228. #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
  229. #define E1_SERIAL_TX_PIN PA14
  230. #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
  231. #define E2_SERIAL_TX_PIN PG6
  232. #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
  233. #define E3_SERIAL_TX_PIN PG3
  234. #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
  235. #define E4_SERIAL_TX_PIN PD10
  236. #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN
  237. #define E5_SERIAL_TX_PIN PB12
  238. #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN
  239. #endif
  240. //
  241. // LCD / Controller
  242. //
  243. #if IS_RRD_SC
  244. #define BEEPER_PIN EXP1_01_PIN
  245. #define LCD_PINS_RS EXP1_04_PIN
  246. #define LCD_PINS_ENABLE EXP1_03_PIN
  247. #define LCD_PINS_D4 EXP1_05_PIN
  248. #define LCD_PINS_D5 EXP1_06_PIN
  249. #define LCD_PINS_D6 EXP1_07_PIN
  250. #define LCD_PINS_D7 EXP1_08_PIN
  251. #define BTN_EN1 EXP2_05_PIN
  252. #define BTN_EN2 EXP2_03_PIN
  253. #define BTN_ENC EXP1_02_PIN
  254. #endif
  255. //
  256. // Filament runout
  257. //
  258. #define FIL_RUNOUT_PIN PA3
  259. // Alter timing for graphical display
  260. #if IS_U8GLIB_ST7920
  261. #define BOARD_ST7920_DELAY_1 96
  262. #define BOARD_ST7920_DELAY_2 48
  263. #define BOARD_ST7920_DELAY_3 715
  264. #endif