My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

pins_TT_OSCAR.h 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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. #if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
  23. #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
  24. #endif
  25. #if HOTENDS > 5 || E_STEPPERS > 5
  26. #error "TTOSCAR supports up to 5 hotends / E-steppers. Comment out this line to continue."
  27. #endif
  28. #define BOARD_INFO_NAME "TT OSCAR"
  29. #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
  30. //
  31. // Servos
  32. //
  33. #define SERVO0_PIN 11
  34. #define SERVO1_PIN 12
  35. #define SERVO2_PIN 5
  36. #define SERVO3_PIN 4
  37. //
  38. // Limit Switches
  39. //
  40. #define X_MIN_PIN 3
  41. #define X_MAX_PIN 2
  42. #define Y_MIN_PIN 14
  43. #define Y_MAX_PIN 15
  44. #define Z_MIN_PIN 18
  45. #define Z_MAX_PIN 19
  46. //
  47. // Z Probe (when not Z_MIN_PIN)
  48. //
  49. #ifndef Z_MIN_PROBE_PIN
  50. #define Z_MIN_PROBE_PIN SERVO3_PIN
  51. #endif
  52. //
  53. // Steppers
  54. //
  55. #define X_STEP_PIN 54
  56. #define X_DIR_PIN 55
  57. #define X_ENABLE_PIN 38
  58. #define X_CS_PIN 57
  59. #define Y_STEP_PIN 60
  60. #define Y_DIR_PIN 61
  61. #define Y_ENABLE_PIN 56
  62. #define Y_CS_PIN 58
  63. #define Z_STEP_PIN 46
  64. #define Z_DIR_PIN 48
  65. #define Z_ENABLE_PIN 62
  66. #define Z_CS_PIN 53
  67. #define E0_STEP_PIN 26
  68. #define E0_DIR_PIN 28
  69. #define E0_ENABLE_PIN 24
  70. #define E0_CS_PIN 49
  71. #define E1_STEP_PIN 36
  72. #define E1_DIR_PIN 34
  73. #define E1_ENABLE_PIN 30
  74. #define E1_CS_PIN E0_CS_PIN
  75. #define E2_STEP_PIN 63
  76. #define E2_DIR_PIN 22
  77. #define E2_ENABLE_PIN 59
  78. #define E2_CS_PIN E0_CS_PIN
  79. #define E3_STEP_PIN 32
  80. #define E3_DIR_PIN 40
  81. #define E3_ENABLE_PIN 39
  82. #define E3_CS_PIN E0_CS_PIN
  83. #define E4_STEP_PIN 43
  84. #define E4_DIR_PIN 42
  85. #define E4_ENABLE_PIN 47
  86. #define E4_CS_PIN E0_CS_PIN
  87. #if HAS_TMC_UART
  88. /**
  89. * TMC2208/TMC2209 stepper drivers
  90. *
  91. * Hardware serial communication ports.
  92. * If undefined software serial is used according to the pins below
  93. */
  94. //#define X_HARDWARE_SERIAL Serial1
  95. //#define X2_HARDWARE_SERIAL Serial1
  96. //#define Y_HARDWARE_SERIAL Serial1
  97. //#define Y2_HARDWARE_SERIAL Serial1
  98. //#define Z_HARDWARE_SERIAL Serial1
  99. //#define Z2_HARDWARE_SERIAL Serial1
  100. //#define E0_HARDWARE_SERIAL Serial1
  101. //#define E1_HARDWARE_SERIAL Serial1
  102. //#define E2_HARDWARE_SERIAL Serial1
  103. //#define E3_HARDWARE_SERIAL Serial1
  104. //#define E3_HARDWARE_SERIAL Serial1
  105. //
  106. // Software serial
  107. //
  108. #define X_SERIAL_TX_PIN -1 // 59
  109. #define X_SERIAL_RX_PIN -1 // 63
  110. #define X2_SERIAL_TX_PIN -1
  111. #define X2_SERIAL_RX_PIN -1
  112. #define Y_SERIAL_TX_PIN -1 // 64
  113. #define Y_SERIAL_RX_PIN -1 // 40
  114. #define Y2_SERIAL_TX_PIN -1
  115. #define Y2_SERIAL_RX_PIN -1
  116. #define Z_SERIAL_TX_PIN -1 // 44
  117. #define Z_SERIAL_RX_PIN -1 // 42
  118. #define Z2_SERIAL_TX_PIN -1
  119. #define Z2_SERIAL_RX_PIN -1
  120. #define E0_SERIAL_TX_PIN -1 // 66
  121. #define E0_SERIAL_RX_PIN -1 // 65
  122. #define E1_SERIAL_TX_PIN -1
  123. #define E1_SERIAL_RX_PIN -1
  124. #define E2_SERIAL_TX_PIN -1
  125. #define E2_SERIAL_RX_PIN -1
  126. #define E3_SERIAL_TX_PIN -1
  127. #define E3_SERIAL_RX_PIN -1
  128. #define E4_SERIAL_TX_PIN -1
  129. #define E4_SERIAL_RX_PIN -1
  130. #define E5_SERIAL_RX_PIN -1
  131. #define E6_SERIAL_RX_PIN -1
  132. #define E7_SERIAL_RX_PIN -1
  133. #endif
  134. //
  135. // Default pins for TMC software SPI
  136. //
  137. //#if ENABLED(TMC_USE_SW_SPI)
  138. // #ifndef TMC_SW_MOSI
  139. // #define TMC_SW_MOSI 66
  140. // #endif
  141. // #ifndef TMC_SW_MISO
  142. // #define TMC_SW_MISO 44
  143. // #endif
  144. // #ifndef TMC_SW_SCK
  145. // #define TMC_SW_SCK 64
  146. // #endif
  147. //#endif
  148. //
  149. // Temperature Sensors
  150. //
  151. #define TEMP_0_PIN 13
  152. #define TEMP_1_PIN 15
  153. #define TEMP_2_PIN 10
  154. #define TEMP_3_PIN 11
  155. #define TEMP_BED_PIN 14
  156. #if TEMP_SENSOR_CHAMBER > 0
  157. #define TEMP_CHAMBER_PIN 12
  158. #else
  159. #define TEMP_4_PIN 12
  160. #endif
  161. // SPI for Max6675 or Max31855 Thermocouple
  162. //#if DISABLED(SDSUPPORT)
  163. // #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card
  164. //#else
  165. // #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
  166. //#endif
  167. //
  168. // Heaters / Fans
  169. //
  170. #define HEATER_0_PIN 10
  171. #define HEATER_1_PIN 7
  172. #define HEATER_2_PIN 44
  173. #define HEATER_BED_PIN 8
  174. #define FAN_PIN 9
  175. #if EXTRUDERS >= 5
  176. #define HEATER_4_PIN 6
  177. #else
  178. #define FAN1_PIN 6
  179. #endif
  180. #if EXTRUDERS >= 4
  181. #define HEATER_3_PIN 45
  182. #else
  183. #define FAN2_PIN 45
  184. #endif
  185. //
  186. // Misc. Functions
  187. //
  188. #define SDSS 53
  189. #define LED_PIN 13
  190. //#ifndef FILWIDTH_PIN
  191. // #define FILWIDTH_PIN 5 // Analog Input
  192. //#endif
  193. // DIO 4 (Servos plug) for the runout sensor.
  194. //#define FIL_RUNOUT_PIN SERVO3_PIN
  195. #ifndef PS_ON_PIN
  196. #define PS_ON_PIN 12
  197. #endif
  198. //
  199. // Case Light
  200. //
  201. #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
  202. #if !NUM_SERVOS // Prefer the servo connector
  203. #define CASE_LIGHT_PIN 6 // Hardware PWM
  204. #elif HAS_FREE_AUX2_PINS // Try to use AUX 2
  205. #define CASE_LIGHT_PIN 44 // Hardware PWM
  206. #endif
  207. #endif
  208. //
  209. // M3/M4/M5 - Spindle/Laser Control
  210. //
  211. #if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  212. #if !NUM_SERVOS // Prefer the servo connector
  213. #define SPINDLE_LASER_ENABLE_PIN 4 // Pullup or pulldown!
  214. #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
  215. #define SPINDLE_DIR_PIN 5
  216. #elif HAS_FREE_AUX2_PINS // Try to use AUX 2
  217. #define SPINDLE_LASER_ENABLE_PIN 40 // Pullup or pulldown!
  218. #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
  219. #define SPINDLE_DIR_PIN 65
  220. #endif
  221. #endif
  222. //
  223. // Průša i3 MK2 Multiplexer Support
  224. //
  225. //#ifndef E_MUX0_PIN
  226. // #define E_MUX0_PIN 58 // Y_CS_PIN
  227. //#endif
  228. //#ifndef E_MUX1_PIN
  229. // #define E_MUX1_PIN 53 // Z_CS_PIN
  230. //#endif
  231. //#ifndef E_MUX2_PIN
  232. // #define E_MUX2_PIN 49 // En_CS_PIN
  233. //#endif
  234. //////////////////////////
  235. // LCDs and Controllers //
  236. //////////////////////////
  237. #if HAS_WIRED_LCD
  238. //
  239. // LCD Display output pins
  240. //
  241. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  242. #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  243. #define LCD_PINS_ENABLE 51 // SID (MOSI)
  244. #define LCD_PINS_D4 52 // SCK (CLK) clock
  245. #elif BOTH(IS_NEWPANEL, PANEL_ONE)
  246. #define LCD_PINS_RS 40
  247. #define LCD_PINS_ENABLE 42
  248. #define LCD_PINS_D4 65
  249. #define LCD_PINS_D5 66
  250. #define LCD_PINS_D6 44
  251. #define LCD_PINS_D7 64
  252. #elif ENABLED(ZONESTAR_LCD)
  253. #define LCD_PINS_RS 64
  254. #define LCD_PINS_ENABLE 44
  255. #define LCD_PINS_D4 63
  256. #define LCD_PINS_D5 40
  257. #define LCD_PINS_D6 42
  258. #define LCD_PINS_D7 65
  259. #define ADC_KEYPAD_PIN 12
  260. #else
  261. #if ENABLED(CR10_STOCKDISPLAY)
  262. #define LCD_PINS_RS 27
  263. #define LCD_PINS_ENABLE 29
  264. #define LCD_PINS_D4 25
  265. #if !IS_NEWPANEL
  266. #define BEEPER_PIN 37
  267. #endif
  268. #else
  269. #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
  270. #define LCD_PINS_DC 25 // Set as output on init
  271. #define LCD_PINS_RS 27 // Pull low for 1s to init
  272. // DOGM SPI LCD Support
  273. #define DOGLCD_CS 16
  274. #define DOGLCD_MOSI 17
  275. #define DOGLCD_SCK 23
  276. #define DOGLCD_A0 LCD_PINS_DC
  277. #else
  278. #define LCD_PINS_RS 16
  279. #define LCD_PINS_ENABLE 17
  280. #define LCD_PINS_D4 23
  281. #define LCD_PINS_D5 25
  282. #define LCD_PINS_D6 27
  283. #endif
  284. #define LCD_PINS_D7 29
  285. #if !IS_NEWPANEL
  286. #define BEEPER_PIN 33
  287. #endif
  288. #endif
  289. #if !IS_NEWPANEL
  290. // Buttons attached to a shift register
  291. // Not wired yet
  292. //#define SHIFT_CLK 38
  293. //#define SHIFT_LD 42
  294. //#define SHIFT_OUT 40
  295. //#define SHIFT_EN 17
  296. #endif
  297. #endif
  298. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  299. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  300. #endif
  301. //
  302. // LCD Display input pins
  303. //
  304. #if IS_NEWPANEL
  305. #if IS_RRD_SC
  306. #define BEEPER_PIN 37
  307. #if ENABLED(CR10_STOCKDISPLAY)
  308. #define BTN_EN1 17
  309. #define BTN_EN2 23
  310. #else
  311. #define BTN_EN1 31
  312. #define BTN_EN2 33
  313. #endif
  314. #define BTN_ENC 35
  315. #define SD_DETECT_PIN 49
  316. //#define KILL_PIN 41
  317. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  318. #define LCD_BACKLIGHT_PIN 39
  319. #endif
  320. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  321. #define BTN_EN1 64
  322. #define BTN_EN2 59
  323. #define BTN_ENC 63
  324. #define SD_DETECT_PIN 42
  325. #elif ENABLED(LCD_I2C_PANELOLU2)
  326. #define BTN_EN1 47
  327. #define BTN_EN2 43
  328. #define BTN_ENC 32
  329. #define LCD_SDSS 53
  330. //#define KILL_PIN 41
  331. #elif ENABLED(LCD_I2C_VIKI)
  332. #define BTN_EN1 22 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  333. #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  334. #define BTN_ENC -1
  335. #define LCD_SDSS 53
  336. #define SD_DETECT_PIN 49
  337. #elif EITHER(VIKI2, miniVIKI)
  338. #define DOGLCD_CS 45
  339. #define DOGLCD_A0 44
  340. #define LCD_SCREEN_ROT_180
  341. #define BEEPER_PIN 33
  342. #define STAT_LED_RED_PIN 32
  343. #define STAT_LED_BLUE_PIN 35
  344. #define BTN_EN1 22
  345. #define BTN_EN2 7
  346. #define BTN_ENC 39
  347. #define SDSS 53
  348. #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
  349. //#define KILL_PIN 31
  350. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  351. #define DOGLCD_CS 29
  352. #define DOGLCD_A0 27
  353. #define BEEPER_PIN 23
  354. #define LCD_BACKLIGHT_PIN 33
  355. #define BTN_EN1 35
  356. #define BTN_EN2 37
  357. #define BTN_ENC 31
  358. #define LCD_SDSS 53
  359. #define SD_DETECT_PIN 49
  360. //#define KILL_PIN 41
  361. #elif ENABLED(MKS_MINI_12864)
  362. #define DOGLCD_A0 27
  363. #define DOGLCD_CS 25
  364. // GLCD features
  365. //#define LCD_CONTRAST_INIT 190
  366. // Uncomment screen orientation
  367. //#define LCD_SCREEN_ROT_90
  368. //#define LCD_SCREEN_ROT_180
  369. //#define LCD_SCREEN_ROT_270
  370. #define BEEPER_PIN 37
  371. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  372. #define BTN_EN1 31
  373. #define BTN_EN2 33
  374. #define BTN_ENC 35
  375. //#define SDSS 53
  376. #define SD_DETECT_PIN 49
  377. //#define KILL_PIN 64
  378. #elif ENABLED(MINIPANEL)
  379. #define BEEPER_PIN 42
  380. // not connected to a pin
  381. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  382. #define DOGLCD_A0 44
  383. #define DOGLCD_CS 66
  384. // GLCD features
  385. //#define LCD_CONTRAST_INIT 190
  386. // Uncomment screen orientation
  387. //#define LCD_SCREEN_ROT_90
  388. //#define LCD_SCREEN_ROT_180
  389. //#define LCD_SCREEN_ROT_270
  390. #define BTN_EN1 40
  391. #define BTN_EN2 63
  392. #define BTN_ENC 59
  393. #define SDSS 53
  394. #define SD_DETECT_PIN 49
  395. //#define KILL_PIN 64
  396. #else
  397. // Beeper on AUX-4
  398. #define BEEPER_PIN 33
  399. // Buttons are directly attached to AUX-2
  400. #if IS_RRW_KEYPAD
  401. #define SHIFT_OUT 40
  402. #define SHIFT_CLK 44
  403. #define SHIFT_LD 42
  404. #define BTN_EN1 64
  405. #define BTN_EN2 59
  406. #define BTN_ENC 63
  407. #elif ENABLED(PANEL_ONE)
  408. #define BTN_EN1 59 // AUX2 PIN 3
  409. #define BTN_EN2 63 // AUX2 PIN 4
  410. #define BTN_ENC 49 // AUX3 PIN 7
  411. #else
  412. #define BTN_EN1 37
  413. #define BTN_EN2 35
  414. #define BTN_ENC 31
  415. #endif
  416. #if ENABLED(G3D_PANEL)
  417. #define SD_DETECT_PIN 49
  418. //#define KILL_PIN 41
  419. #endif
  420. #endif
  421. #endif // IS_NEWPANEL
  422. #endif