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_RAMPS_RE_ARM.h 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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. * Re-ARM with RAMPS v1.4 pin assignments
  25. *
  26. * Applies to the following boards:
  27. *
  28. * RAMPS_14_EFB (Hotend, Fan, Bed)
  29. * RAMPS_14_EEB (Hotend0, Hotend1, Bed)
  30. * RAMPS_14_EFF (Hotend, Fan0, Fan1)
  31. * RAMPS_14_EEF (Hotend0, Hotend1, Fan)
  32. * RAMPS_14_SF (Spindle, Controller Fan)
  33. *
  34. */
  35. #ifndef TARGET_LPC1768
  36. #error "Oops! Make sure you have LPC1768 selected."
  37. #endif
  38. #ifndef BOARD_NAME
  39. #define BOARD_NAME "Re-ARM RAMPS 1.4"
  40. #endif
  41. #define LARGE_FLASH true
  42. //
  43. // Servos
  44. //
  45. #define SERVO0_PIN P1_20
  46. #define SERVO1_PIN P1_21 // also on J5-1
  47. #define SERVO2_PIN P1_19
  48. #define SERVO3_PIN P1_18 // 5V output - PWM capable
  49. //
  50. // Limit Switches
  51. //
  52. #define X_MIN_PIN P1_24 //10k pullup to 3.3V, 1K series
  53. #define X_MAX_PIN P1_25 //10k pullup to 3.3V, 1K series
  54. #define Y_MIN_PIN P1_26 //10k pullup to 3.3V, 1K series
  55. #define Y_MAX_PIN P1_27 //10k pullup to 3.3V, 1K series
  56. #define Z_MIN_PIN P1_29 //10k pullup to 3.3V, 1K series
  57. #define Z_MAX_PIN P1_28 //10k pullup to 3.3V, 1K series
  58. //
  59. // Steppers
  60. //
  61. #define X_STEP_PIN P2_1
  62. #define X_DIR_PIN P0_11
  63. #define X_ENABLE_PIN P0_10
  64. #define Y_STEP_PIN P2_2
  65. #define Y_DIR_PIN P0_20
  66. #define Y_ENABLE_PIN P0_19
  67. #define Z_STEP_PIN P2_3
  68. #define Z_DIR_PIN P0_22
  69. #define Z_ENABLE_PIN P0_21
  70. #define E0_STEP_PIN P2_0
  71. #define E0_DIR_PIN P0_5
  72. #define E0_ENABLE_PIN P0_4
  73. #define E1_STEP_PIN P2_8
  74. #define E1_DIR_PIN P2_13
  75. #define E1_ENABLE_PIN P4_29
  76. #define E2_STEP_PIN P2_8
  77. #define E2_DIR_PIN P2_13
  78. #define E2_ENABLE_PIN P4_29
  79. //
  80. // Temperature Sensors
  81. // 3.3V max when defined as an analog input
  82. //
  83. #define TEMP_0_PIN 0 //A0 (T0) - D67 - TEMP_0_PIN
  84. #define TEMP_BED_PIN 1 //A1 (T1) - D68 - TEMP_BED_PIN
  85. #define TEMP_1_PIN 2 //A2 (T2) - D69 - TEMP_1_PIN
  86. #define TEMP_2_PIN 3 //A3 - D63 - J5-3 & AUX-2
  87. #define TEMP_3_PIN 4 //A4 - D37 - BUZZER_PIN
  88. //#define TEMP_4_PIN 5 //A5 - D49 - SD_DETECT_PIN
  89. //#define ?? 6 //A6 - D0 - RXD0 - J4-4 & AUX-1
  90. #define FILWIDTH_PIN 7 //A7 - D1 - TXD0 - J4-5 & AUX-1
  91. //
  92. // Augmentation for auto-assigning RAMPS plugs
  93. //
  94. #if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
  95. #if HOTENDS > 1
  96. #if TEMP_SENSOR_BED
  97. #define IS_RAMPS_EEB
  98. #else
  99. #define IS_RAMPS_EEF
  100. #endif
  101. #elif TEMP_SENSOR_BED
  102. #define IS_RAMPS_EFB
  103. #else
  104. #define IS_RAMPS_EFF
  105. #endif
  106. #endif
  107. //
  108. // Heaters / Fans
  109. //
  110. #ifndef MOSFET_D_PIN
  111. #define MOSFET_D_PIN -1
  112. #endif
  113. #ifndef RAMPS_D8_PIN
  114. #define RAMPS_D8_PIN P2_7
  115. #endif
  116. #ifndef RAMPS_D9_PIN
  117. #define RAMPS_D9_PIN P2_4
  118. #endif
  119. #ifndef RAMPS_D10_PIN
  120. #define RAMPS_D10_PIN P2_5
  121. #endif
  122. #define HEATER_0_PIN RAMPS_D10_PIN
  123. #if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
  124. #define FAN_PIN RAMPS_D9_PIN
  125. #define HEATER_BED_PIN RAMPS_D8_PIN
  126. #elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
  127. #define HEATER_1_PIN RAMPS_D9_PIN
  128. #define FAN_PIN RAMPS_D8_PIN
  129. #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
  130. #define HEATER_1_PIN RAMPS_D9_PIN
  131. #define HEATER_BED_PIN RAMPS_D8_PIN
  132. #elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
  133. #define FAN_PIN RAMPS_D9_PIN
  134. #define FAN1_PIN RAMPS_D8_PIN
  135. #elif ENABLED(IS_RAMPS_SF) // Spindle, Fan
  136. #define FAN_PIN RAMPS_D8_PIN
  137. #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
  138. #define FAN_PIN RAMPS_D9_PIN
  139. #define HEATER_BED_PIN RAMPS_D8_PIN
  140. #if HOTENDS == 1
  141. #define FAN1_PIN MOSFET_D_PIN
  142. #else
  143. #define HEATER_1_PIN MOSFET_D_PIN
  144. #endif
  145. #endif
  146. #ifndef FAN_PIN
  147. #define FAN_PIN P1_18 // IO pin. Buffer needed
  148. #endif
  149. //
  150. // Misc. Functions
  151. //
  152. #define LED_PIN P4_28
  153. // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
  154. #define FIL_RUNOUT_PIN P1_18
  155. #define PS_ON_PIN P2_12
  156. #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
  157. #if !defined(NUM_SERVOS) || NUM_SERVOS < 4 // try to use servo connector
  158. #define CASE_LIGHT_PIN P1_18 // MUST BE HARDWARE PWM
  159. #endif
  160. #endif
  161. //
  162. // M3/M4/M5 - Spindle/Laser Control
  163. //
  164. #if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  165. #if !defined(NUM_SERVOS) || NUM_SERVOS == 1 // must use servo connector
  166. #undef SERVO1
  167. #undef SERVO2
  168. #undef SERVO3
  169. #define SPINDLE_LASER_ENABLE_PIN P1_21 // Pin should have a pullup/pulldown!
  170. #define SPINDLE_LASER_PWM_PIN P1_18 // MUST BE HARDWARE PWM
  171. #define SPINDLE_DIR_PIN P1_19
  172. #endif
  173. #endif
  174. //
  175. // Průša i3 MK2 Multiplexer Support
  176. //
  177. #define E_MUX0_PIN P0_3 // Z_CS_PIN
  178. #define E_MUX1_PIN P0_2 // E0_CS_PIN
  179. #define E_MUX2_PIN P0_26 // E1_CS_PIN
  180. /**
  181. * LCD / Controller
  182. *
  183. * All controllers can use J3 and J5 on the Re-ARM board. Custom cabling will be required.
  184. */
  185. /**
  186. * Smart LCD adapter
  187. *
  188. * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
  189. * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
  190. * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
  191. * is needed to pick up 5V for the EXP1 connection.
  192. *
  193. * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
  194. * on the LCD display during accesses of the SD card. The menus/code has been arranged so
  195. * that the garbage/lines are erased immediately after the SD card accesses are completed.
  196. */
  197. #if ENABLED(ULTRA_LCD)
  198. #define BEEPER_PIN P1_30 // not 5V tolerant
  199. #define BTN_EN1 P3_26 // J3-2 & AUX-4
  200. #define BTN_EN2 P3_25 // J3-4 & AUX-4
  201. #define BTN_ENC P2_11 // J3-3 & AUX-4
  202. #define SD_DETECT_PIN P1_31 // not 5V tolerant J3-1 & AUX-3
  203. #define KILL_PIN P1_22 // J5-4 & AUX-4
  204. #define LCD_PINS_RS P0_16 // J3-7 & AUX-4
  205. #define LCD_SDSS P0_16 // J3-7 & AUX-4
  206. #define LCD_BACKLIGHT_PIN P0_16 // J3-7 & AUX-4 - only used on DOGLCD controllers
  207. #define LCD_PINS_ENABLE P0_18 // (MOSI) J3-10 & AUX-3
  208. #define LCD_PINS_D4 P0_15 // (SCK) J3-9 & AUX-3
  209. #define DOGLCD_A0 P2_6 // J3-8 & AUX-2
  210. #define DOGLCD_CS P0_26 // J5-3 & AUX-2
  211. #ifdef ULTIPANEL
  212. #define LCD_PINS_D5 P1_17 // ENET_MDIO
  213. #define LCD_PINS_D6 P1_14 // ENET_RX_ER
  214. #define LCD_PINS_D7 P1_10 // ENET_RXD1
  215. #endif
  216. #if ENABLED(NEWPANEL)
  217. #if ENABLED(REPRAPWORLD_KEYPAD)
  218. #define SHIFT_OUT P0_18 // (MOSI) J3-10 & AUX-3
  219. #define SHIFT_CLK P0_15 // (SCK) J3-9 & AUX-3
  220. #define SHIFT_LD P1_31 // not 5V tolerant J3-1 & AUX-3
  221. #endif
  222. #else
  223. //#define SHIFT_CLK P3_26 // J3-2 & AUX-4
  224. //#define SHIFT_LD P3_25 // J3-4 & AUX-4
  225. //#define SHIFT_OUT P2_11 // J3-3 & AUX-4
  226. //#define SHIFT_EN P1_22 // J5-4 & AUX-4
  227. #endif
  228. #if ENABLED(VIKI2) || ENABLED(miniVIKI)
  229. // #define LCD_SCREEN_ROT_180
  230. #undef BEEPER_PIN
  231. #define BEEPER_PIN P1_30 // may change if cable changes
  232. #define BTN_EN1 P3_26 // J3-2 & AUX-4
  233. #define BTN_EN2 P3_25 // J3-4 & AUX-4
  234. #define BTN_ENC P2_11 // J3-3 & AUX-4
  235. #define SD_DETECT_PIN P1_31 // not 5V tolerant J3-1 & AUX-3
  236. #define KILL_PIN P1_22 // J5-4 & AUX-4
  237. #undef DOGLCD_CS
  238. #define DOGLCD_CS P0_16
  239. #undef LCD_BACKLIGHT_PIN //P0_16 // J3-7 & AUX-4 - only used on DOGLCD controllers
  240. #undef LCD_PINS_ENABLE //P0_18 // (MOSI) J3-10 & AUX-3
  241. #undef LCD_PINS_D4 //P0_15 // (SCK) J3-9 & AUX-3
  242. #undef LCD_PINS_D5 //P2_6 // J3-8 & AUX-2
  243. #define DOGLCD_A0 P2_6 // J3-8 & AUX-2
  244. #undef LCD_PINS_D6 //P0_26 // J5-3 & AUX-2
  245. #undef LCD_PINS_D7 //P1_21 // (SERVO1) J5-1 & SERVO connector
  246. #define DOGLCD_SCK SCK_PIN
  247. #define DOGLCD_MOSI MOSI_PIN
  248. #define STAT_LED_BLUE_PIN P0_26 // may change if cable changes
  249. #define STAT_LED_RED_PIN P1_21 // may change if cable changes
  250. #endif
  251. //#define MISO_PIN P0_17 // system defined J3-10 & AUX-3
  252. //#define MOSI_PIN P0_18 // system defined J3-10 & AUX-3
  253. //#define SCK_PIN P0_15 // system defined J3-9 & AUX-3
  254. //#define SS_PIN P1_23 // system defined J3-5 & AUX-3 - sometimes called SDSS
  255. #if ENABLED(MINIPANEL)
  256. // GLCD features
  257. //#define LCD_CONTRAST 190
  258. // Uncomment screen orientation
  259. //#define LCD_SCREEN_ROT_90
  260. //#define LCD_SCREEN_ROT_180
  261. //#define LCD_SCREEN_ROT_270
  262. #endif
  263. #endif // ULTRA_LCD
  264. //
  265. // Ethernet pins
  266. //
  267. #ifndef ULTIPANEL
  268. #define ENET_MDIO P1_17 // J12-4
  269. #define ENET_RX_ER P1_14 // J12-6
  270. #define ENET_RXD1 P1_10 // J12-8
  271. #endif
  272. #define ENET_MOC P1_16 // J12-3
  273. #define REF_CLK P1_15 // J12-5
  274. #define ENET_RXD0 P1_9 // J12-7
  275. #define ENET_CRS P1_8 // J12-9
  276. #define ENET_TX_EN P1_4 // J12-10
  277. #define ENET_TXD0 P1_0 // J12-11
  278. #define ENET_TXD1 P1_1 // J12-12
  279. /**
  280. * PWMS
  281. *
  282. * There are 6 PWMS. Each PWM can be assigned to one of two pins.
  283. *
  284. * SERVO2 does NOT have a PWM assigned to it.
  285. *
  286. * PWM1.1 P0_18 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
  287. * PWM1.1 P2_0 E0_STEP_PIN
  288. * PWM1.2 P1_20 SERVO0_PIN
  289. * PWM1.2 P2_1 X_STEP_PIN
  290. * PWM1.3 P1_21 SERVO1_PIN J5-1
  291. * PWM1.3 P2_2 Y_STEP_PIN
  292. * PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
  293. * PWM1.4 P2_3 Z_STEP_PIN
  294. * PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
  295. * PWM1.5 P2_4 RAMPS_D9_PIN
  296. * PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
  297. * PWM1.6 P2_5 RAMPS_D10_PIN
  298. */
  299. /**
  300. * special pins
  301. * P1_30 - not 5V tolerant
  302. * P1_31 - not 5V tolerant
  303. * P0_27 - open collector
  304. * P0_28 - open collector
  305. *
  306. */