My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins_RAMPS.h 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
  24. *
  25. * Applies to the following boards:
  26. *
  27. * RAMPS_14_EFB (Hotend, Fan, Bed)
  28. * RAMPS_14_EEB (Hotend0, Hotend1, Bed)
  29. * RAMPS_14_EFF (Hotend, Fan0, Fan1)
  30. * RAMPS_14_EEF (Hotend0, Hotend1, Fan)
  31. * RAMPS_14_SF (Spindle, Controller Fan)
  32. *
  33. * RAMPS_13_EFB (Hotend, Fan, Bed)
  34. * RAMPS_13_EEB (Hotend0, Hotend1, Bed)
  35. * RAMPS_13_EFF (Hotend, Fan0, Fan1)
  36. * RAMPS_13_EEF (Hotend0, Hotend1, Fan)
  37. * RAMPS_13_SF (Spindle, Controller Fan)
  38. *
  39. * Other pins_MYBOARD.h files may override these defaults
  40. *
  41. * Differences between
  42. * RAMPS_13 | RAMPS_14
  43. * 7 | 11
  44. */
  45. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  46. #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
  47. #endif
  48. #ifndef BOARD_NAME
  49. #define BOARD_NAME "RAMPS 1.4"
  50. #endif
  51. #define LARGE_FLASH true
  52. //
  53. // Servos
  54. //
  55. #ifdef IS_RAMPS_13
  56. #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
  57. #else
  58. #define SERVO0_PIN 11
  59. #endif
  60. #define SERVO1_PIN 6
  61. #define SERVO2_PIN 5
  62. #define SERVO3_PIN 4
  63. //
  64. // Limit Switches
  65. //
  66. #define X_MIN_PIN 3
  67. #ifndef X_MAX_PIN
  68. #define X_MAX_PIN 2
  69. #endif
  70. #define Y_MIN_PIN 14
  71. #define Y_MAX_PIN 15
  72. #define Z_MIN_PIN 18
  73. #define Z_MAX_PIN 19
  74. //
  75. // Z Probe (when not Z_MIN_PIN)
  76. //
  77. #ifndef Z_MIN_PROBE_PIN
  78. #define Z_MIN_PROBE_PIN 32
  79. #endif
  80. #define SLED_PIN -1
  81. //
  82. // Steppers
  83. //
  84. #define X_STEP_PIN 54
  85. #define X_DIR_PIN 55
  86. #define X_ENABLE_PIN 38
  87. #define X_CS_PIN 53
  88. #define Y_STEP_PIN 60
  89. #define Y_DIR_PIN 61
  90. #define Y_ENABLE_PIN 56
  91. #define Y_CS_PIN 49
  92. #define Z_STEP_PIN 46
  93. #define Z_DIR_PIN 48
  94. #define Z_ENABLE_PIN 62
  95. #define Z_CS_PIN 40
  96. #define E0_STEP_PIN 26
  97. #define E0_DIR_PIN 28
  98. #define E0_ENABLE_PIN 24
  99. #define E0_CS_PIN 42
  100. #define E1_STEP_PIN 36
  101. #define E1_DIR_PIN 34
  102. #define E1_ENABLE_PIN 30
  103. #define E1_CS_PIN 44
  104. //
  105. // Temperature Sensors
  106. //
  107. #define TEMP_0_PIN 13 // Analog Input
  108. #define TEMP_1_PIN 15 // Analog Input
  109. #define TEMP_BED_PIN 14 // Analog Input
  110. // SPI for Max6675 or Max31855 Thermocouple
  111. #if DISABLED(SDSUPPORT)
  112. #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
  113. #else
  114. #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
  115. #endif
  116. //
  117. // Augmentation for auto-assigning RAMPS plugs
  118. //
  119. #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)
  120. #if HOTENDS > 1
  121. #if TEMP_SENSOR_BED
  122. #define IS_RAMPS_EEB
  123. #else
  124. #define IS_RAMPS_EEF
  125. #endif
  126. #elif TEMP_SENSOR_BED
  127. #define IS_RAMPS_EFB
  128. #else
  129. #define IS_RAMPS_EFF
  130. #endif
  131. #endif
  132. //
  133. // Heaters / Fans
  134. //
  135. #ifndef MOSFET_D_PIN
  136. #define MOSFET_D_PIN -1
  137. #endif
  138. #ifndef RAMPS_D8_PIN
  139. #define RAMPS_D8_PIN 8
  140. #endif
  141. #ifndef RAMPS_D9_PIN
  142. #define RAMPS_D9_PIN 9
  143. #endif
  144. #ifndef RAMPS_D10_PIN
  145. #define RAMPS_D10_PIN 10
  146. #endif
  147. #define HEATER_0_PIN RAMPS_D10_PIN
  148. #if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
  149. #define FAN_PIN RAMPS_D9_PIN
  150. #define HEATER_BED_PIN RAMPS_D8_PIN
  151. #elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
  152. #define HEATER_1_PIN RAMPS_D9_PIN
  153. #define FAN_PIN RAMPS_D8_PIN
  154. #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
  155. #define HEATER_1_PIN RAMPS_D9_PIN
  156. #define HEATER_BED_PIN RAMPS_D8_PIN
  157. #elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
  158. #define FAN_PIN RAMPS_D9_PIN
  159. #define FAN1_PIN RAMPS_D8_PIN
  160. #elif ENABLED(IS_RAMPS_SF) // Spindle, Fan
  161. #define FAN_PIN RAMPS_D8_PIN
  162. #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
  163. #define FAN_PIN RAMPS_D9_PIN
  164. #define HEATER_BED_PIN RAMPS_D8_PIN
  165. #if HOTENDS == 1
  166. #define FAN1_PIN MOSFET_D_PIN
  167. #else
  168. #define HEATER_1_PIN MOSFET_D_PIN
  169. #endif
  170. #endif
  171. #ifndef FAN_PIN
  172. #define FAN_PIN 4 // IO pin. Buffer needed
  173. #endif
  174. //
  175. // Misc. Functions
  176. //
  177. #define SDSS 53
  178. #define LED_PIN 13
  179. // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
  180. #define FILWIDTH_PIN 5 // Analog Input
  181. // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
  182. #define FIL_RUNOUT_PIN 4
  183. #define PS_ON_PIN 12
  184. //
  185. // LCD / Controller
  186. //
  187. #if ENABLED(ULTRA_LCD)
  188. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  189. #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  190. #define LCD_PINS_ENABLE 51 // SID (MOSI)
  191. #define LCD_PINS_D4 52 // SCK (CLK) clock
  192. #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
  193. #define LCD_PINS_RS 40
  194. #define LCD_PINS_ENABLE 42
  195. #define LCD_PINS_D4 65
  196. #define LCD_PINS_D5 66
  197. #define LCD_PINS_D6 44
  198. #define LCD_PINS_D7 64
  199. #else
  200. #define LCD_PINS_RS 16
  201. #define LCD_PINS_ENABLE 17
  202. #define LCD_PINS_D4 23
  203. #define LCD_PINS_D5 25
  204. #define LCD_PINS_D6 27
  205. #define LCD_PINS_D7 29
  206. #if DISABLED(NEWPANEL)
  207. #define BEEPER_PIN 33
  208. // Buttons are attached to a shift register
  209. // Not wired yet
  210. //#define SHIFT_CLK 38
  211. //#define SHIFT_LD 42
  212. //#define SHIFT_OUT 40
  213. //#define SHIFT_EN 17
  214. #endif
  215. #endif
  216. #if ENABLED(NEWPANEL)
  217. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  218. #define BEEPER_PIN 37
  219. #define BTN_EN1 31
  220. #define BTN_EN2 33
  221. #define BTN_ENC 35
  222. #define SD_DETECT_PIN 49
  223. #define KILL_PIN 41
  224. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  225. #define LCD_BACKLIGHT_PIN 39
  226. #endif
  227. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  228. #define BTN_EN1 64
  229. #define BTN_EN2 59
  230. #define BTN_ENC 63
  231. #define SD_DETECT_PIN 42
  232. #elif ENABLED(LCD_I2C_PANELOLU2)
  233. #define BTN_EN1 47 // reverse if the encoder turns the wrong way.
  234. #define BTN_EN2 43
  235. #define BTN_ENC 32
  236. #define LCD_SDSS 53
  237. #define SD_DETECT_PIN -1
  238. #define KILL_PIN 41
  239. #elif ENABLED(LCD_I2C_VIKI)
  240. #define BTN_EN1 22 // reverse if the encoder turns the wrong way.
  241. #define BTN_EN2 7 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf
  242. // tells about 40/42.
  243. // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  244. #define BTN_ENC -1
  245. #define LCD_SDSS 53
  246. #define SD_DETECT_PIN 49
  247. #elif ENABLED(VIKI2) || ENABLED(miniVIKI)
  248. #define BEEPER_PIN 33
  249. // Pins for DOGM SPI LCD Support
  250. #define DOGLCD_A0 44
  251. #define DOGLCD_CS 45
  252. #define LCD_SCREEN_ROT_180
  253. #define BTN_EN1 22
  254. #define BTN_EN2 7
  255. #define BTN_ENC 39
  256. #define SDSS 53
  257. #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
  258. #define KILL_PIN 31
  259. #define STAT_LED_RED_PIN 32
  260. #define STAT_LED_BLUE_PIN 35
  261. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  262. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
  263. #define BTN_EN2 37
  264. #define BTN_ENC 31
  265. #define SD_DETECT_PIN 49
  266. #define LCD_SDSS 53
  267. #define KILL_PIN 41
  268. #define BEEPER_PIN 23
  269. #define DOGLCD_CS 29
  270. #define DOGLCD_A0 27
  271. #define LCD_BACKLIGHT_PIN 33
  272. #elif ENABLED(MINIPANEL)
  273. #define BEEPER_PIN 42
  274. // Pins for DOGM SPI LCD Support
  275. #define DOGLCD_A0 44
  276. #define DOGLCD_CS 66
  277. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  278. #define SDSS 53
  279. #define KILL_PIN 64
  280. // GLCD features
  281. //#define LCD_CONTRAST 190
  282. // Uncomment screen orientation
  283. //#define LCD_SCREEN_ROT_90
  284. //#define LCD_SCREEN_ROT_180
  285. //#define LCD_SCREEN_ROT_270
  286. // The encoder and click button
  287. #define BTN_EN1 40
  288. #define BTN_EN2 63
  289. #define BTN_ENC 59
  290. // not connected to a pin
  291. #define SD_DETECT_PIN 49
  292. #else
  293. // Beeper on AUX-4
  294. #define BEEPER_PIN 33
  295. // buttons are directly attached using AUX-2
  296. #if ENABLED(REPRAPWORLD_KEYPAD)
  297. #define BTN_EN1 64 // encoder
  298. #define BTN_EN2 59 // encoder
  299. #define BTN_ENC 63 // enter button
  300. #define SHIFT_OUT 40 // shift register
  301. #define SHIFT_CLK 44 // shift register
  302. #define SHIFT_LD 42 // shift register
  303. #elif ENABLED(PANEL_ONE)
  304. #define BTN_EN1 59 // AUX2 PIN 3
  305. #define BTN_EN2 63 // AUX2 PIN 4
  306. #define BTN_ENC 49 // AUX3 PIN 7
  307. #else
  308. #define BTN_EN1 37
  309. #define BTN_EN2 35
  310. #define BTN_ENC 31 // the click
  311. #endif
  312. #if ENABLED(G3D_PANEL)
  313. #define SD_DETECT_PIN 49
  314. #define KILL_PIN 41
  315. #else
  316. //#define SD_DETECT_PIN -1 // Ramps doesn't use this
  317. #endif
  318. #endif
  319. #endif // NEWPANEL
  320. #endif // ULTRA_LCD