My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

pins_RAMPS_14.h 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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 (Extruder, Fan, Bed)
  28. * RAMPS_14_EEB (Extruder, Extruder, Bed)
  29. * RAMPS_14_EFF (Extruder, Fan, Fan)
  30. * RAMPS_14_EEF (Extruder, Extruder, Fan)
  31. * RAMPS_14_SF (Spindle, Controller Fan)
  32. *
  33. * RAMPS_13_EFB (Extruder, Fan, Bed)
  34. * RAMPS_13_EEB (Extruder, Extruder, Bed)
  35. * RAMPS_13_EFF (Extruder, Fan, Fan)
  36. * RAMPS_13_EEF (Extruder, Extruder, 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. #define LARGE_FLASH true
  49. #ifdef IS_RAMPS_13
  50. #define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
  51. #else
  52. #define SERVO0_PIN 11
  53. #endif
  54. #define SERVO1_PIN 6
  55. #define SERVO2_PIN 5
  56. #define SERVO3_PIN 4
  57. #define X_STEP_PIN 54
  58. #define X_DIR_PIN 55
  59. #define X_ENABLE_PIN 38
  60. #define X_MIN_PIN 3
  61. #ifndef X_MAX_PIN
  62. #define X_MAX_PIN 2
  63. #endif
  64. #define Y_STEP_PIN 60
  65. #define Y_DIR_PIN 61
  66. #define Y_ENABLE_PIN 56
  67. #define Y_MIN_PIN 14
  68. #define Y_MAX_PIN 15
  69. #define Z_STEP_PIN 46
  70. #define Z_DIR_PIN 48
  71. #define Z_ENABLE_PIN 62
  72. #define Z_MIN_PIN 18
  73. #define Z_MAX_PIN 19
  74. #define E0_STEP_PIN 26
  75. #define E0_DIR_PIN 28
  76. #define E0_ENABLE_PIN 24
  77. #define E1_STEP_PIN 36
  78. #define E1_DIR_PIN 34
  79. #define E1_ENABLE_PIN 30
  80. #define SDSS 53
  81. #define LED_PIN 13
  82. // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
  83. #define FILWIDTH_PIN 5 // ANALOG NUMBERING
  84. #if ENABLED(Z_MIN_PROBE_ENDSTOP)
  85. // Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
  86. #define Z_MIN_PROBE_PIN 32
  87. #endif
  88. #if ENABLED(FILAMENT_RUNOUT_SENSOR)
  89. // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
  90. #define FILRUNOUT_PIN 4
  91. #endif
  92. #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF) || ENABLED(IS_RAMPS_EFB)
  93. #define FAN_PIN 9 // (Sprinter config)
  94. #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF)
  95. #define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller
  96. #endif
  97. #elif MB(RAMPS_14_EEF) || MB(RAMPS_14_SF) || MB(RAMPS_13_EEF) || MB(RAMPS_13_SF)
  98. #define FAN_PIN 8
  99. #else
  100. #define FAN_PIN 4 // IO pin. Buffer needed
  101. #endif
  102. #define PS_ON_PIN 12
  103. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
  104. #define KILL_PIN 41
  105. #endif
  106. #if MB(RAMPS_14_EFF) || MB(RAMPS_13_EFF)
  107. #define HEATER_0_PIN 8
  108. #else
  109. #define HEATER_0_PIN 10 // EXTRUDER 1
  110. #if !MB(RAMPS_14_EEF) && !MB(RAMPS_13_EEF) && !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF)
  111. #define HEATER_BED_PIN 8 // BED
  112. #endif
  113. #endif
  114. #if !MB(RAMPS_14_SF) && !MB(RAMPS_13_SF) && !ENABLED(IS_RAMPS_EFB)
  115. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  116. #endif
  117. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  118. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  119. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  120. #if ENABLED(Z_PROBE_SLED)
  121. #define SLED_PIN -1
  122. #endif
  123. #if ENABLED(ULTRA_LCD)
  124. #if ENABLED(NEWPANEL)
  125. #if ENABLED(PANEL_ONE)
  126. #define LCD_PINS_RS 40
  127. #define LCD_PINS_ENABLE 42
  128. #define LCD_PINS_D4 65
  129. #define LCD_PINS_D5 66
  130. #define LCD_PINS_D6 44
  131. #define LCD_PINS_D7 64
  132. #else
  133. #define LCD_PINS_RS 16
  134. #define LCD_PINS_ENABLE 17
  135. #define LCD_PINS_D4 23
  136. #define LCD_PINS_D5 25
  137. #define LCD_PINS_D6 27
  138. #define LCD_PINS_D7 29
  139. #endif
  140. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  141. #define BEEPER_PIN 37
  142. #define BTN_EN1 31
  143. #define BTN_EN2 33
  144. #define BTN_ENC 35
  145. #define SD_DETECT_PIN 49
  146. #elif ENABLED(LCD_I2C_PANELOLU2)
  147. #define BTN_EN1 47 // reverse if the encoder turns the wrong way.
  148. #define BTN_EN2 43
  149. #define BTN_ENC 32
  150. #define LCD_SDSS 53
  151. #define SD_DETECT_PIN -1
  152. #define KILL_PIN 41
  153. #elif ENABLED(LCD_I2C_VIKI)
  154. #define BTN_EN1 22 // reverse if the encoder turns the wrong way.
  155. #define BTN_EN2 7 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf
  156. // tells about 40/42.
  157. // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  158. #define BTN_ENC -1
  159. #define LCD_SDSS 53
  160. #define SD_DETECT_PIN 49
  161. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  162. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
  163. #define BTN_EN2 37
  164. #define BTN_ENC 31
  165. #define SD_DETECT_PIN 49
  166. #define LCD_SDSS 53
  167. #define KILL_PIN 41
  168. #define BEEPER_PIN 23
  169. #define DOGLCD_CS 29
  170. #define DOGLCD_A0 27
  171. #define LCD_PIN_BL 33
  172. #elif ENABLED(MINIPANEL)
  173. #define BEEPER_PIN 42
  174. // Pins for DOGM SPI LCD Support
  175. #define DOGLCD_A0 44
  176. #define DOGLCD_CS 66
  177. #define LCD_PIN_BL 65 // backlight LED on A11/D65
  178. #define SDSS 53
  179. #define KILL_PIN 64
  180. // GLCD features
  181. //#define LCD_CONTRAST 190
  182. // Uncomment screen orientation
  183. //#define LCD_SCREEN_ROT_90
  184. //#define LCD_SCREEN_ROT_180
  185. //#define LCD_SCREEN_ROT_270
  186. //The encoder and click button
  187. #define BTN_EN1 40
  188. #define BTN_EN2 63
  189. #define BTN_ENC 59 //the click switch
  190. //not connected to a pin
  191. #define SD_DETECT_PIN 49
  192. #else
  193. #define BEEPER_PIN 33 // Beeper on AUX-4
  194. // buttons are directly attached using AUX-2
  195. #if ENABLED(REPRAPWORLD_KEYPAD)
  196. #define BTN_EN1 64 // encoder
  197. #define BTN_EN2 59 // encoder
  198. #define BTN_ENC 63 // enter button
  199. #define SHIFT_OUT 40 // shift register
  200. #define SHIFT_CLK 44 // shift register
  201. #define SHIFT_LD 42 // shift register
  202. #elif ENABLED(PANEL_ONE)
  203. #define BTN_EN1 59 // AUX2 PIN 3
  204. #define BTN_EN2 63 // AUX2 PIN 4
  205. #define BTN_ENC 49 // AUX3 PIN 7
  206. #else
  207. #define BTN_EN1 37
  208. #define BTN_EN2 35
  209. #define BTN_ENC 31 // the click
  210. #endif
  211. #if ENABLED(G3D_PANEL)
  212. #define SD_DETECT_PIN 49
  213. #else
  214. // #define SD_DETECT_PIN -1 // Ramps doesn't use this
  215. #endif
  216. #endif
  217. #else // !NEWPANEL (Old-style panel with shift register)
  218. #define BEEPER_PIN 33 // No Beeper added
  219. // Buttons are attached to a shift register
  220. // Not wired yet
  221. //#define SHIFT_CLK 38
  222. //#define SHIFT_LD 42
  223. //#define SHIFT_OUT 40
  224. //#define SHIFT_EN 17
  225. #define LCD_PINS_RS 16
  226. #define LCD_PINS_ENABLE 17
  227. #define LCD_PINS_D4 23
  228. #define LCD_PINS_D5 25
  229. #define LCD_PINS_D6 27
  230. #define LCD_PINS_D7 29
  231. #endif // !NEWPANEL
  232. #endif // ULTRA_LCD
  233. // SPI for Max6675 or Max31855 Thermocouple
  234. #if DISABLED(SDSUPPORT)
  235. #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
  236. #else
  237. #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
  238. #endif
  239. #if DISABLED(SDSUPPORT)
  240. // these pins are defined in the SD library if building with SD support
  241. #define SCK_PIN 52
  242. #define MISO_PIN 50
  243. #define MOSI_PIN 51
  244. #endif
  245. #ifndef KILL_PIN
  246. // #define KILL_PIN -1
  247. #endif