My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pins_RURAMPS4D_11.h 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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 <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Arduino Mega? or Due with RuRAMPS4DUE pin assignments
  25. * Ported by sys0724 & Vynt
  26. */
  27. #include "env_validate.h"
  28. #define BOARD_INFO_NAME "RuRAMPS4Due v1.1"
  29. //
  30. // Servos
  31. //
  32. #define SERVO0_PIN 5
  33. #define SERVO1_PIN 3
  34. //
  35. // Limit Switches
  36. //
  37. #define X_MIN_PIN 45
  38. #define X_MAX_PIN 39
  39. #define Y_MIN_PIN 46
  40. #define Y_MAX_PIN 41
  41. #define Z_MIN_PIN 47
  42. #define Z_MAX_PIN 43
  43. //
  44. // Z Probe (when not Z_MIN_PIN)
  45. //
  46. #ifndef Z_MIN_PROBE_PIN
  47. #define Z_MIN_PROBE_PIN 43
  48. #endif
  49. //
  50. // Steppers
  51. //
  52. #define X_STEP_PIN 37 // Support Extension Board
  53. #define X_DIR_PIN 36
  54. #define X_ENABLE_PIN 38
  55. #ifndef X_CS_PIN
  56. #define X_CS_PIN -1
  57. #endif
  58. #define Y_STEP_PIN 32 // Support Extension Board
  59. #define Y_DIR_PIN 35
  60. #define Y_ENABLE_PIN 34
  61. #ifndef Y_CS_PIN
  62. #define Y_CS_PIN -1
  63. #endif
  64. #define Z_STEP_PIN 30 // Support Extension Board
  65. #define Z_DIR_PIN 2
  66. #define Z_ENABLE_PIN 33
  67. #ifndef Z_CS_PIN
  68. #define Z_CS_PIN -1
  69. #endif
  70. #define E0_STEP_PIN 29
  71. #define E0_DIR_PIN 28
  72. #define E0_ENABLE_PIN 31
  73. #ifndef E0_CS_PIN
  74. #define E0_CS_PIN -1
  75. #endif
  76. #define E1_STEP_PIN 22
  77. #define E1_DIR_PIN 24
  78. #define E1_ENABLE_PIN 26
  79. #ifndef E1_CS_PIN
  80. #define E1_CS_PIN -1
  81. #endif
  82. #define E2_STEP_PIN 25
  83. #define E2_DIR_PIN 23
  84. #define E2_ENABLE_PIN 27
  85. #ifndef E2_CS_PIN
  86. #define E2_CS_PIN -1
  87. #endif
  88. #define E3_STEP_PIN 15 // Only For Extension Board
  89. #define E3_DIR_PIN 14
  90. #define E3_ENABLE_PIN 61
  91. #ifndef E3_CS_PIN
  92. #define E3_CS_PIN -1
  93. #endif
  94. // For Future: Microstepping pins - Mapping not from fastio.h (?)
  95. //#define E3_MS1_PIN ?
  96. //#define E3_MS2_PIN ?
  97. //#define E3_MS3_PIN ?
  98. #ifndef FIL_RUNOUT_PIN
  99. #define FIL_RUNOUT_PIN Y_MIN_PIN
  100. #endif
  101. //
  102. // Heaters / Fans
  103. //
  104. #define HEATER_0_PIN 13
  105. #define HEATER_1_PIN 12
  106. #define HEATER_2_PIN 11
  107. #define HEATER_BED_PIN 7 // BED H1
  108. #ifndef FAN_PIN
  109. #define FAN_PIN 9
  110. #endif
  111. #define FAN1_PIN 8
  112. #define CONTROLLER_FAN_PIN -1
  113. //
  114. // Temperature Sensors
  115. //
  116. #define TEMP_0_PIN 0 // ANALOG A0
  117. #define TEMP_1_PIN 1 // ANALOG A1
  118. #define TEMP_2_PIN 2 // ANALOG A2
  119. #define TEMP_3_PIN 3 // ANALOG A3
  120. #define TEMP_BED_PIN 4 // ANALOG A4
  121. // The thermocouple uses Analog pins
  122. #if ENABLED(VER_WITH_THERMOCOUPLE) // Defined in Configuration.h
  123. #define TEMP_4_PIN 5 // A5
  124. #define TEMP_5_PIN 6 // A6 (Marlin 2.0 not support)
  125. #endif
  126. // SPI for MAX Thermocouple
  127. /*
  128. #if DISABLED(SDSUPPORT)
  129. #define TEMP_0_CS_PIN EXP1_08_PIN
  130. #else
  131. #define TEMP_0_CS_PIN 49
  132. #endif
  133. */
  134. //
  135. // Misc. Functions
  136. //
  137. #define SDSS 4 // 4,10,52 if using HW SPI.
  138. #define LED_PIN -1 // 13 - HEATER_0_PIN
  139. #define PS_ON_PIN -1 // 65
  140. // MKS TFT / Nextion Use internal USART-1
  141. #define TFT_LCD_MODULE_COM 1
  142. #define TFT_LCD_MODULE_BAUDRATE 115600
  143. // ESP WiFi Use internal USART-2
  144. #define ESP_WIFI_MODULE_COM 2
  145. #define ESP_WIFI_MODULE_BAUDRATE 115600
  146. #define ESP_WIFI_MODULE_RESET_PIN -1
  147. #define PIGGY_GPIO_PIN -1
  148. //
  149. // EEPROM
  150. //
  151. #define MARLIN_EEPROM_SIZE 0x8000 // 32K (24lc256)
  152. #define I2C_EEPROM // EEPROM on I2C-0
  153. //#define EEPROM_SD // EEPROM on SDCARD
  154. //#define SPI_EEPROM // EEPROM on SPI-0
  155. //#define SPI_CHAN_EEPROM1 ?
  156. //#define SPI_EEPROM1_CS_PIN ?
  157. // 2K EEPROM
  158. //#define SPI_EEPROM2_CS_PIN ?
  159. // 32Mb FLASH
  160. //#define SPI_FLASH_CS_PIN ?
  161. /**
  162. * ------ ------
  163. * (BEEPER) 62 | 1 2 | 40 (BTN_ENC) (MISO) 74 | 1 2 | 76 (SCK)
  164. * (LCD_EN) 64 | 3 4 | 63 (LCD_RS) (BTN_EN1) 44 | 3 4 | 10 (SD_SS)
  165. * (LCD_D4) 48 | 5 6 50 (LCD_D5) (BTN_EN2) 42 | 5 6 75 (MOSI)
  166. * (LCD_D6) 52 | 7 8 | 53 (LCD_D7) (SD_DETECT) 51 | 7 8 | RESET
  167. * GND | 9 10 | 5V GND | 9 10 | --
  168. * ------ ------
  169. * EXP1 EXP2
  170. */
  171. #define EXP1_01_PIN 62
  172. #define EXP1_02_PIN 40
  173. #define EXP1_03_PIN 64
  174. #define EXP1_04_PIN 63
  175. #define EXP1_05_PIN 48
  176. #define EXP1_06_PIN 50
  177. #define EXP1_07_PIN 52
  178. #define EXP1_08_PIN 53
  179. #define EXP2_01_PIN 74 // MISO
  180. #define EXP2_02_PIN 76 // SCK
  181. #define EXP2_03_PIN 44
  182. #define EXP2_04_PIN 10
  183. #define EXP2_05_PIN 42
  184. #define EXP2_06_PIN 75 // MOSI
  185. #define EXP2_07_PIN 51
  186. #define EXP2_08_PIN -1 // RESET
  187. //
  188. // LCD / Controller
  189. //
  190. #if HAS_WIRED_LCD
  191. #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC)
  192. #define BEEPER_PIN EXP1_01_PIN
  193. #define LCD_PINS_D4 EXP1_05_PIN
  194. #define LCD_PINS_D5 EXP1_06_PIN
  195. #define LCD_PINS_D6 EXP1_07_PIN
  196. #define LCD_PINS_D7 EXP1_08_PIN
  197. #define SD_DETECT_PIN EXP2_07_PIN
  198. #endif
  199. #if EITHER(RADDS_DISPLAY, IS_RRD_SC)
  200. #define LCD_PINS_RS EXP1_04_PIN
  201. #define LCD_PINS_ENABLE EXP1_03_PIN
  202. #elif IS_RRD_FG_SC
  203. #define LCD_PINS_RS EXP1_07_PIN
  204. #define LCD_PINS_ENABLE EXP1_08_PIN
  205. #elif HAS_U8GLIB_I2C_OLED
  206. #define BEEPER_PIN EXP1_01_PIN
  207. #define LCD_SDSS EXP2_04_PIN
  208. #define SD_DETECT_PIN EXP2_07_PIN
  209. #elif ENABLED(FYSETC_MINI_12864)
  210. #define BEEPER_PIN EXP1_01_PIN
  211. #define DOGLCD_CS EXP1_03_PIN
  212. #define DOGLCD_A0 EXP1_04_PIN
  213. //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
  214. // results in LCD soft SPI mode 3, SD soft SPI mode 0
  215. #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
  216. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  217. #ifndef RGB_LED_R_PIN
  218. #define RGB_LED_R_PIN EXP1_06_PIN // D5
  219. #endif
  220. #ifndef RGB_LED_G_PIN
  221. #define RGB_LED_G_PIN EXP1_07_PIN // D6
  222. #endif
  223. #ifndef RGB_LED_B_PIN
  224. #define RGB_LED_B_PIN EXP1_08_PIN // D7
  225. #endif
  226. #elif ENABLED(FYSETC_MINI_12864_2_1)
  227. #define NEOPIXEL_PIN EXP1_06_PIN // D5
  228. #endif
  229. #elif ENABLED(SPARK_FULL_GRAPHICS)
  230. //http://doku.radds.org/dokumentation/other-electronics/sparklcd/
  231. #error "Oops! SPARK_FULL_GRAPHICS not supported with RURAMPS4D."
  232. //#define LCD_PINS_D4 29 //?
  233. //#define LCD_PINS_ENABLE 27 //?
  234. //#define LCD_PINS_RS 25 //?
  235. //#define BTN_EN1 35 //?
  236. //#define BTN_EN2 33 //?
  237. //#define BTN_ENC 37 //?
  238. #endif // SPARK_FULL_GRAPHICS
  239. #if IS_NEWPANEL
  240. #define BTN_EN1 EXP2_03_PIN
  241. #define BTN_EN2 EXP2_05_PIN
  242. #define BTN_ENC EXP1_02_PIN
  243. #endif
  244. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  245. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  246. #endif
  247. #endif // HAS_WIRED_LCD