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_TH3D_EZBOARD_V2.h 7.7KB

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