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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  5. *
  6. * Based on Sprinter and grbl.
  7. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation, either version 3 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. *
  22. */
  23. /**
  24. * MKS SBASE pin assignments
  25. */
  26. #ifndef TARGET_LPC1768
  27. #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
  28. #endif
  29. #ifndef BOARD_NAME
  30. #define BOARD_NAME "MKS SBASE"
  31. #define DEFAULT_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
  32. #endif
  33. // unused
  34. /*
  35. #define PIN_P0_27 P0_27
  36. #define PIN_P0_28 P0_28
  37. */
  38. //
  39. // Servo pin
  40. //
  41. #define SERVO0_PIN P1_23 // J8-3 (low jitter)
  42. #define SERVO1_PIN P2_12 // J8-4
  43. #define SERVO2_PIN P2_11 // J8-5
  44. #define SERVO3_PIN P4_28 // J8-6
  45. //
  46. // Limit Switches
  47. //
  48. #define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
  49. #define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
  50. #define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
  51. #define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
  52. #define Z_MIN_PIN P1_28 // The original Mks Sbase DIO19 has a 10k pullup to 3.3V or 5V, 1K series, so when using a Zprobe we must use DIO41 (J8 P1.22)
  53. #define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
  54. //
  55. // Steppers
  56. //
  57. #define X_STEP_PIN P2_00
  58. #define X_DIR_PIN P0_05
  59. #define X_ENABLE_PIN P0_04
  60. #define Y_STEP_PIN P2_01
  61. #define Y_DIR_PIN P0_11
  62. #define Y_ENABLE_PIN P0_10
  63. #define Z_STEP_PIN P2_02
  64. #define Z_DIR_PIN P0_20
  65. #define Z_ENABLE_PIN P0_19
  66. #define E0_STEP_PIN P2_03
  67. #define E0_DIR_PIN P0_22
  68. #define E0_ENABLE_PIN P0_21
  69. #define E1_STEP_PIN P2_08
  70. #define E1_DIR_PIN P2_13
  71. #define E1_ENABLE_PIN P4_29
  72. //
  73. // Temperature Sensors
  74. // 3.3V max when defined as an analog input
  75. //
  76. #define TEMP_BED_PIN 0 // A0 (TH1)
  77. #define TEMP_0_PIN 1 // A1 (TH2)
  78. #define TEMP_1_PIN 2 // A2 (TH3)
  79. #define TEMP_2_PIN 3 // A3 (TH4)
  80. //
  81. // Heaters / Fans
  82. //
  83. #define HEATER_BED_PIN P2_05
  84. #define HEATER_0_PIN P2_07
  85. #define HEATER_1_PIN P2_06
  86. #define FAN_PIN P2_04
  87. #define PS_ON_PIN P0_25
  88. //
  89. // Connector J7
  90. //
  91. // 5V
  92. // NC
  93. // GND
  94. #define PIN_P0_17 P0_17
  95. #define PIN_P0_16 P0_16
  96. #define PIN_P0_14 P0_14
  97. //
  98. // Connector J8
  99. //
  100. // GND
  101. #define PIN_P1_22 P1_22
  102. #define PIN_P1_23 P1_23
  103. #define PIN_P2_12 P2_12
  104. #define PIN_P2_11 P2_11
  105. #define PIN_P4_28 P4_28
  106. //
  107. // Prusa i3 MK2 Multi Material Multiplexer Support
  108. //
  109. #if ENABLED(MK2_MULTIPLEXER)
  110. #define E_MUX0_PIN P1_23 // J8-3
  111. #define E_MUX1_PIN P2_12 // J8-4
  112. #define E_MUX2_PIN P2_11 // J8-5
  113. #endif
  114. /**
  115. * Smart LCD adapter
  116. *
  117. * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
  118. * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
  119. * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
  120. * is needed to pick up 5V for the EXP1 connection.
  121. *
  122. * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
  123. * on the LCD display during accesses of the SD card. The menus/code has been arranged so
  124. * that the garbage/lines are erased immediately after the SD card accesses are completed.
  125. */
  126. #if ENABLED(ULTRA_LCD)
  127. #define BEEPER_PIN P1_31 // EXP1.1
  128. #define BTN_ENC P1_30 // EXP1.2
  129. #define BTN_EN1 P3_26 // EXP2.5
  130. #define BTN_EN2 P3_25 // EXP2.3
  131. #define SD_DETECT_PIN P0_27 // EXP2.7
  132. #define LCD_PINS_RS P0_16 // EXP1.4
  133. #define LCD_SDSS P0_28 // EXP2.4
  134. #define LCD_PINS_ENABLE P0_18 // EXP1.3
  135. #define LCD_PINS_D4 P0_15 // EXP1.5
  136. #endif // ULTRA_LCD
  137. //
  138. // Ethernet pins
  139. //
  140. #ifndef ULTIPANEL
  141. #define ENET_MDIO P1_17 // J12-4
  142. #define ENET_RX_ER P1_14 // J12-6
  143. #define ENET_RXD1 P1_10 // J12-8
  144. #endif
  145. #define ENET_MOC P1_16 // J12-3
  146. #define REF_CLK P1_15 // J12-5
  147. #define ENET_RXD0 P1_09 // J12-7
  148. #define ENET_CRS P1_08 // J12-9
  149. #define ENET_TX_EN P1_04 // J12-10
  150. #define ENET_TXD0 P1_00 // J12-11
  151. #define ENET_TXD1 P1_01 // J12-12
  152. //
  153. // Misc. Functions
  154. //
  155. #define LPC_SOFTWARE_SPI // MKS_SBASE needs a software SPI because the
  156. // selected pins are not on a hardware SPI controller
  157. // A custom cable is needed. See the README file in the
  158. // Marlin\src\config\examples\Mks\Sbase directory
  159. #define SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.7)
  160. #define MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
  161. #define MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.5)
  162. #define SS_PIN P0_28
  163. #define SD_DETECT_PIN P0_27
  164. #define SDSS P0_06
  165. /**
  166. * PWMs
  167. *
  168. * There are 6 PWMs. Each PWM can be assigned to one of two pins.
  169. *
  170. * SERVO2 does NOT have a PWM assigned to it.
  171. *
  172. * PWM1.1 P1_18 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
  173. * PWM1.1 P2_00 E0_STEP_PIN
  174. * PWM1.2 P1_20 SERVO0_PIN
  175. * PWM1.2 P2_01 X_STEP_PIN
  176. * PWM1.3 P1_21 SERVO1_PIN J5-1
  177. * PWM1.3 P2_02 Y_STEP_PIN
  178. * PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
  179. * PWM1.4 P2_03 Z_STEP_PIN
  180. * PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
  181. * PWM1.5 P2_04 RAMPS_D9_PIN
  182. * PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
  183. * PWM1.6 P2_05 RAMPS_D10_PIN
  184. */
  185. /**
  186. * Special pins
  187. * P1_30 - not 5V tolerant
  188. * P1_31 - not 5V tolerant
  189. * P0_27 - open collector
  190. * P0_28 - open collector
  191. *
  192. */