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_TT_OSCAR.h 16KB

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