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 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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. #if !defined(__AVR_ATmega1280__) && !defined(__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_TMC220x
  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. #endif
  131. //
  132. // Default pins for TMC software SPI
  133. //
  134. //#if ENABLED(TMC_USE_SW_SPI)
  135. // #ifndef TMC_SW_MOSI
  136. // #define TMC_SW_MOSI 66
  137. // #endif
  138. // #ifndef TMC_SW_MISO
  139. // #define TMC_SW_MISO 44
  140. // #endif
  141. // #ifndef TMC_SW_SCK
  142. // #define TMC_SW_SCK 64
  143. // #endif
  144. //#endif
  145. //
  146. // Temperature Sensors
  147. //
  148. #define TEMP_0_PIN 13
  149. #define TEMP_1_PIN 15
  150. #define TEMP_2_PIN 10
  151. #define TEMP_3_PIN 11
  152. #define TEMP_BED_PIN 14
  153. #if TEMP_SENSOR_CHAMBER > 0
  154. #define TEMP_CHAMBER_PIN 12
  155. #else
  156. #define TEMP_4_PIN 12
  157. #endif
  158. // SPI for Max6675 or Max31855 Thermocouple
  159. //#if DISABLED(SDSUPPORT)
  160. // #define MAX6675_SS 66 // Don't use 53 if there is even the remote possibility of using Display/SD card
  161. //#else
  162. // #define MAX6675_SS 66 // Don't use 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
  163. //#endif
  164. //
  165. // Heaters / Fans
  166. //
  167. #define HEATER_0_PIN 10
  168. #define HEATER_1_PIN 7
  169. #define HEATER_2_PIN 44
  170. #define HEATER_BED_PIN 8
  171. #define FAN_PIN 9
  172. #if EXTRUDERS >= 5
  173. #define HEATER_4_PIN 6
  174. #else
  175. #define FAN1_PIN 6
  176. #endif
  177. #if EXTRUDERS >= 4
  178. #define HEATER_3_PIN 45
  179. #else
  180. #define FAN2_PIN 45
  181. #endif
  182. //
  183. // Misc. Functions
  184. //
  185. #define SDSS 53
  186. #define LED_PIN 13
  187. //#ifndef FILWIDTH_PIN
  188. // #define FILWIDTH_PIN 5 // Analog Input
  189. //#endif
  190. // DIO 4 (Servos plug) for the runout sensor.
  191. //#define FIL_RUNOUT_PIN SERVO3_PIN
  192. #ifndef PS_ON_PIN
  193. #define PS_ON_PIN 12
  194. #endif
  195. //
  196. // Case Light
  197. //
  198. #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
  199. #if !NUM_SERVOS // Prefer the servo connector
  200. #define CASE_LIGHT_PIN 6 // Hardware PWM
  201. #elif HAS_FREE_AUX2_PINS // Try to use AUX 2
  202. #define CASE_LIGHT_PIN 44 // Hardware PWM
  203. #endif
  204. #endif
  205. //
  206. // M3/M4/M5 - Spindle/Laser Control
  207. //
  208. #if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
  209. #if !NUM_SERVOS // Prefer the servo connector
  210. #define SPINDLE_LASER_ENABLE_PIN 4 // Pullup or pulldown!
  211. #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
  212. #define SPINDLE_DIR_PIN 5
  213. #elif HAS_FREE_AUX2_PINS // Try to use AUX 2
  214. #define SPINDLE_LASER_ENABLE_PIN 40 // Pullup or pulldown!
  215. #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
  216. #define SPINDLE_DIR_PIN 65
  217. #endif
  218. #endif
  219. //
  220. // Průša i3 MK2 Multiplexer Support
  221. //
  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. //////////////////////////
  232. // LCDs and Controllers //
  233. //////////////////////////
  234. #if HAS_SPI_LCD
  235. //
  236. // LCD Display output pins
  237. //
  238. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  239. #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  240. #define LCD_PINS_ENABLE 51 // SID (MOSI)
  241. #define LCD_PINS_D4 52 // SCK (CLK) clock
  242. #elif BOTH(NEWPANEL, PANEL_ONE)
  243. #define LCD_PINS_RS 40
  244. #define LCD_PINS_ENABLE 42
  245. #define LCD_PINS_D4 65
  246. #define LCD_PINS_D5 66
  247. #define LCD_PINS_D6 44
  248. #define LCD_PINS_D7 64
  249. #elif ENABLED(ZONESTAR_LCD)
  250. #define LCD_PINS_RS 64
  251. #define LCD_PINS_ENABLE 44
  252. #define LCD_PINS_D4 63
  253. #define LCD_PINS_D5 40
  254. #define LCD_PINS_D6 42
  255. #define LCD_PINS_D7 65
  256. #define ADC_KEYPAD_PIN 12
  257. #else
  258. #if ENABLED(CR10_STOCKDISPLAY)
  259. #define LCD_PINS_RS 27
  260. #define LCD_PINS_ENABLE 29
  261. #define LCD_PINS_D4 25
  262. #if DISABLED(NEWPANEL)
  263. #define BEEPER_PIN 37
  264. #endif
  265. #else
  266. #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
  267. #define LCD_PINS_DC 25 // Set as output on init
  268. #define LCD_PINS_RS 27 // Pull low for 1s to init
  269. // DOGM SPI LCD Support
  270. #define DOGLCD_CS 16
  271. #define DOGLCD_MOSI 17
  272. #define DOGLCD_SCK 23
  273. #define DOGLCD_A0 LCD_PINS_DC
  274. #else
  275. #define LCD_PINS_RS 16
  276. #define LCD_PINS_ENABLE 17
  277. #define LCD_PINS_D4 23
  278. #define LCD_PINS_D5 25
  279. #define LCD_PINS_D6 27
  280. #endif
  281. #define LCD_PINS_D7 29
  282. #if DISABLED(NEWPANEL)
  283. #define BEEPER_PIN 33
  284. #endif
  285. #endif
  286. #if DISABLED(NEWPANEL)
  287. // Buttons are attached to a shift register
  288. // Not wired yet
  289. //#define SHIFT_CLK 38
  290. //#define SHIFT_LD 42
  291. //#define SHIFT_OUT 40
  292. //#define SHIFT_EN 17
  293. #endif
  294. #endif
  295. //
  296. // LCD Display input pins
  297. //
  298. #if ENABLED(NEWPANEL)
  299. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  300. #define BEEPER_PIN 37
  301. #if ENABLED(CR10_STOCKDISPLAY)
  302. #define BTN_EN1 17
  303. #define BTN_EN2 23
  304. #else
  305. #define BTN_EN1 31
  306. #define BTN_EN2 33
  307. #endif
  308. #define BTN_ENC 35
  309. #define SD_DETECT_PIN 49
  310. //#define KILL_PIN 41
  311. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  312. #define LCD_BACKLIGHT_PIN 39
  313. #endif
  314. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  315. #define BTN_EN1 64
  316. #define BTN_EN2 59
  317. #define BTN_ENC 63
  318. #define SD_DETECT_PIN 42
  319. #elif ENABLED(LCD_I2C_PANELOLU2)
  320. #define BTN_EN1 47
  321. #define BTN_EN2 43
  322. #define BTN_ENC 32
  323. #define LCD_SDSS 53
  324. //#define KILL_PIN 41
  325. #elif ENABLED(LCD_I2C_VIKI)
  326. #define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  327. #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  328. #define BTN_ENC -1
  329. #define LCD_SDSS 53
  330. #define SD_DETECT_PIN 49
  331. #elif EITHER(VIKI2, miniVIKI)
  332. #define DOGLCD_CS 45
  333. #define DOGLCD_A0 44
  334. #define LCD_SCREEN_ROT_180
  335. #define BEEPER_PIN 33
  336. #define STAT_LED_RED_PIN 32
  337. #define STAT_LED_BLUE_PIN 35
  338. #define BTN_EN1 22
  339. #define BTN_EN2 7
  340. #define BTN_ENC 39
  341. #define SDSS 53
  342. #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
  343. //#define KILL_PIN 31
  344. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  345. #define DOGLCD_CS 29
  346. #define DOGLCD_A0 27
  347. #define BEEPER_PIN 23
  348. #define LCD_BACKLIGHT_PIN 33
  349. #define BTN_EN1 35
  350. #define BTN_EN2 37
  351. #define BTN_ENC 31
  352. #define LCD_SDSS 53
  353. #define SD_DETECT_PIN 49
  354. //#define KILL_PIN 41
  355. #elif ENABLED(MKS_MINI_12864)
  356. #define DOGLCD_A0 27
  357. #define DOGLCD_CS 25
  358. // GLCD features
  359. //#define LCD_CONTRAST 190
  360. // Uncomment screen orientation
  361. //#define LCD_SCREEN_ROT_90
  362. //#define LCD_SCREEN_ROT_180
  363. //#define LCD_SCREEN_ROT_270
  364. #define BEEPER_PIN 37
  365. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  366. #define BTN_EN1 31
  367. #define BTN_EN2 33
  368. #define BTN_ENC 35
  369. //#define SDSS 53
  370. #define SD_DETECT_PIN 49
  371. //#define KILL_PIN 64
  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. // GLCD features
  379. //#define LCD_CONTRAST 190
  380. // Uncomment screen orientation
  381. //#define LCD_SCREEN_ROT_90
  382. //#define LCD_SCREEN_ROT_180
  383. //#define LCD_SCREEN_ROT_270
  384. #define BTN_EN1 40
  385. #define BTN_EN2 63
  386. #define BTN_ENC 59
  387. #define SDSS 53
  388. #define SD_DETECT_PIN 49
  389. //#define KILL_PIN 64
  390. #else
  391. // Beeper on AUX-4
  392. #define BEEPER_PIN 33
  393. // Buttons are directly attached to AUX-2
  394. #if ENABLED(REPRAPWORLD_KEYPAD)
  395. #define SHIFT_OUT 40
  396. #define SHIFT_CLK 44
  397. #define SHIFT_LD 42
  398. #define BTN_EN1 64
  399. #define BTN_EN2 59
  400. #define BTN_ENC 63
  401. #elif ENABLED(PANEL_ONE)
  402. #define BTN_EN1 59 // AUX2 PIN 3
  403. #define BTN_EN2 63 // AUX2 PIN 4
  404. #define BTN_ENC 49 // AUX3 PIN 7
  405. #else
  406. #define BTN_EN1 37
  407. #define BTN_EN2 35
  408. #define BTN_ENC 31
  409. #endif
  410. #if ENABLED(G3D_PANEL)
  411. #define SD_DETECT_PIN 49
  412. //#define KILL_PIN 41
  413. #endif
  414. #endif
  415. #endif // NEWPANEL
  416. #endif