My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

pins_MIGHTYBOARD_REVE.h 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. * Mightyboard Rev.E pin assignments
  24. */
  25. /**
  26. *
  27. * This is a starting-point to support the Makerbot Replicator series of 3D printers.
  28. * It's not functional because Marlin has limited support for some features.
  29. * Marlin will need the following augmentations before it will be supportable:
  30. *
  31. * - Support for two or more MAX6675 thermocouples
  32. * - Support for multiple i2c buses to control the MCP4018 digital pots
  33. * - Support for one additional unidirectional SPI bus, to read the thermocouples
  34. * - Support for an RGB LED that may work differently from BLINKM
  35. *
  36. * The MCP4018 requires separate I2C buses because it has a fixed address (0x2F << 1 = 0x5E)
  37. * The thermocouples share the same SCK and DO pins, with their own CS pins.
  38. * The controller interface port connects to a 3-wire shift-register display controller
  39. *
  40. */
  41. /**
  42. * Rev B 2 JAN 2017
  43. *
  44. * Added pin definitions for:
  45. * M3, M4 & M5 spindle control commands
  46. * case light
  47. *
  48. * Corrected pin assignment for MOSFET_B_PIN pin. Changed it from 9 to 11. The port
  49. * number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
  50. */
  51. #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
  52. #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'"
  53. #endif
  54. #define DEFAULT_MACHINE_NAME "MB Replicator"
  55. #define BOARD_NAME "Mightyboard"
  56. //
  57. // Servos
  58. //
  59. #define SERVO0_PIN 36 // C1 (1280-EX1)
  60. #define SERVO1_PIN 37 // C0 (1280-EX2)
  61. #define SERVO2_PIN 40 // G1 (1280-EX3)
  62. #define SERVO3_PIN 41 // G0 (1280-EX4)
  63. //
  64. // Limit Switches
  65. //
  66. #define X_MIN_PIN 49 // L0
  67. #define X_MAX_PIN 48 // L1
  68. #define Y_MIN_PIN 47 // L2
  69. #define Y_MAX_PIN 46 // L3
  70. #define Z_MIN_PIN 43 // L6
  71. #define Z_MAX_PIN 42 // L7
  72. //
  73. // Z Probe (when not Z_MIN_PIN)
  74. //
  75. #ifndef Z_MIN_PROBE_PIN
  76. #define Z_MIN_PROBE_PIN 42
  77. #endif
  78. //
  79. // Steppers
  80. //
  81. #define X_STEP_PIN 55 // F1
  82. #define X_DIR_PIN 54 // F0
  83. #define X_ENABLE_PIN 56 // F2
  84. #define Y_STEP_PIN 59 // F5
  85. #define Y_DIR_PIN 58 // F4
  86. #define Y_ENABLE_PIN 60 // F6
  87. #define Z_STEP_PIN 63 // K1
  88. #define Z_DIR_PIN 62 // K0
  89. #define Z_ENABLE_PIN 64 // K2
  90. #define E0_STEP_PIN 25 // A3
  91. #define E0_DIR_PIN 24 // A2
  92. #define E0_ENABLE_PIN 26 // A4
  93. #define E1_STEP_PIN 29 // A7
  94. #define E1_DIR_PIN 28 // A6
  95. #define E1_ENABLE_PIN 39 // G2
  96. //
  97. // I2C Digipots - MCP4018
  98. // Address 5E (2F << 1)
  99. // Set from 0 - 127 with stop bit.
  100. // (Ex. 3F << 1 | 1)
  101. //
  102. #define DIGIPOTS_I2C_SCL 76 // J5
  103. #define DIGIPOTS_I2C_SDA_X 57 // F3
  104. #define DIGIPOTS_I2C_SDA_Y 61 // F7
  105. #define DIGIPOTS_I2C_SDA_Z 65 // K3
  106. #define DIGIPOTS_I2C_SDA_E0 27 // A5
  107. #define DIGIPOTS_I2C_SDA_E1 77 // J6
  108. #define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1)
  109. //
  110. // Temperature Sensors
  111. //
  112. #define TEMP_BED_PIN 15 // K7 - 69 / ADC15 - 15
  113. // SPI for Max6675 or Max31855 Thermocouple
  114. // Uses a separate SPI bus
  115. //
  116. // 3 E5 DO (SO)
  117. // 5 E3 CS1
  118. // 2 E4 CS2
  119. // 78 E2 SCK
  120. //
  121. #define THERMO_SCK_PIN 78 // E2
  122. #define THERMO_DO_PIN 3 // E5
  123. #define THERMO_CS1 5 // E3
  124. #define THERMO_CS2 2 // E4
  125. #define MAX6675_SS THERMO_CS1
  126. #define MAX6675_SCK_PIN THERMO_SCK_PIN
  127. #define MAX6675_DO_PIN THERMO_DO_PIN
  128. //
  129. // Augmentation for auto-assigning plugs
  130. //
  131. // Two thermocouple connectors allows for either
  132. // 2 extruders or 1 extruder and a heated bed.
  133. // With no heated bed, an additional 24V fan is possible.
  134. //
  135. #define MOSFET_A_PIN 6 // H3
  136. #define MOSFET_B_PIN 11 // B5 - Rev A of this file had this pin assigned to 9
  137. #define MOSFET_C_PIN 45 // L4
  138. #define MOSFET_D_PIN 44 // L5
  139. #if HOTENDS > 1
  140. #if TEMP_SENSOR_BED
  141. #define IS_EEB
  142. #else
  143. #define IS_EEF
  144. #endif
  145. #elif TEMP_SENSOR_BED
  146. #define IS_EFB
  147. #else
  148. #define IS_EFF
  149. #endif
  150. //
  151. // Heaters / Fans (24V)
  152. //
  153. #define HEATER_0_PIN MOSFET_A_PIN
  154. #if ENABLED(IS_EFB) // Hotend, Fan, Bed
  155. #define HEATER_BED_PIN MOSFET_C_PIN
  156. #elif ENABLED(IS_EEF) // Hotend, Hotend, Fan
  157. #define HEATER_1_PIN MOSFET_B_PIN
  158. #elif ENABLED(IS_EEB) // Hotend, Hotend, Bed
  159. #define HEATER_1_PIN MOSFET_B_PIN
  160. #define HEATER_BED_PIN MOSFET_C_PIN
  161. #elif ENABLED(IS_EFF) // Hotend, Fan, Fan
  162. #define FAN1_PIN MOSFET_C_PIN
  163. #endif
  164. #ifndef FAN_PIN
  165. #if ENABLED(IS_EFB) || ENABLED(IS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
  166. #define FAN_PIN MOSFET_B_PIN
  167. #elif ENABLED(IS_EEF) || ENABLED(IS_SF) // Hotend, Hotend, Fan or Spindle, Fan
  168. #define FAN_PIN MOSFET_C_PIN
  169. #else
  170. #define FAN_PIN MOSFET_D_PIN
  171. #endif
  172. #endif
  173. //
  174. // Extruder Auto Fan Pins
  175. //
  176. #define ORIG_E0_AUTO_FAN_PIN 7 // H4
  177. #define ORIG_E1_AUTO_FAN_PIN 12 // B6
  178. //
  179. // Misc. Functions
  180. //
  181. #define LED_PIN 13 // B7
  182. #define CUTOFF_RESET_PIN 16 // H1
  183. #define CUTOFF_TEST_PIN 17 // H0
  184. #define CASE_LIGHT_PIN 44 // L5 MUST BE HARDWARE PWM
  185. //
  186. // LCD / Controller
  187. //
  188. #ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  189. #define LCD_PINS_RS 33 // C4: LCD-STROBE
  190. #define LCD_PINS_ENABLE 72 // J2: LEFT
  191. #define LCD_PINS_D4 35 // C2: LCD-CLK
  192. #define LCD_PINS_D5 32 // C5: RLED
  193. #define LCD_PINS_D6 34 // C3: LCD-DATA
  194. #define LCD_PINS_D7 31 // C6: GLED
  195. #define BTN_EN2 75 // J4, UP
  196. #define BTN_EN1 73 // J3, DOWN
  197. //STOP button connected as KILL_PIN
  198. #define KILL_PIN 14 // J1, RIGHT
  199. //KILL - not connected
  200. #define BEEPER_PIN 8 // H5, SD_WP
  201. #define BTN_CENTER 15 // J0
  202. #define BTN_ENC BTN_CENTER
  203. //on board leds
  204. #define STAT_LED_RED_LED SERVO0_PIN // C1 (1280-EX1, DEBUG2)
  205. #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
  206. #else
  207. // Replicator uses a 3-wire SR controller with HD44780
  208. // For now, pretend it's the SAV
  209. //
  210. #define SAV_3DLCD
  211. #define SR_DATA_PIN 34 // C3
  212. #define SR_CLK_PIN 35 // C2
  213. #define SR_STROBE_PIN 33 // C4
  214. #define BTN_UP 75 // J4
  215. #define BTN_DOWN 73 // J3
  216. #define BTN_LEFT 72 // J2
  217. #define BTN_RIGHT 14 // J1
  218. #define BTN_CENTER 15 // J0
  219. #define BTN_ENC BTN_CENTER
  220. #define BEEPER_PIN 4 // G5
  221. #define STAT_LED_RED_PIN 32 // C5
  222. #define STAT_LED_BLUE_PIN 31 // C6 (Actually green)
  223. #endif
  224. //
  225. // SD Card
  226. //
  227. #define SDSS 53 // B0
  228. #define SD_DETECT_PIN 9 // H6
  229. #define MAX_PIN THERMO_SCK_PIN
  230. //
  231. // M3/M4/M5 - Spindle/Laser Control
  232. //
  233. #define SPINDLE_LASER_ENABLE_PIN 66 // K4 Pin should have a pullup!
  234. #define SPINDLE_LASER_PWM_PIN 8 // H5 MUST BE HARDWARE PWM
  235. #define SPINDLE_DIR_PIN 67 // K5
  236. // Check if all pins are defined in mega/pins_arduino.h
  237. #include <Arduino.h>
  238. static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h"
  239. "to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below");
  240. /* in [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h
  241. change:
  242. #define NUM_DIGITAL_PINS 70
  243. to:
  244. #define NUM_DIGITAL_PINS 80
  245. to digital_pin_to_port_PGM add at the end:
  246. const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
  247. ....
  248. PG , // PG 4 ** 70 **
  249. PG , // PG 3 ** 71 **
  250. PJ , // PJ 2 ** 72 **
  251. PJ , // PJ 3 ** 73 **
  252. PJ , // PJ 7 ** 74 **
  253. PJ , // PJ 4 ** 75 **
  254. PJ , // PJ 5 ** 76 **
  255. PJ , // PJ 6 ** 77 **
  256. PE , // PE 2 ** 78 **
  257. PE , // PE 6 ** 79 **
  258. };
  259. to digital_pin_to_bit_mask_PGM add at the end:
  260. const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
  261. ....
  262. _BV( 4 ) , // PG 4 ** 70 **
  263. _BV( 3 ) , // PG 3 ** 71 **
  264. _BV( 2 ) , // PJ 2 ** 72 **
  265. _BV( 3 ) , // PJ 3 ** 73 **
  266. _BV( 7 ) , // PJ 7 ** 74 **
  267. _BV( 4 ) , // PJ 4 ** 75 **
  268. _BV( 5 ) , // PJ 5 ** 76 **
  269. _BV( 6 ) , // PJ 6 ** 77 **
  270. _BV( 2 ) , // PE 2 ** 78 **
  271. _BV( 6 ) , // PE 6 ** 79 **
  272. };
  273. to digital_pin_to_timer_PGM add at the end:
  274. const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
  275. ....
  276. NOT_ON_TIMER , // PG 4 ** 70 **
  277. NOT_ON_TIMER , // PG 3 ** 71 **
  278. NOT_ON_TIMER , // PJ 2 ** 72 **
  279. NOT_ON_TIMER , // PJ 3 ** 73 **
  280. NOT_ON_TIMER , // PJ 7 ** 74 **
  281. NOT_ON_TIMER , // PJ 4 ** 75 **
  282. NOT_ON_TIMER , // PJ 5 ** 76 **
  283. NOT_ON_TIMER , // PJ 6 ** 77 **
  284. NOT_ON_TIMER , // PE 2 ** 78 **
  285. NOT_ON_TIMER , // PE 6 ** 79 **
  286. };
  287. */