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_RURAMPS4D_13.h 9.0KB

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