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.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. /**
  24. * TH3D EZBoard pin assignments
  25. */
  26. #include "env_validate.h"
  27. //#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config
  28. #define BOARD_INFO_NAME "TH3D EZBoard"
  29. #define BOARD_WEBSITE_URL "th3dstudio.com"
  30. //
  31. // Servos
  32. //
  33. #if ENABLED(V3_EZABL_ON_SERVO)
  34. #define SERVO0_PIN -1
  35. #else
  36. #define SERVO0_PIN P2_04
  37. #endif
  38. //
  39. // Limit Switches
  40. //
  41. #define X_STOP_PIN P1_24
  42. #define Y_STOP_PIN P1_25
  43. #if ENABLED(V3_EZABL_ON_SERVO)
  44. #define Z_STOP_PIN P2_04
  45. #else
  46. #define Z_STOP_PIN P1_26
  47. #endif
  48. //
  49. // Filament Runout Sensor
  50. //
  51. #ifndef FIL_RUNOUT_PIN
  52. #define FIL_RUNOUT_PIN P1_27
  53. #endif
  54. //
  55. // Steppers
  56. //
  57. #define X_STEP_PIN P2_00
  58. #define X_DIR_PIN P1_16
  59. #define X_ENABLE_PIN P1_17
  60. #define Y_STEP_PIN P2_01
  61. #define Y_DIR_PIN P1_10
  62. #define Y_ENABLE_PIN P1_09
  63. #define Z_STEP_PIN P2_02
  64. #define Z_DIR_PIN P1_15
  65. #define Z_ENABLE_PIN P1_14
  66. #define E0_STEP_PIN P2_03
  67. #define E0_DIR_PIN P1_04
  68. #define E0_ENABLE_PIN P1_08
  69. #define E1_STEP_PIN P2_08
  70. #define E1_DIR_PIN P2_13
  71. #define E1_ENABLE_PIN P4_29
  72. #if HAS_TMC_UART
  73. //
  74. // TMC220x stepper drivers
  75. //
  76. #define X_SERIAL_TX_PIN P0_04
  77. #define X_SERIAL_RX_PIN P0_05
  78. #define Y_SERIAL_TX_PIN P0_10
  79. #define Y_SERIAL_RX_PIN P0_11
  80. #define Z_SERIAL_TX_PIN P0_19
  81. #define Z_SERIAL_RX_PIN P0_20
  82. #define E0_SERIAL_TX_PIN P0_22
  83. #define E0_SERIAL_RX_PIN P0_21
  84. // Reduce baud rate to improve software serial reliability
  85. #define TMC_BAUD_RATE 19200
  86. #endif
  87. //
  88. // Temp Sensors
  89. // 3.3V max when defined as an Analog Input!
  90. //
  91. #if TEMP_SENSOR_0 == 20 // PT100 Adapter
  92. #define TEMP_0_PIN P0_02_A7 // Analog Input
  93. #else
  94. #define TEMP_0_PIN P0_23_A0 // Analog Input P0_23
  95. #endif
  96. #define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24
  97. //
  98. // Heaters / Fans
  99. //
  100. #define HEATER_BED_PIN P2_05
  101. #define HEATER_0_PIN P2_07
  102. #ifndef FAN_PIN
  103. #define FAN_PIN P2_06
  104. #endif
  105. #define FAN1_PIN P1_22
  106. //
  107. // Auto fans
  108. //
  109. #define AUTO_FAN_PIN P1_22 // FET 3
  110. #ifndef E0_AUTO_FAN_PIN
  111. #define E0_AUTO_FAN_PIN AUTO_FAN_PIN
  112. #endif
  113. #ifndef E1_AUTO_FAN_PIN
  114. #define E1_AUTO_FAN_PIN AUTO_FAN_PIN
  115. #endif
  116. #ifndef E2_AUTO_FAN_PIN
  117. #define E2_AUTO_FAN_PIN AUTO_FAN_PIN
  118. #endif
  119. //
  120. // SD Card
  121. //
  122. #define SDCARD_CONNECTION ONBOARD
  123. //#define SD_DETECT_PIN P0_25 // SD_CD
  124. #define SD_SCK_PIN P0_07
  125. #define SD_MISO_PIN P0_08
  126. #define SD_MOSI_PIN P0_09
  127. #define ONBOARD_SD_CS_PIN P0_06
  128. #define SD_SS_PIN ONBOARD_SD_CS_PIN
  129. //
  130. // LCD / Controller
  131. //
  132. /**
  133. * ------
  134. * P1_31 | 1 2 | P1_30
  135. * P3_26 | 3 4 | P2_11
  136. * P3_25 5 6 | P0_15
  137. * P0_16 | 7 8 | P0_18
  138. * GND | 9 10 | 5V
  139. * ------
  140. * EXP1
  141. *
  142. * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
  143. * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
  144. *
  145. * A remote SD card is currently not supported because the pins routed to the EXP2
  146. * connector are shared with the onboard SD card.
  147. */
  148. #define EXP1_01_PIN P1_31
  149. #define EXP1_02_PIN P1_30
  150. #define EXP1_03_PIN P3_26
  151. #define EXP1_04_PIN P2_11
  152. #define EXP1_05_PIN P3_25
  153. #define EXP1_06_PIN P0_15
  154. #define EXP1_07_PIN P0_16
  155. #define EXP1_08_PIN P0_18
  156. #if ENABLED(CR10_STOCKDISPLAY)
  157. /** ------
  158. * BEEPER | 1 2 | ENC
  159. * EN1 | 3 4 | KILL
  160. * EN2 5 6 | LCD_D4
  161. * LCD_RS | 7 8 | LCD_EN
  162. * GND | 9 10 | 5V
  163. * ------
  164. */
  165. #define BEEPER_PIN EXP1_01_PIN
  166. #define LCD_PINS_RS EXP1_07_PIN
  167. #define LCD_PINS_ENABLE EXP1_08_PIN
  168. #define LCD_PINS_D4 EXP1_06_PIN
  169. #define KILL_PIN EXP1_04_PIN
  170. #elif ENABLED(MKS_MINI_12864)
  171. /** ------
  172. * SCK | 1 2 | ENC
  173. * EN1 | 3 4 | --
  174. * EN2 5 6 | A0
  175. * CS | 7 8 | MOSI
  176. * GND | 9 10 | 5V
  177. * ------
  178. */
  179. #define DOGLCD_CS EXP1_07_PIN
  180. #define DOGLCD_A0 EXP1_06_PIN
  181. #define DOGLCD_SCK EXP1_01_PIN
  182. #define DOGLCD_MOSI EXP1_08_PIN
  183. #define LCD_CONTRAST_INIT 160
  184. #define LCD_CONTRAST_MIN 120
  185. #define LCD_CONTRAST_MAX 180
  186. #define FORCE_SOFT_SPI
  187. #define LCD_BACKLIGHT_PIN -1
  188. #elif HAS_WIRED_LCD
  189. #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard."
  190. #endif
  191. #if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864)
  192. #define BTN_EN1 EXP1_03_PIN
  193. #define BTN_EN2 EXP1_05_PIN
  194. #define BTN_ENC EXP1_02_PIN
  195. #endif