My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

pins_TH3D_EZBOARD_V2.h 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 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. #define BOARD_INFO_NAME "TH3D EZBoard V2"
  26. #define BOARD_WEBSITE_URL "th3dstudio.com"
  27. //#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config
  28. #define DISABLE_JTAGSWD // Disabling J-tag and Debug via SWD
  29. // Onboard I2C EEPROM
  30. #if NO_EEPROM_SELECTED
  31. #define I2C_EEPROM
  32. #define MARLIN_EEPROM_SIZE 0x1000 // 4K
  33. #define I2C_SCL_PIN PB6
  34. #define I2C_SDA_PIN PB7
  35. #undef NO_EEPROM_SELECTED
  36. #endif
  37. //
  38. // Neopixels
  39. //
  40. #define NEOPIXEL_PIN PA8
  41. //
  42. // Servos
  43. //
  44. #if ENABLED(V3_EZABL_ON_SERVO)
  45. #define SERVO0_PIN -1
  46. #else
  47. #define SERVO0_PIN PA2
  48. #endif
  49. //
  50. // Limit Switches
  51. //
  52. #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
  53. // Sensorless homing pins
  54. #if ENABLED(X_AXIS_SENSORLESS_HOMING)
  55. #define X_STOP_PIN PB4
  56. #else
  57. #define X_STOP_PIN PC1
  58. #endif
  59. #if ENABLED(Y_AXIS_SENSORLESS_HOMING)
  60. #define Y_STOP_PIN PB9
  61. #else
  62. #define Y_STOP_PIN PC2
  63. #endif
  64. //#define Z_STOP_PIN PC15 // Don't use sensorless homing on Z!
  65. #define E_STOP_PIN PB10
  66. #else
  67. // Standard Endstop Pins
  68. #define X_STOP_PIN PC1
  69. #define Y_STOP_PIN PC2
  70. #endif
  71. #if ENABLED(V3_EZABL_ON_SERVO)
  72. #define Z_STOP_PIN PA2
  73. #else
  74. #define Z_STOP_PIN PC3
  75. #endif
  76. //
  77. // Filament Runout Sensor
  78. //
  79. #ifndef FIL_RUNOUT_PIN
  80. #define FIL_RUNOUT_PIN PC0
  81. #endif
  82. //
  83. // Steppers
  84. //
  85. #define X_STEP_PIN PB3
  86. #define X_DIR_PIN PD2
  87. #define X_ENABLE_PIN PB5
  88. #define Y_STEP_PIN PB8
  89. #define Y_DIR_PIN PC13
  90. #define Y_ENABLE_PIN PC12
  91. #define Z_STEP_PIN PA3
  92. #define Z_DIR_PIN PB1
  93. #define Z_ENABLE_PIN PC14
  94. #define E0_STEP_PIN PA15
  95. #define E0_DIR_PIN PB11
  96. #define E0_ENABLE_PIN PB2
  97. #if HAS_TMC_UART
  98. //
  99. // Hardware Serial on UART4, Single Wire, 0-3 addresses
  100. //
  101. #define X_SERIAL_TX_PIN PC10
  102. #define X_SERIAL_RX_PIN PC11
  103. #define Y_SERIAL_TX_PIN PC10
  104. #define Y_SERIAL_RX_PIN PC11
  105. #define Z_SERIAL_TX_PIN PC10
  106. #define Z_SERIAL_RX_PIN PC11
  107. #define E0_SERIAL_TX_PIN PC10
  108. #define E0_SERIAL_RX_PIN PC11
  109. // Reduce baud rate to improve software serial reliability
  110. #define TMC_BAUD_RATE 19200
  111. // Default TMC slave addresses
  112. #ifndef X_SLAVE_ADDRESS
  113. #define X_SLAVE_ADDRESS 0
  114. #endif
  115. #ifndef Y_SLAVE_ADDRESS
  116. #define Y_SLAVE_ADDRESS 1
  117. #endif
  118. #ifndef Z_SLAVE_ADDRESS
  119. #define Z_SLAVE_ADDRESS 2
  120. #endif
  121. #ifndef E0_SLAVE_ADDRESS
  122. #define E0_SLAVE_ADDRESS 3
  123. #endif
  124. #endif
  125. //
  126. // Temp Sensors
  127. // 3.3V max when defined as an Analog Input!
  128. //
  129. #define TEMP_0_PIN PA1 // Analog Input PA1
  130. #define TEMP_BED_PIN PA0 // Analog Input PA0
  131. //
  132. // Heaters / Fans
  133. //
  134. #define HEATER_BED_PIN PC9
  135. #define HEATER_0_PIN PC8
  136. #ifndef FAN_PIN
  137. #define FAN_PIN PC6
  138. #endif
  139. #define FAN1_PIN PC7
  140. //
  141. // Auto fans
  142. //
  143. #define AUTO_FAN_PIN PC7
  144. #ifndef E0_AUTO_FAN_PIN
  145. #define E0_AUTO_FAN_PIN AUTO_FAN_PIN
  146. #endif
  147. #ifndef E1_AUTO_FAN_PIN
  148. #define E1_AUTO_FAN_PIN AUTO_FAN_PIN
  149. #endif
  150. #ifndef E2_AUTO_FAN_PIN
  151. #define E2_AUTO_FAN_PIN AUTO_FAN_PIN
  152. #endif
  153. //
  154. // SD Card
  155. //
  156. #define SDCARD_CONNECTION ONBOARD
  157. //#define SOFTWARE_SPI
  158. #define CUSTOM_SPI_PINS
  159. #define SDSS PA4
  160. #define SD_SCK_PIN PA5
  161. #define SD_MISO_PIN PA6
  162. #define SD_MOSI_PIN PA7
  163. #define SD_SS_PIN SDSS
  164. //#define SD_DETECT_PIN -1
  165. //#define ONBOARD_SD_CS_PIN SDSS
  166. //
  167. // LCD / Controller
  168. //
  169. /**
  170. * ------
  171. * PA14 | 1 2 | PB0
  172. * PC4 | 3 4 | --
  173. * PC5 | 5 6 PB13
  174. * PB12 | 7 8 | PB15
  175. * GND | 9 10 | 5V
  176. * ------
  177. * EXP1
  178. *
  179. * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
  180. * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
  181. *
  182. * A remote SD card is currently not supported because the pins routed to the EXP2
  183. * connector are shared with the onboard SD card.
  184. */
  185. #define EXP1_01_PIN PA14
  186. #define EXP1_02_PIN PB0
  187. #define EXP1_03_PIN PC4
  188. //#define EXP1_04_PIN -1
  189. #define EXP1_05_PIN PC5
  190. #define EXP1_06_PIN PB13
  191. #define EXP1_07_PIN PB12
  192. #define EXP1_08_PIN PB15
  193. #if ENABLED(CR10_STOCKDISPLAY)
  194. /** ------
  195. * BEEPER | 1 2 | ENC
  196. * EN1 | 3 4 | RESET
  197. * EN2 | 5 6 LCD_D4
  198. * LCD_RS | 7 8 | LCD_EN
  199. * GND | 9 10 | 5V
  200. * ------
  201. */
  202. #ifdef DISABLE_JTAGSWD
  203. #define BEEPER_PIN EXP1_01_PIN // Not connected in dev board
  204. #endif
  205. #define LCD_PINS_RS EXP1_07_PIN
  206. #define LCD_PINS_ENABLE EXP1_08_PIN
  207. #define LCD_PINS_D4 EXP1_06_PIN
  208. //#define KILL_PIN -1
  209. #define BOARD_ST7920_DELAY_1 600
  210. #define BOARD_ST7920_DELAY_2 750
  211. #define BOARD_ST7920_DELAY_3 750
  212. #elif ENABLED(MKS_MINI_12864)
  213. /** ------
  214. * SCK | 1 2 | ENC
  215. * EN1 | 3 4 | --
  216. * EN2 | 5 6 A0
  217. * CS | 7 8 | MOSI
  218. * GND | 9 10 | 5V
  219. * ------
  220. */
  221. #define DOGLCD_CS EXP1_07_PIN
  222. #define DOGLCD_A0 EXP1_06_PIN
  223. #define DOGLCD_SCK EXP1_01_PIN
  224. #define DOGLCD_MOSI EXP1_08_PIN
  225. #define LCD_CONTRAST_INIT 160
  226. #define LCD_CONTRAST_MIN 120
  227. #define LCD_CONTRAST_MAX 180
  228. #define FORCE_SOFT_SPI
  229. #define LCD_BACKLIGHT_PIN -1
  230. #elif HAS_WIRED_LCD
  231. #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard V2."
  232. #endif
  233. #if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864)
  234. #define BTN_EN1 EXP1_03_PIN
  235. #define BTN_EN2 EXP1_05_PIN
  236. #define BTN_ENC EXP1_02_PIN
  237. #endif