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_FD_V1.h 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. * RAMPS-FD
  25. *
  26. * No EEPROM
  27. * Use 4k7 thermistor tables
  28. */
  29. #include "env_validate.h"
  30. #ifndef BOARD_INFO_NAME
  31. #define BOARD_INFO_NAME "RAMPS-FD v1"
  32. #endif
  33. #define INVERTED_HEATER_PINS
  34. #define INVERTED_BED_PINS
  35. #define INVERTED_FAN_PINS
  36. //
  37. // Servos
  38. //
  39. #define SERVO0_PIN 7
  40. #define SERVO1_PIN 6
  41. #define SERVO2_PIN 5
  42. #define SERVO3_PIN 3
  43. //
  44. // Limit Switches
  45. //
  46. #define X_MIN_PIN 22
  47. #define X_MAX_PIN 30
  48. #define Y_MIN_PIN 24
  49. #define Y_MAX_PIN 38
  50. #define Z_MIN_PIN 26
  51. #define Z_MAX_PIN 34
  52. //
  53. // Steppers
  54. //
  55. #define X_STEP_PIN 63
  56. #define X_DIR_PIN 62
  57. #define X_ENABLE_PIN 48
  58. #ifndef X_CS_PIN
  59. #define X_CS_PIN 68
  60. #endif
  61. #define Y_STEP_PIN 65
  62. #define Y_DIR_PIN 64
  63. #define Y_ENABLE_PIN 46
  64. #ifndef Y_CS_PIN
  65. #define Y_CS_PIN 60
  66. #endif
  67. #define Z_STEP_PIN 67
  68. #define Z_DIR_PIN 66
  69. #define Z_ENABLE_PIN 44
  70. #ifndef Z_CS_PIN
  71. #define Z_CS_PIN 58
  72. #endif
  73. #define E0_STEP_PIN 36
  74. #define E0_DIR_PIN 28
  75. #define E0_ENABLE_PIN 42
  76. #ifndef E0_CS_PIN
  77. #define E0_CS_PIN 67
  78. #endif
  79. #define E1_STEP_PIN 43
  80. #define E1_DIR_PIN 41
  81. #define E1_ENABLE_PIN 39
  82. #ifndef E1_CS_PIN
  83. #define E1_CS_PIN 61
  84. #endif
  85. #define E2_STEP_PIN 32
  86. #define E2_DIR_PIN 47
  87. #define E2_ENABLE_PIN 45
  88. #ifndef E2_CS_PIN
  89. #define E2_CS_PIN 59
  90. #endif
  91. //
  92. // Temperature Sensors
  93. //
  94. #define TEMP_0_PIN 1 // Analog Input
  95. #define TEMP_1_PIN 2 // Analog Input
  96. #define TEMP_2_PIN 3 // Analog Input
  97. #define TEMP_BED_PIN 0 // Analog Input
  98. // SPI for MAX Thermocouple
  99. #if DISABLED(SDSUPPORT)
  100. #define TEMP_0_CS_PIN 53
  101. #else
  102. #define TEMP_0_CS_PIN 49
  103. #endif
  104. //
  105. // Heaters / Fans
  106. //
  107. #define HEATER_0_PIN 9
  108. #define HEATER_1_PIN 10
  109. #define HEATER_2_PIN 11
  110. #define HEATER_BED_PIN 8
  111. #ifndef FAN_PIN
  112. #define FAN_PIN 12
  113. #endif
  114. //
  115. // Misc. Functions
  116. //
  117. #define SDSS 4
  118. #define LED_PIN 13
  119. /** ------ ------
  120. * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 76 (SCK)
  121. * 29 | 3 4 | 27 (EN2) 31 | 3 4 | 4 (SD_SS)
  122. * 25 5 6 | 23 (EN1) 33 5 6 | 75 (MOSI)
  123. * 16 | 7 8 | 17 (SDD) 49 | 7 8 | RESET
  124. * GND | 9 10 | 5V GND | 9 10 | --
  125. * ------ ------
  126. * EXP1 EXP2
  127. */
  128. #define EXP1_01_PIN 37
  129. #define EXP1_02_PIN 35
  130. #define EXP1_03_PIN 29
  131. #define EXP1_04_PIN 27
  132. #define EXP1_05_PIN 25
  133. #define EXP1_06_PIN 23
  134. #define EXP1_07_PIN 16
  135. #define EXP1_08_PIN 17
  136. #define EXP2_01_PIN 74
  137. #define EXP2_02_PIN 76
  138. #define EXP2_03_PIN 31
  139. #define EXP2_04_PIN 4
  140. #define EXP2_05_PIN 33
  141. #define EXP2_06_PIN 75
  142. #define EXP2_07_PIN 49
  143. #define EXP2_08_PIN -1
  144. //
  145. // LCD / Controller
  146. //
  147. #if HAS_WIRED_LCD
  148. // ramps-fd lcd adaptor
  149. #define BEEPER_PIN EXP1_01_PIN
  150. #define BTN_EN1 EXP2_05_PIN
  151. #define BTN_EN2 EXP2_03_PIN
  152. #define BTN_ENC EXP1_02_PIN
  153. #define SD_DETECT_PIN EXP2_07_PIN
  154. #if IS_NEWPANEL
  155. #define LCD_PINS_RS EXP1_07_PIN
  156. #define LCD_PINS_ENABLE EXP1_08_PIN
  157. #endif
  158. #if ENABLED(FYSETC_MINI_12864)
  159. #define DOGLCD_CS LCD_PINS_ENABLE
  160. #define DOGLCD_A0 LCD_PINS_RS
  161. #define DOGLCD_SCK EXP2_02_PIN
  162. #define DOGLCD_MOSI EXP2_06_PIN
  163. //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
  164. // results in LCD soft SPI mode 3, SD soft SPI mode 0
  165. #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally.
  166. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  167. #ifndef RGB_LED_R_PIN
  168. #define RGB_LED_R_PIN EXP1_05_PIN
  169. #endif
  170. #ifndef RGB_LED_G_PIN
  171. #define RGB_LED_G_PIN EXP1_04_PIN
  172. #endif
  173. #ifndef RGB_LED_B_PIN
  174. #define RGB_LED_B_PIN EXP1_03_PIN
  175. #endif
  176. #elif ENABLED(FYSETC_MINI_12864_2_1)
  177. #define NEOPIXEL_PIN EXP1_05_PIN
  178. #endif
  179. #elif IS_NEWPANEL
  180. #define LCD_PINS_D4 EXP1_06_PIN
  181. #define LCD_PINS_D5 EXP1_05_PIN
  182. #define LCD_PINS_D6 EXP1_04_PIN
  183. #define LCD_PINS_D7 EXP1_03_PIN
  184. #if ENABLED(MINIPANEL)
  185. #define DOGLCD_CS EXP1_05_PIN
  186. #define DOGLCD_A0 EXP1_04_PIN
  187. #endif
  188. #endif
  189. #if EITHER(VIKI2, miniVIKI)
  190. #define DOGLCD_A0 EXP1_07_PIN
  191. #define KILL_PIN 51
  192. #define STAT_LED_BLUE_PIN EXP1_03_PIN
  193. #define STAT_LED_RED_PIN EXP1_06_PIN
  194. #define DOGLCD_CS EXP1_08_PIN
  195. #define DOGLCD_SCK EXP2_02_PIN // SCK_PIN - Required for DUE Hardware SPI
  196. #define DOGLCD_MOSI EXP2_06_PIN // MOSI_PIN
  197. #define DOGLCD_MISO EXP2_01_PIN // MISO_PIN
  198. #endif
  199. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  200. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  201. #endif
  202. #endif // HAS_WIRED_LCD
  203. #if HAS_TMC_UART
  204. /**
  205. * TMC2208/TMC2209 stepper drivers
  206. *
  207. * Hardware serial communication ports.
  208. * If undefined software serial is used according to the pins below
  209. */
  210. //#define X_HARDWARE_SERIAL Serial1
  211. //#define X2_HARDWARE_SERIAL Serial1
  212. //#define Y_HARDWARE_SERIAL Serial1
  213. //#define Y2_HARDWARE_SERIAL Serial1
  214. //#define Z_HARDWARE_SERIAL Serial1
  215. //#define Z2_HARDWARE_SERIAL Serial1
  216. //#define E0_HARDWARE_SERIAL Serial1
  217. //#define E1_HARDWARE_SERIAL Serial1
  218. //#define E2_HARDWARE_SERIAL Serial1
  219. //#define E3_HARDWARE_SERIAL Serial1
  220. //#define E4_HARDWARE_SERIAL Serial1
  221. #endif
  222. //
  223. // M3/M4/M5 - Spindle/Laser Control
  224. //
  225. #if HOTENDS < 3 && HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
  226. #define SPINDLE_LASER_ENA_PIN 45 // Use E2 ENA
  227. #define SPINDLE_LASER_PWM_PIN 12 // Hardware PWM
  228. #define SPINDLE_DIR_PIN 47 // Use E2 DIR
  229. #endif