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_MIGHTYBOARD_REVE.h 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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. #pragma once
  23. /**
  24. * Mightyboard Rev.E pin assignments
  25. * also works for Rev D boards. It's all rev E despite what the silk screen says
  26. */
  27. /**
  28. * Rev B 2 JAN 2017
  29. *
  30. * Added pin definitions for:
  31. * M3, M4 & M5 spindle control commands
  32. * case light
  33. *
  34. * Corrected pin assignment for EX2_HEAT_PIN pin. Changed it from 9 to 11. The port
  35. * number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
  36. */
  37. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  38. #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'"
  39. #endif
  40. #define BOARD_NAME "Mightyboard"
  41. #define DEFAULT_MACHINE_NAME "MB Replicator"
  42. //
  43. // Servos
  44. //
  45. #define SERVO0_PIN 36 // C1 (1280-EX1)
  46. #define SERVO1_PIN 37 // C0 (1280-EX2)
  47. #define SERVO2_PIN 40 // G1 (1280-EX3)
  48. #define SERVO3_PIN 41 // G0 (1280-EX4)
  49. //
  50. // Limit Switches
  51. //
  52. #define X_MIN_PIN 49 // L0
  53. #define X_MAX_PIN 48 // L1
  54. #define Y_MIN_PIN 47 // L2
  55. #define Y_MAX_PIN 46 // L3
  56. #define Z_MIN_PIN 43 // L6
  57. #define Z_MAX_PIN 42 // L7
  58. //
  59. // Z Probe (when not Z_MIN_PIN)
  60. //
  61. #ifndef Z_MIN_PROBE_PIN
  62. #define Z_MIN_PROBE_PIN 42
  63. #endif
  64. //
  65. // Filament Runout Pins
  66. //
  67. #ifndef FIL_RUNOUT_PIN
  68. #define FIL_RUNOUT_PIN 49
  69. #endif
  70. #ifndef FIL_RUNOUT2_PIN
  71. #define FIL_RUNOUT2_PIN 47
  72. #endif
  73. //
  74. // Steppers
  75. //
  76. #define X_STEP_PIN 55 // F1
  77. #define X_DIR_PIN 54 // F0
  78. #define X_ENABLE_PIN 56 // F2
  79. #define Y_STEP_PIN 59 // F5
  80. #define Y_DIR_PIN 58 // F4
  81. #define Y_ENABLE_PIN 60 // F6
  82. #define Z_STEP_PIN 63 // K1
  83. #define Z_DIR_PIN 62 // K0
  84. #define Z_ENABLE_PIN 64 // K2
  85. #define E0_STEP_PIN 25 // A3
  86. #define E0_DIR_PIN 24 // A2
  87. #define E0_ENABLE_PIN 26 // A4
  88. #define E1_STEP_PIN 29 // A7
  89. #define E1_DIR_PIN 28 // A6
  90. #define E1_ENABLE_PIN 39 // G2
  91. //
  92. // I2C Digipots - MCP4018
  93. // Address 5E (2F << 1)
  94. // Set from 0 - 127 with stop bit.
  95. // (Ex. 3F << 1 | 1)
  96. //
  97. #define DIGIPOTS_I2C_SCL 76 // J5
  98. #define DIGIPOTS_I2C_SDA_X 57 // F3
  99. #define DIGIPOTS_I2C_SDA_Y 61 // F7
  100. #define DIGIPOTS_I2C_SDA_Z 65 // K3
  101. #define DIGIPOTS_I2C_SDA_E0 27 // A5
  102. #define DIGIPOTS_I2C_SDA_E1 77 // J6
  103. #ifndef DIGIPOT_I2C_ADDRESS_A
  104. #define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1)
  105. #endif
  106. //
  107. // Temperature Sensors
  108. //
  109. // K7 - 69 / ADC15 - 15
  110. #define TEMP_BED_PIN 15
  111. // SPI for Max6675 or Max31855 Thermocouple
  112. // Uses a separate SPI bus
  113. //
  114. // 3 E5 DO (SO)
  115. // 5 E3 CS1
  116. // 2 E4 CS2
  117. // 78 E2 SCK
  118. //
  119. #define THERMO_SCK_PIN 78 // E2
  120. #define THERMO_DO_PIN 3 // E5
  121. #define THERMO_CS1_PIN 5 // E3
  122. #define THERMO_CS2_PIN 2 // E4
  123. #define MAX6675_SS_PIN THERMO_CS1_PIN
  124. #define MAX6675_SS2_PIN THERMO_CS2_PIN
  125. #define MAX6675_SCK_PIN THERMO_SCK_PIN
  126. #define MAX6675_DO_PIN THERMO_DO_PIN
  127. //
  128. // Augmentation for auto-assigning plugs
  129. //
  130. // Two thermocouple connectors allows for either
  131. // 2 extruders or 1 extruder and a heated bed.
  132. // With no heated bed, an additional 24V fan is possible.
  133. //
  134. // Labels from the schematic:
  135. #define EX1_HEAT_PIN 6 // H3
  136. #define EX1_FAN_PIN 7 // H4
  137. #define EX2_HEAT_PIN 11 // B5
  138. #define EX2_FAN_PIN 12 // B6
  139. #define HBP_PIN 45 // L4
  140. #define EXTRA_FET_PIN 44 // L5
  141. #if HOTENDS > 1
  142. #if TEMP_SENSOR_BED
  143. #define IS_EEB
  144. #else
  145. #define IS_EEF
  146. #endif
  147. #elif TEMP_SENSOR_BED
  148. #define IS_EFB
  149. #else
  150. #define IS_EFF
  151. #endif
  152. //
  153. // Heaters / Fans (24V)
  154. //
  155. #define HEATER_0_PIN EX1_HEAT_PIN
  156. #if ENABLED(IS_EFB) // Hotend, Fan, Bed
  157. #define HEATER_BED_PIN HBP_PIN
  158. #elif ENABLED(IS_EEF) // Hotend, Hotend, Fan
  159. #define HEATER_1_PIN EX2_HEAT_PIN
  160. #elif ENABLED(IS_EEB) // Hotend, Hotend, Bed
  161. #define HEATER_1_PIN EX2_HEAT_PIN
  162. #define HEATER_BED_PIN HBP_PIN
  163. #elif ENABLED(IS_EFF) // Hotend, Fan, Fan
  164. #define FAN1_PIN HBP_PIN
  165. #endif
  166. #ifndef FAN_PIN
  167. #if EITHER(IS_EFB, IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
  168. #define FAN_PIN EX2_HEAT_PIN
  169. #elif EITHER(IS_EEF, IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
  170. #define FAN_PIN HBP_PIN
  171. #else
  172. #define FAN_PIN EXTRA_FET_PIN
  173. #endif
  174. #endif
  175. //
  176. // Misc. Functions
  177. //
  178. #define LED_PIN 13 // B7
  179. #define CUTOFF_RESET_PIN 16 // H1
  180. #define CUTOFF_TEST_PIN 17 // H0
  181. //
  182. // LCD / Controller
  183. //
  184. #if HAS_SPI_LCD
  185. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  186. #define LCD_PINS_RS 33 // C4: LCD-STROBE
  187. #define LCD_PINS_ENABLE 72 // J2: LEFT
  188. #define LCD_PINS_D4 35 // C2: LCD-CLK
  189. #define LCD_PINS_D5 32 // C5: RLED
  190. #define LCD_PINS_D6 34 // C3: LCD-DATA
  191. #define LCD_PINS_D7 31 // C6: GLED
  192. #define BTN_EN2 75 // J4, UP
  193. #define BTN_EN1 73 // J3, DOWN
  194. //STOP button connected as KILL_PIN
  195. #define KILL_PIN 14 // J1, RIGHT
  196. //KILL - not connected
  197. #define BEEPER_PIN 8 // H5, SD_WP
  198. //on board leds
  199. #define STAT_LED_RED_LED SERVO0_PIN // C1 (1280-EX1, DEBUG2)
  200. #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
  201. #else
  202. // Replicator uses a 3-wire SR controller with HD44780
  203. #define SR_DATA_PIN 34 // C3
  204. #define SR_CLK_PIN 35 // C2
  205. #define SR_STROBE_PIN 33 // C4
  206. #define BTN_UP 75 // J4
  207. #define BTN_DWN 73 // J3
  208. #define BTN_LFT 72 // J2
  209. #define BTN_RT 14 // J1
  210. // Disable encoder
  211. #undef BTN_EN1
  212. #undef BTN_EN2
  213. #define BEEPER_PIN 4 // G5
  214. #define STAT_LED_RED_PIN 32 // C5
  215. #define STAT_LED_BLUE_PIN 31 // C6 (Actually green)
  216. #endif
  217. #define BTN_CENTER 15 // J0
  218. #define BTN_ENC BTN_CENTER
  219. #endif // HAS_SPI_LCD
  220. //
  221. // SD Card
  222. //
  223. #define SDSS 53 // B0
  224. #define SD_DETECT_PIN 9 // H6
  225. //
  226. //TMC 2208
  227. //
  228. #if HAS_DRIVER(TMC2208)
  229. /**
  230. * TMC2208 stepper drivers
  231. *
  232. * Hardware serial communication ports.
  233. * If undefined software serial is used according to the pins below
  234. */
  235. #define X_HARDWARE_SERIAL Serial2
  236. #define Y_HARDWARE_SERIAL Serial1
  237. /**
  238. * Software serial
  239. */
  240. #define X_SERIAL_TX_PIN 16
  241. #define X_SERIAL_RX_PIN 17
  242. #define Y_SERIAL_TX_PIN 18
  243. #define Y_SERIAL_RX_PIN 19
  244. #define Z_SERIAL_TX_PIN 41
  245. #define Z_SERIAL_RX_PIN 66
  246. #define E0_SERIAL_TX_PIN 40
  247. #define E0_SERIAL_RX_PIN 67
  248. #define E1_SERIAL_TX_PIN 37
  249. #define E1_SERIAL_RX_PIN 68
  250. #endif