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 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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. //#if !defined(TARGET_LPC1768)
  36. #if DISABLED(IS_REARM)
  37. #error "Oops! Make sure you have Re-Arm selected."
  38. #endif
  39. #ifndef BOARD_NAME
  40. #define BOARD_NAME "Re-ARM RAMPS 1.4"
  41. #endif
  42. #define LARGE_FLASH true
  43. // unused
  44. #define D57 57
  45. #define D58 58
  46. //
  47. // Servos
  48. //
  49. #define SERVO0_PIN 11
  50. #define SERVO1_PIN 6 // also on J5-1
  51. #define SERVO2_PIN 5
  52. #define SERVO3_PIN 4 // 5V output - PWM capable
  53. //
  54. // Limit Switches
  55. //
  56. #define X_MIN_PIN 3 //10k pullup to 3.3V, 1K series
  57. #define X_MAX_PIN 2 //10k pullup to 3.3V, 1K series
  58. #define Y_MIN_PIN 14 //10k pullup to 3.3V, 1K series
  59. #define Y_MAX_PIN 15 //10k pullup to 3.3V, 1K series
  60. #define Z_MIN_PIN 18 //10k pullup to 3.3V, 1K series
  61. #define Z_MAX_PIN 19 //10k pullup to 3.3V, 1K series
  62. //#define Z_probe_pin 1 // AUX-1
  63. //
  64. // Steppers
  65. //
  66. #define X_STEP_PIN 54
  67. #define X_DIR_PIN 55
  68. #define X_ENABLE_PIN 38
  69. #define Y_STEP_PIN 60
  70. #define Y_DIR_PIN 61
  71. #define Y_ENABLE_PIN 56
  72. #define Z_STEP_PIN 46
  73. #define Z_DIR_PIN 48
  74. #define Z_ENABLE_PIN 62
  75. #define E0_STEP_PIN 26
  76. #define E0_DIR_PIN 28
  77. #define E0_ENABLE_PIN 24
  78. #define E1_STEP_PIN 36
  79. #define E1_DIR_PIN 34
  80. #define E1_ENABLE_PIN 30
  81. #define E2_STEP_PIN 36
  82. #define E2_DIR_PIN 34
  83. #define E2_ENABLE_PIN 30
  84. //
  85. // Temperature Sensors
  86. // 3.3V max when defined as an analog input
  87. //
  88. #define TEMP_0_PIN 0 //A0 (T0) - D67 - TEMP_0_PIN
  89. #define TEMP_BED_PIN 1 //A1 (T1) - D68 - TEMP_BED_PIN
  90. #define TEMP_1_PIN 2 //A2 (T2) - D69 - TEMP_1_PIN
  91. #define TEMP_2_PIN 3 //A3 - D63 - J5-3 & AUX-2
  92. #define TEMP_3_PIN 4 //A4 - D37 - BUZZER_PIN
  93. //#define TEMP_4_PIN 5 //A5 - D49 - SD_DETECT_PIN
  94. //#define ?? 6 //A6 - D0 - RXD0 - J4-4 & AUX-1
  95. #define FILWIDTH_PIN 7 //A7 - D1 - TXD0 - J4-5 & AUX-1
  96. //
  97. // Augmentation for auto-assigning RAMPS plugs
  98. //
  99. #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)
  100. #if HOTENDS > 1
  101. #if TEMP_SENSOR_BED
  102. #define IS_RAMPS_EEB
  103. #else
  104. #define IS_RAMPS_EEF
  105. #endif
  106. #elif TEMP_SENSOR_BED
  107. #define IS_RAMPS_EFB
  108. #else
  109. #define IS_RAMPS_EFF
  110. #endif
  111. #endif
  112. //
  113. // Heaters / Fans
  114. //
  115. #ifndef MOSFET_D_PIN
  116. #define MOSFET_D_PIN -1
  117. #endif
  118. #ifndef RAMPS_D8_PIN
  119. #define RAMPS_D8_PIN 8
  120. #endif
  121. #ifndef RAMPS_D9_PIN
  122. #define RAMPS_D9_PIN 9
  123. #endif
  124. #ifndef RAMPS_D10_PIN
  125. #define RAMPS_D10_PIN 10
  126. #endif
  127. #define HEATER_0_PIN RAMPS_D10_PIN
  128. #if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
  129. #define FAN_PIN RAMPS_D9_PIN
  130. #define HEATER_BED_PIN RAMPS_D8_PIN
  131. #elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
  132. #define HEATER_1_PIN RAMPS_D9_PIN
  133. #define FAN_PIN RAMPS_D8_PIN
  134. #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
  135. #define HEATER_1_PIN RAMPS_D9_PIN
  136. #define HEATER_BED_PIN RAMPS_D8_PIN
  137. #elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
  138. #define FAN_PIN RAMPS_D9_PIN
  139. #define FAN1_PIN RAMPS_D8_PIN
  140. #elif ENABLED(IS_RAMPS_SF) // Spindle, Fan
  141. #define FAN_PIN RAMPS_D8_PIN
  142. #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
  143. #define FAN_PIN RAMPS_D9_PIN
  144. #define HEATER_BED_PIN RAMPS_D8_PIN
  145. #if HOTENDS == 1
  146. #define FAN1_PIN MOSFET_D_PIN
  147. #else
  148. #define HEATER_1_PIN MOSFET_D_PIN
  149. #endif
  150. #endif
  151. #ifndef FAN_PIN
  152. #define FAN_PIN 4 // IO pin. Buffer needed
  153. #endif
  154. //
  155. // Misc. Functions
  156. //
  157. #define LED_PIN 13
  158. // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
  159. #define FIL_RUNOUT_PIN 4
  160. #define PS_ON_PIN 12
  161. #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
  162. #if !defined(NUM_SERVOS) || NUM_SERVOS < 4 // try to use servo connector
  163. #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM
  164. #endif
  165. #endif
  166. //
  167. // M3/M4/M5 - Spindle/Laser Control
  168. //
  169. #if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  170. #if !defined(NUM_SERVOS) || NUM_SERVOS == 1 // must use servo connector
  171. #undef SERVO1
  172. #undef SERVO2
  173. #undef SERVO3
  174. #define SPINDLE_LASER_ENABLE_PIN 6 // Pin should have a pullup/pulldown!
  175. #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM
  176. #define SPINDLE_DIR_PIN 5
  177. #endif
  178. #endif
  179. //
  180. // Průša i3 MK2 Multiplexer Support
  181. //
  182. #define E_MUX0_PIN 0 // Z_CS_PIN
  183. #define E_MUX1_PIN 1 // E0_CS_PIN
  184. #define E_MUX2_PIN 63 // E1_CS_PIN
  185. /**
  186. * LCD / Controller
  187. *
  188. * All controllers can use J3 and J5 on the Re-ARM board. Custom cabling will be required.
  189. */
  190. /**
  191. * Smart LCD adapter
  192. *
  193. * The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
  194. * REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
  195. * DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
  196. * is needed to pick up 5V for the EXP1 connection.
  197. *
  198. * SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
  199. * on the LCD display during accesses of the SD card. The menus/code has been arranged so
  200. * that the garbage/lines are erased immediately after the SD card accesses are completed.
  201. */
  202. #if ENABLED(ULTRA_LCD)
  203. #define BEEPER_PIN 37 // not 5V tolerant
  204. #define BTN_EN1 31 // J3-2 & AUX-4
  205. #define BTN_EN2 33 // J3-4 & AUX-4
  206. #define BTN_ENC 35 // J3-3 & AUX-4
  207. #define SD_DETECT_PIN 49 // not 5V tolerant J3-1 & AUX-3
  208. #define KILL_PIN 41 // J5-4 & AUX-4
  209. #define LCD_PINS_RS 16 // J3-7 & AUX-4
  210. #define LCD_SDSS 16 // J3-7 & AUX-4
  211. #define LCD_BACKLIGHT_PIN 16 // J3-7 & AUX-4 - only used on DOGLCD controllers
  212. #define LCD_PINS_ENABLE 51 // (MOSI) J3-10 & AUX-3
  213. #define LCD_PINS_D4 52 // (SCK) J3-9 & AUX-3
  214. #define DOGLCD_A0 59 // J3-8 & AUX-2
  215. #define DOGLCD_CS 63 // J5-3 & AUX-2
  216. #ifdef ULTIPANEL
  217. #define LCD_PINS_D5 71 // ENET_MDIO
  218. #define LCD_PINS_D6 73 // ENET_RX_ER
  219. #define LCD_PINS_D7 75 // ENET_RXD1
  220. #endif
  221. #if ENABLED(NEWPANEL)
  222. #if ENABLED(REPRAPWORLD_KEYPAD)
  223. #define SHIFT_OUT 51 // (MOSI) J3-10 & AUX-3
  224. #define SHIFT_CLK 52 // (SCK) J3-9 & AUX-3
  225. #define SHIFT_LD 49 // not 5V tolerant J3-1 & AUX-3
  226. #endif
  227. #else
  228. //#define SHIFT_CLK 31 // J3-2 & AUX-4
  229. //#define SHIFT_LD 33 // J3-4 & AUX-4
  230. //#define SHIFT_OUT 35 // J3-3 & AUX-4
  231. //#define SHIFT_EN 41 // J5-4 & AUX-4
  232. #endif
  233. #if ENABLED(SDSUPPORT)
  234. #define SDCARD_SORT_ALPHA // Using SORT feature to keep one directory level in RAM
  235. // When going up/down directory levels the SD card is
  236. // accessed but the garbage/lines are removed when the
  237. // LCD updates
  238. // SD Card Sorting options
  239. #if ENABLED(SDCARD_SORT_ALPHA)
  240. #define SDSORT_LIMIT 255 // Maximum number of sorted items (10-256). Costs 27 bytes each.
  241. #define FOLDER_SORTING -1 // -1=above 0=none 1=below
  242. #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
  243. #define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting.
  244. #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
  245. #define SDSORT_CACHE_NAMES true // Keep sorted items in RAM longer for speedy performance. Most expensive option.
  246. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
  247. #endif
  248. #endif
  249. #if ENABLED(VIKI2) || ENABLED(miniVIKI)
  250. // #define LCD_SCREEN_ROT_180
  251. #undef BEEPER_PIN
  252. #define BEEPER_PIN 37 // may change if cable changes
  253. #define BTN_EN1 31 // J3-2 & AUX-4
  254. #define BTN_EN2 33 // J3-4 & AUX-4
  255. #define BTN_ENC 35 // J3-3 & AUX-4
  256. #define SD_DETECT_PIN 49 // not 5V tolerant J3-1 & AUX-3
  257. #define KILL_PIN 41 // J5-4 & AUX-4
  258. #undef DOGLCD_CS
  259. #define DOGLCD_CS 16
  260. #undef LCD_BACKLIGHT_PIN //16 // J3-7 & AUX-4 - only used on DOGLCD controllers
  261. #undef LCD_PINS_ENABLE //51 // (MOSI) J3-10 & AUX-3
  262. #undef LCD_PINS_D4 //52 // (SCK) J3-9 & AUX-3
  263. #undef LCD_PINS_D5 //59 // J3-8 & AUX-2
  264. #define DOGLCD_A0 59 // J3-8 & AUX-2
  265. #undef LCD_PINS_D6 //63 // J5-3 & AUX-2
  266. #undef LCD_PINS_D7 //6 // (SERVO1) J5-1 & SERVO connector
  267. #define DOGLCD_SCK SCK_PIN
  268. #define DOGLCD_MOSI MOSI_PIN
  269. #define STAT_LED_BLUE_PIN 63 // may change if cable changes
  270. #define STAT_LED_RED_PIN 6 // may change if cable changes
  271. #endif
  272. //#define MISO_PIN 50 // system defined J3-10 & AUX-3
  273. //#define MOSI_PIN 51 // system defined J3-10 & AUX-3
  274. //#define SCK_PIN 52 // system defined J3-9 & AUX-3
  275. //#define SS_PIN 53 // system defined J3-5 & AUX-3 - sometimes called SDSS
  276. #if ENABLED(MINIPANEL)
  277. // GLCD features
  278. //#define LCD_CONTRAST 190
  279. // Uncomment screen orientation
  280. //#define LCD_SCREEN_ROT_90
  281. //#define LCD_SCREEN_ROT_180
  282. //#define LCD_SCREEN_ROT_270
  283. #endif
  284. #endif // ULTRA_LCD
  285. //
  286. // Ethernet pins
  287. //
  288. #ifndef ULTIPANEL
  289. #define ENET_MDIO 71 // J12-4
  290. #define ENET_RX_ER 73 // J12-6
  291. #define ENET_RXD1 75 // J12-8
  292. #endif
  293. #define ENET_MOC 70 // J12-3
  294. #define REF_CLK 72 // J12-5
  295. #define ENET_RXD0 74 // J12-7
  296. #define ENET_CRS 76 // J12-9
  297. #define ENET_TX_EN 77 // J12-10
  298. #define ENET_TXD0 78 // J12-11
  299. #define ENET_TXD1 79 // J12-12
  300. /**
  301. * PWMS
  302. *
  303. * There are 6 PWMS. Each PWM can be assigned to one of two pins.
  304. *
  305. * SERVO2 does NOT have a PWM assigned to it.
  306. *
  307. * PWM1.1 DIO4 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
  308. * PWM1.1 DIO26 E0_STEP_PIN
  309. * PWM1.2 DIO11 SERVO0_PIN
  310. * PWM1.2 DIO54 X_STEP_PIN
  311. * PWM1.3 DIO6 SERVO1_PIN J5-1
  312. * PWM1.3 DIO60 Y_STEP_PIN
  313. * PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3
  314. * PWM1.4 DIO46 Z_STEP_PIN
  315. * PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
  316. * PWM1.5 DIO9 RAMPS_D9_PIN
  317. * PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
  318. * PWM1.6 DIO10 RAMPS_D10_PIN
  319. */
  320. /**
  321. * The following pins are NOT available in a Re-ARM system
  322. * 7
  323. * 17
  324. * 22
  325. * 23
  326. * 25
  327. * 27
  328. * 29
  329. * 32
  330. * 39
  331. * 40
  332. * 42
  333. * 43
  334. * 44
  335. * 45
  336. * 47
  337. * 64
  338. * 65
  339. * 66
  340. */
  341. /**
  342. * special pins
  343. * D37 - not 5V tolerant
  344. * D49 - not 5V tolerant
  345. * D57 - open collector
  346. * D58 - open collector
  347. *
  348. */