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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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."
  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. #define X_SERIAL_TX_PIN -1 // 59
  105. #define X_SERIAL_RX_PIN -1 // 63
  106. #define X2_SERIAL_TX_PIN -1
  107. #define X2_SERIAL_RX_PIN -1
  108. #define Y_SERIAL_TX_PIN -1 // 64
  109. #define Y_SERIAL_RX_PIN -1 // 40
  110. #define Y2_SERIAL_TX_PIN -1
  111. #define Y2_SERIAL_RX_PIN -1
  112. #define Z_SERIAL_TX_PIN -1 // 44
  113. #define Z_SERIAL_RX_PIN -1 // 42
  114. #define Z2_SERIAL_TX_PIN -1
  115. #define Z2_SERIAL_RX_PIN -1
  116. #define E0_SERIAL_TX_PIN -1 // 66
  117. #define E0_SERIAL_RX_PIN -1 // 65
  118. #define E1_SERIAL_TX_PIN -1
  119. #define E1_SERIAL_RX_PIN -1
  120. #define E2_SERIAL_TX_PIN -1
  121. #define E2_SERIAL_RX_PIN -1
  122. #define E3_SERIAL_TX_PIN -1
  123. #define E3_SERIAL_RX_PIN -1
  124. #define E4_SERIAL_TX_PIN -1
  125. #define E4_SERIAL_RX_PIN -1
  126. #define E5_SERIAL_RX_PIN -1
  127. #define E6_SERIAL_RX_PIN -1
  128. #define E7_SERIAL_RX_PIN -1
  129. #endif
  130. //
  131. // Default pins for TMC software SPI
  132. //
  133. //#if ENABLED(TMC_USE_SW_SPI)
  134. // #ifndef TMC_SW_MOSI
  135. // #define TMC_SW_MOSI 66
  136. // #endif
  137. // #ifndef TMC_SW_MISO
  138. // #define TMC_SW_MISO 44
  139. // #endif
  140. // #ifndef TMC_SW_SCK
  141. // #define TMC_SW_SCK 64
  142. // #endif
  143. //#endif
  144. //
  145. // Temperature Sensors
  146. //
  147. #define TEMP_0_PIN 13
  148. #define TEMP_1_PIN 15
  149. #define TEMP_2_PIN 10
  150. #define TEMP_3_PIN 11
  151. #define TEMP_BED_PIN 14
  152. #if TEMP_SENSOR_CHAMBER > 0
  153. #define TEMP_CHAMBER_PIN 12
  154. #else
  155. #define TEMP_4_PIN 12
  156. #endif
  157. // SPI for MAX Thermocouple
  158. //#if DISABLED(SDSUPPORT)
  159. // #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card
  160. //#else
  161. // #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
  162. //#endif
  163. //
  164. // Heaters / Fans
  165. //
  166. #define HEATER_0_PIN 10
  167. #define HEATER_1_PIN 7
  168. #define HEATER_2_PIN 44
  169. #define HEATER_BED_PIN 8
  170. #define FAN_PIN 9
  171. #if EXTRUDERS >= 5
  172. #define HEATER_4_PIN 6
  173. #else
  174. #define FAN1_PIN 6
  175. #endif
  176. #if EXTRUDERS >= 4
  177. #define HEATER_3_PIN 45
  178. #else
  179. #define FAN2_PIN 45
  180. #endif
  181. //
  182. // Misc. Functions
  183. //
  184. #define SDSS 53
  185. #define LED_PIN 13
  186. //#ifndef FILWIDTH_PIN
  187. // #define FILWIDTH_PIN 5 // Analog Input
  188. //#endif
  189. // DIO 4 (Servos plug) for the runout sensor.
  190. //#define FIL_RUNOUT_PIN SERVO3_PIN
  191. #ifndef PS_ON_PIN
  192. #define PS_ON_PIN 12
  193. #endif
  194. //
  195. // M3/M4/M5 - Spindle/Laser Control
  196. //
  197. #if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
  198. #if !NUM_SERVOS // Prefer the servo connector
  199. #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
  200. #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
  201. #define SPINDLE_DIR_PIN 5
  202. #elif HAS_FREE_AUX2_PINS // Try to use AUX 2
  203. #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown!
  204. #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
  205. #define SPINDLE_DIR_PIN 65
  206. #endif
  207. #endif
  208. //
  209. // Case Light
  210. //
  211. #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN)
  212. #if !NUM_SERVOS // Prefer the servo connector
  213. #define CASE_LIGHT_PIN 6 // Hardware PWM
  214. #elif HAS_FREE_AUX2_PINS // Try to use AUX 2
  215. #define CASE_LIGHT_PIN 44 // Hardware PWM
  216. #endif
  217. #endif
  218. //
  219. // Průša i3 MK2 Multiplexer Support
  220. //
  221. #if 0 && HAS_PRUSA_MMU1
  222. #ifndef E_MUX0_PIN
  223. #define E_MUX0_PIN 58 // Y_CS_PIN
  224. #endif
  225. #ifndef E_MUX1_PIN
  226. #define E_MUX1_PIN 53 // Z_CS_PIN
  227. #endif
  228. #ifndef E_MUX2_PIN
  229. #define E_MUX2_PIN 49 // En_CS_PIN
  230. #endif
  231. #endif
  232. //////////////////////////
  233. // LCDs and Controllers //
  234. //////////////////////////
  235. #if HAS_WIRED_LCD
  236. //
  237. // LCD Display output pins
  238. //
  239. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  240. #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  241. #define LCD_PINS_ENABLE 51 // SID (MOSI)
  242. #define LCD_PINS_D4 52 // SCK (CLK) clock
  243. #elif BOTH(IS_NEWPANEL, PANEL_ONE)
  244. #define LCD_PINS_RS 40
  245. #define LCD_PINS_ENABLE 42
  246. #define LCD_PINS_D4 65
  247. #define LCD_PINS_D5 66
  248. #define LCD_PINS_D6 44
  249. #define LCD_PINS_D7 64
  250. #elif ENABLED(ZONESTAR_LCD)
  251. #define LCD_PINS_RS 64
  252. #define LCD_PINS_ENABLE 44
  253. #define LCD_PINS_D4 63
  254. #define LCD_PINS_D5 40
  255. #define LCD_PINS_D6 42
  256. #define LCD_PINS_D7 65
  257. #define ADC_KEYPAD_PIN 12
  258. #else
  259. #if ENABLED(CR10_STOCKDISPLAY)
  260. #define LCD_PINS_RS 27
  261. #define LCD_PINS_ENABLE 29
  262. #define LCD_PINS_D4 25
  263. #if !IS_NEWPANEL
  264. #define BEEPER_PIN 37
  265. #endif
  266. #else
  267. #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
  268. #define LCD_PINS_DC 25 // Set as output on init
  269. #define LCD_PINS_RS 27 // Pull low for 1s to init
  270. // DOGM SPI LCD Support
  271. #define DOGLCD_CS 16
  272. #define DOGLCD_MOSI 17
  273. #define DOGLCD_SCK 23
  274. #define DOGLCD_A0 LCD_PINS_DC
  275. #else
  276. #define LCD_PINS_RS 16
  277. #define LCD_PINS_ENABLE 17
  278. #define LCD_PINS_D4 23
  279. #define LCD_PINS_D5 25
  280. #define LCD_PINS_D6 27
  281. #endif
  282. #define LCD_PINS_D7 29
  283. #if !IS_NEWPANEL
  284. #define BEEPER_PIN 33
  285. #endif
  286. #endif
  287. #if !IS_NEWPANEL
  288. // Buttons attached to a shift register
  289. // Not wired yet
  290. //#define SHIFT_CLK_PIN 38
  291. //#define SHIFT_LD_PIN 42
  292. //#define SHIFT_OUT_PIN 40
  293. //#define SHIFT_EN_PIN 17
  294. #endif
  295. #endif
  296. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  297. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  298. #endif
  299. //
  300. // LCD Display input pins
  301. //
  302. #if IS_NEWPANEL
  303. #if IS_RRD_SC
  304. #define BEEPER_PIN 37
  305. #if ENABLED(CR10_STOCKDISPLAY)
  306. #define BTN_EN1 17
  307. #define BTN_EN2 23
  308. #else
  309. #define BTN_EN1 31
  310. #define BTN_EN2 33
  311. #endif
  312. #define BTN_ENC 35
  313. #define SD_DETECT_PIN 49
  314. //#define KILL_PIN 41
  315. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  316. #define LCD_BACKLIGHT_PIN 39
  317. #endif
  318. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  319. #define BTN_EN1 64
  320. #define BTN_EN2 59
  321. #define BTN_ENC 63
  322. #define SD_DETECT_PIN 42
  323. #elif ENABLED(LCD_I2C_PANELOLU2)
  324. #define BTN_EN1 47
  325. #define BTN_EN2 43
  326. #define BTN_ENC 32
  327. #define LCD_SDSS 53
  328. //#define KILL_PIN 41
  329. #elif ENABLED(LCD_I2C_VIKI)
  330. #define BTN_EN1 22 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  331. #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  332. #define BTN_ENC -1
  333. #define LCD_SDSS 53
  334. #define SD_DETECT_PIN 49
  335. #elif EITHER(VIKI2, miniVIKI)
  336. #define DOGLCD_CS 45
  337. #define DOGLCD_A0 44
  338. #define BEEPER_PIN 33
  339. #define STAT_LED_RED_PIN 32
  340. #define STAT_LED_BLUE_PIN 35
  341. #define BTN_EN1 22
  342. #define BTN_EN2 7
  343. #define BTN_ENC 39
  344. #define SDSS 53
  345. #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
  346. //#define KILL_PIN 31
  347. #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
  348. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  349. #define DOGLCD_CS 29
  350. #define DOGLCD_A0 27
  351. #define BEEPER_PIN 23
  352. #define LCD_BACKLIGHT_PIN 33
  353. #define BTN_EN1 35
  354. #define BTN_EN2 37
  355. #define BTN_ENC 31
  356. #define LCD_SDSS 53
  357. #define SD_DETECT_PIN 49
  358. //#define KILL_PIN 41
  359. #elif ENABLED(MKS_MINI_12864)
  360. #define DOGLCD_A0 27
  361. #define DOGLCD_CS 25
  362. #define BEEPER_PIN 37
  363. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  364. #define BTN_EN1 31
  365. #define BTN_EN2 33
  366. #define BTN_ENC 35
  367. //#define SDSS 53
  368. #define SD_DETECT_PIN 49
  369. //#define KILL_PIN 64
  370. //#define LCD_CONTRAST_INIT 190
  371. //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
  372. #elif ENABLED(MINIPANEL)
  373. #define BEEPER_PIN 42
  374. // not connected to a pin
  375. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  376. #define DOGLCD_A0 44
  377. #define DOGLCD_CS 66
  378. #define BTN_EN1 40
  379. #define BTN_EN2 63
  380. #define BTN_ENC 59
  381. #define SDSS 53
  382. #define SD_DETECT_PIN 49
  383. //#define KILL_PIN 64
  384. //#define LCD_CONTRAST_INIT 190
  385. //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
  386. #else
  387. // Beeper on AUX-4
  388. #define BEEPER_PIN 33
  389. // Buttons are directly attached to AUX-2
  390. #if IS_RRW_KEYPAD
  391. #define SHIFT_OUT_PIN 40
  392. #define SHIFT_CLK_PIN 44
  393. #define SHIFT_LD_PIN 42
  394. #define BTN_EN1 64
  395. #define BTN_EN2 59
  396. #define BTN_ENC 63
  397. #elif ENABLED(PANEL_ONE)
  398. #define BTN_EN1 59 // AUX2 PIN 3
  399. #define BTN_EN2 63 // AUX2 PIN 4
  400. #define BTN_ENC 49 // AUX3 PIN 7
  401. #else
  402. #define BTN_EN1 37
  403. #define BTN_EN2 35
  404. #define BTN_ENC 31
  405. #endif
  406. #if ENABLED(G3D_PANEL)
  407. #define SD_DETECT_PIN 49
  408. //#define KILL_PIN 41
  409. #endif
  410. #endif
  411. #endif // IS_NEWPANEL
  412. #endif