My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

pins_RAMPS_144.h 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * AGCM4 with RAMPS v1.4.4 pin assignments
  25. */
  26. #ifndef ARDUINO_GRAND_CENTRAL_M4
  27. #error "Oops! Select 'Adafruit Grand Central M4' in 'Tools > Board.'"
  28. #endif
  29. #ifndef BOARD_INFO_NAME
  30. #define BOARD_INFO_NAME "AGCM4 RAMPS 1.4.4"
  31. #endif
  32. //
  33. // Servos
  34. //
  35. #define SERVO0_PIN 11
  36. #define SERVO1_PIN 6
  37. #define SERVO2_PIN 5
  38. #define SERVO3_PIN 4
  39. //
  40. // EEPROM
  41. //
  42. #define E2END 0x7FFF // 32Kb (24lc256)
  43. #define I2C_EEPROM // EEPROM on I2C-0
  44. //
  45. // Limit Switches
  46. //
  47. #define X_MIN_PIN 3
  48. #define X_MAX_PIN 2
  49. #define Y_MIN_PIN 14
  50. #define Y_MAX_PIN 15
  51. #define Z_MIN_PIN 18
  52. #define Z_MAX_PIN 19
  53. //
  54. // Z Probe (when not Z_MIN_PIN)
  55. //
  56. #ifndef Z_MIN_PROBE_PIN
  57. #define Z_MIN_PROBE_PIN 18
  58. #endif
  59. //
  60. // Steppers
  61. //
  62. #define X_STEP_PIN 67 // Mega/Due:54 - AGCM4:67
  63. #define X_DIR_PIN 68 // Mega/Due:55 - AGCM4:68
  64. #define X_ENABLE_PIN 38
  65. #ifndef X_CS_PIN
  66. #define X_CS_PIN 47
  67. #endif
  68. #define Y_STEP_PIN 73 // Mega/Due:60 - AGCM4:73
  69. #define Y_DIR_PIN 74 // Mega/Due:61 - AGCM4:74
  70. #define Y_ENABLE_PIN 69 // Mega/Due:56 - AGCM4:69
  71. #ifndef Y_CS_PIN
  72. #define Y_CS_PIN 45
  73. #endif
  74. #define Z_STEP_PIN 46
  75. #define Z_DIR_PIN 48
  76. #define Z_ENABLE_PIN 54 // Mega/Due:62 - AGCM4:54
  77. #ifndef Z_CS_PIN
  78. #define Z_CS_PIN 32
  79. #endif
  80. #define Z2_STEP_PIN 36
  81. #define Z2_DIR_PIN 34
  82. #define Z2_ENABLE_PIN 30
  83. #ifndef Z2_CS_PIN
  84. #define Z2_CS_PIN 22
  85. #endif
  86. #define E0_STEP_PIN 26
  87. #define E0_DIR_PIN 28
  88. #define E0_ENABLE_PIN 24
  89. #ifndef E0_CS_PIN
  90. #define E0_CS_PIN 43
  91. #endif
  92. //
  93. // Temperature Sensors
  94. //
  95. #define TEMP_0_PIN 13
  96. #define TEMP_BED_PIN 14
  97. #define TEMP_CHAMBER_PIN 15
  98. //
  99. // Heaters / Fans
  100. //
  101. #define HEATER_0_PIN 10
  102. #define HEATER_BED_PIN 8
  103. #define FAN_PIN 9
  104. #define FAN1_PIN 7
  105. #define FAN2_PIN 12
  106. //
  107. // Misc. Functions
  108. //
  109. #define SDSS 53
  110. #define LED_PIN 13
  111. #ifndef FILWIDTH_PIN
  112. #define FILWIDTH_PIN 5 // Analog Input on AUX2
  113. #endif
  114. // RAMPS 1.4 DIO 4 on the servos connector
  115. #ifndef FIL_RUNOUT_PIN
  116. #define FIL_RUNOUT_PIN 4
  117. #endif
  118. #ifndef PS_ON_PIN
  119. #define PS_ON_PIN 39
  120. #endif
  121. #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
  122. #if NUM_SERVOS <= 1 // Prefer the servo connector
  123. #define CASE_LIGHT_PIN 6 // Hardware PWM
  124. #endif
  125. #endif
  126. //
  127. // M3/M4/M5 - Spindle/Laser Control
  128. //
  129. #if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN)
  130. #if !NUM_SERVOS // Use servo connector if possible
  131. #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
  132. #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
  133. #define SPINDLE_DIR_PIN 5
  134. #else
  135. #error "No auto-assignable Spindle/Laser pins available."
  136. #endif
  137. #endif
  138. //
  139. // TMC software SPI
  140. //
  141. #if ENABLED(TMC_USE_SW_SPI)
  142. #ifndef TMC_SW_MOSI
  143. #define TMC_SW_MOSI 58 // Mega/Due:66 - AGCM4:58
  144. #endif
  145. #ifndef TMC_SW_MISO
  146. #define TMC_SW_MISO 44
  147. #endif
  148. #ifndef TMC_SW_SCK
  149. #define TMC_SW_SCK 56 // Mega/Due:64 - AGCM4:56
  150. #endif
  151. #endif
  152. #if HAS_TMC220x
  153. /**
  154. * TMC2208/TMC2209 stepper drivers
  155. *
  156. * Hardware serial communication ports.
  157. * If undefined software serial is used according to the pins below
  158. */
  159. //#define X_HARDWARE_SERIAL Serial1
  160. //#define X2_HARDWARE_SERIAL Serial1
  161. //#define Y_HARDWARE_SERIAL Serial1
  162. //#define Y2_HARDWARE_SERIAL Serial1
  163. //#define Z_HARDWARE_SERIAL Serial1
  164. //#define Z2_HARDWARE_SERIAL Serial1
  165. //#define E0_HARDWARE_SERIAL Serial1
  166. //#define E1_HARDWARE_SERIAL Serial1
  167. //#define E2_HARDWARE_SERIAL Serial1
  168. //#define E3_HARDWARE_SERIAL Serial1
  169. //#define E4_HARDWARE_SERIAL Serial1
  170. //
  171. // Software serial
  172. //
  173. #ifndef X_SERIAL_TX_PIN
  174. #define X_SERIAL_TX_PIN 47
  175. #endif
  176. #ifndef X_SERIAL_RX_PIN
  177. #define X_SERIAL_RX_PIN 47
  178. #endif
  179. #ifndef X2_SERIAL_TX_PIN
  180. #define X2_SERIAL_TX_PIN -1
  181. #endif
  182. #ifndef X2_SERIAL_RX_PIN
  183. #define X2_SERIAL_RX_PIN -1
  184. #endif
  185. #ifndef Y_SERIAL_TX_PIN
  186. #define Y_SERIAL_TX_PIN 45
  187. #endif
  188. #ifndef Y_SERIAL_RX_PIN
  189. #define Y_SERIAL_RX_PIN 45
  190. #endif
  191. #ifndef Y2_SERIAL_TX_PIN
  192. #define Y2_SERIAL_TX_PIN -1
  193. #endif
  194. #ifndef Y2_SERIAL_RX_PIN
  195. #define Y2_SERIAL_RX_PIN -1
  196. #endif
  197. #ifndef Z_SERIAL_TX_PIN
  198. #define Z_SERIAL_TX_PIN 32
  199. #endif
  200. #ifndef Z_SERIAL_RX_PIN
  201. #define Z_SERIAL_RX_PIN 32
  202. #endif
  203. #ifndef Z2_SERIAL_TX_PIN
  204. #define Z2_SERIAL_TX_PIN 22
  205. #endif
  206. #ifndef Z2_SERIAL_RX_PIN
  207. #define Z2_SERIAL_RX_PIN 22
  208. #endif
  209. #ifndef E0_SERIAL_TX_PIN
  210. #define E0_SERIAL_TX_PIN 43
  211. #endif
  212. #ifndef E0_SERIAL_RX_PIN
  213. #define E0_SERIAL_RX_PIN 43
  214. #endif
  215. #ifndef E1_SERIAL_TX_PIN
  216. #define E1_SERIAL_TX_PIN -1
  217. #endif
  218. #ifndef E1_SERIAL_RX_PIN
  219. #define E1_SERIAL_RX_PIN -1
  220. #endif
  221. #ifndef E2_SERIAL_TX_PIN
  222. #define E2_SERIAL_TX_PIN -1
  223. #endif
  224. #ifndef E2_SERIAL_RX_PIN
  225. #define E2_SERIAL_RX_PIN -1
  226. #endif
  227. #ifndef E3_SERIAL_TX_PIN
  228. #define E3_SERIAL_TX_PIN -1
  229. #endif
  230. #ifndef E3_SERIAL_RX_PIN
  231. #define E3_SERIAL_RX_PIN -1
  232. #endif
  233. #ifndef E4_SERIAL_TX_PIN
  234. #define E4_SERIAL_TX_PIN -1
  235. #endif
  236. #ifndef E4_SERIAL_RX_PIN
  237. #define E4_SERIAL_RX_PIN -1
  238. #endif
  239. #ifndef E5_SERIAL_TX_PIN
  240. #define E5_SERIAL_TX_PIN -1
  241. #endif
  242. #ifndef E5_SERIAL_RX_PIN
  243. #define E5_SERIAL_RX_PIN -1
  244. #endif
  245. #ifndef E6_SERIAL_TX_PIN
  246. #define E6_SERIAL_TX_PIN -1
  247. #endif
  248. #ifndef E6_SERIAL_RX_PIN
  249. #define E6_SERIAL_RX_PIN -1
  250. #endif
  251. #ifndef E7_SERIAL_TX_PIN
  252. #define E7_SERIAL_TX_PIN -1
  253. #endif
  254. #ifndef E7_SERIAL_RX_PIN
  255. #define E7_SERIAL_RX_PIN -1
  256. #endif
  257. #endif
  258. //////////////////////////
  259. // LCDs and Controllers //
  260. //////////////////////////
  261. #if HAS_SPI_LCD
  262. //
  263. // LCD Display output pins
  264. //
  265. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  266. // TO TEST
  267. // #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  268. // #define LCD_PINS_ENABLE 51 // SID (MOSI)
  269. // #define LCD_PINS_D4 52 // SCK (CLK) clock
  270. #elif BOTH(NEWPANEL, PANEL_ONE)
  271. // TO TEST
  272. // #define LCD_PINS_RS 40
  273. // #define LCD_PINS_ENABLE 42
  274. // #define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57
  275. // #define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58
  276. // #define LCD_PINS_D6 44
  277. // #define LCD_PINS_D7 56 // Mega/Due:64 - AGCM4:56
  278. #else
  279. #if ENABLED(CR10_STOCKDISPLAY)
  280. // TO TEST
  281. // #define LCD_PINS_RS 27
  282. // #define LCD_PINS_ENABLE 29
  283. // #define LCD_PINS_D4 25
  284. #if DISABLED(NEWPANEL)
  285. // TO TEST
  286. // #define BEEPER_PIN 37
  287. #endif
  288. #elif ENABLED(ZONESTAR_LCD)
  289. // TO TEST
  290. // #define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56
  291. // #define LCD_PINS_ENABLE 44
  292. // #define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55
  293. // #define LCD_PINS_D5 40
  294. // #define LCD_PINS_D6 42
  295. // #define LCD_PINS_D7 57 // Mega/Due:65 - AGCM4:57
  296. #else
  297. #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
  298. // TO TEST
  299. // #define LCD_PINS_DC 25 // Set as output on init
  300. // #define LCD_PINS_RS 27 // Pull low for 1s to init
  301. // DOGM SPI LCD Support
  302. // #define DOGLCD_CS 16
  303. // #define DOGLCD_MOSI 17
  304. // #define DOGLCD_SCK 23
  305. // #define DOGLCD_A0 LCD_PINS_DC
  306. #else
  307. #define LCD_PINS_RS 16
  308. #define LCD_PINS_ENABLE 17
  309. #define LCD_PINS_D4 23
  310. #define LCD_PINS_D5 25
  311. #define LCD_PINS_D6 27
  312. #endif
  313. #define LCD_PINS_D7 29
  314. #if DISABLED(NEWPANEL)
  315. #define BEEPER_PIN 33
  316. #endif
  317. #endif
  318. #if DISABLED(NEWPANEL)
  319. // Buttons attached to a shift register
  320. // Not wired yet
  321. //#define SHIFT_CLK 38
  322. //#define SHIFT_LD 42
  323. //#define SHIFT_OUT 40
  324. //#define SHIFT_EN 17
  325. #endif
  326. #endif
  327. //
  328. // LCD Display input pins
  329. //
  330. #if ENABLED(NEWPANEL)
  331. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  332. #define BEEPER_PIN 37
  333. #if ENABLED(CR10_STOCKDISPLAY)
  334. // TO TEST
  335. // #define BTN_EN1 17
  336. // #define BTN_EN2 23
  337. #else
  338. #define BTN_EN1 31
  339. #define BTN_EN2 33
  340. #endif
  341. #define BTN_ENC 35
  342. #ifndef SD_DETECT_PIN
  343. #define SD_DETECT_PIN 49
  344. #endif
  345. #define KILL_PIN 41
  346. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  347. // TO TEST
  348. // #define LCD_BACKLIGHT_PIN 39
  349. #endif
  350. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  351. // TO TEST
  352. // #define BTN_EN1 56 // Mega/Due:64 - AGCM4:56
  353. // #define BTN_EN2 72 // Mega/Due:59 - AGCM4:72
  354. // #define BTN_ENC 55
  355. // #define SD_DETECT_PIN 42
  356. #elif ENABLED(LCD_I2C_PANELOLU2)
  357. // TO TEST
  358. // #define BTN_EN1 47
  359. // #define BTN_EN2 43
  360. // #define BTN_ENC 32
  361. // #define LCD_SDSS SDSS
  362. // #define KILL_PIN 41
  363. #elif ENABLED(LCD_I2C_VIKI)
  364. // TO TEST
  365. // #define BTN_EN1 40 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  366. // #define BTN_EN2 42
  367. // #define BTN_ENC -1
  368. // #define LCD_SDSS SDSS
  369. // #define SD_DETECT_PIN 49
  370. #elif ANY(VIKI2, miniVIKI)
  371. // TO TEST
  372. // #define DOGLCD_CS 45
  373. // #define DOGLCD_A0 44
  374. // #define LCD_SCREEN_ROT_180
  375. // #define BEEPER_PIN 33
  376. // #define STAT_LED_RED_PIN 32
  377. // #define STAT_LED_BLUE_PIN 35
  378. // #define BTN_EN1 22
  379. // #define BTN_EN2 7
  380. // #define BTN_ENC 39
  381. // #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
  382. // #define KILL_PIN 31
  383. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  384. // TO TEST
  385. // #define DOGLCD_CS 29
  386. // #define DOGLCD_A0 27
  387. // #define BEEPER_PIN 23
  388. // #define LCD_BACKLIGHT_PIN 33
  389. // #define BTN_EN1 35
  390. // #define BTN_EN2 37
  391. // #define BTN_ENC 31
  392. // #define LCD_SDSS SDSS
  393. // #define SD_DETECT_PIN 49
  394. // #define KILL_PIN 41
  395. #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864)
  396. // TO TEST
  397. //#define BEEPER_PIN 37
  398. //#define BTN_ENC 35
  399. //#define SD_DETECT_PIN 49
  400. //#ifndef KILL_PIN
  401. // #define KILL_PIN 41
  402. //#endif
  403. #if ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6
  404. // TO TEST
  405. // #define DOGLCD_A0 27
  406. // #define DOGLCD_CS 25
  407. // GLCD features
  408. // Uncomment screen orientation
  409. // #define LCD_SCREEN_ROT_90
  410. // #define LCD_SCREEN_ROT_180
  411. // #define LCD_SCREEN_ROT_270
  412. // not connected to a pin
  413. // #define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
  414. // #define BTN_EN1 31
  415. // #define BTN_EN2 33
  416. #elif ENABLED(FYSETC_MINI_12864)
  417. // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
  418. // TO TEST
  419. // #define DOGLCD_A0 16
  420. // #define DOGLCD_CS 17
  421. // #define BTN_EN1 33
  422. // #define BTN_EN2 31
  423. //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
  424. // results in LCD soft SPI mode 3, SD soft SPI mode 0
  425. // #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally.
  426. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  427. #ifndef RGB_LED_R_PIN
  428. // TO TEST
  429. // #define RGB_LED_R_PIN 25
  430. #endif
  431. #ifndef RGB_LED_G_PIN
  432. // TO TEST
  433. // #define RGB_LED_G_PIN 27
  434. #endif
  435. #ifndef RGB_LED_B_PIN
  436. // TO TEST
  437. // #define RGB_LED_B_PIN 29
  438. #endif
  439. #elif ENABLED(FYSETC_MINI_12864_2_1)
  440. // TO TEST
  441. // #define NEOPIXEL_PIN 25
  442. #endif
  443. #endif
  444. #elif ENABLED(MINIPANEL)
  445. // TO TEST
  446. // #define BEEPER_PIN 42
  447. // not connected to a pin
  448. // #define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
  449. // #define DOGLCD_A0 44
  450. // #define DOGLCD_CS 58 // Mega/Due:66 - AGCM4:58
  451. // GLCD features
  452. // Uncomment screen orientation
  453. // #define LCD_SCREEN_ROT_90
  454. // #define LCD_SCREEN_ROT_180
  455. // #define LCD_SCREEN_ROT_270
  456. // #define BTN_EN1 40
  457. // #define BTN_EN2 55 // Mega/Due:63 - AGCM4:55
  458. // #define BTN_ENC 72 // Mega/Due:59 - AGCM4:72
  459. // #define SD_DETECT_PIN 49
  460. // #define KILL_PIN 56 // Mega/Due:64 - AGCM4:56
  461. #elif ENABLED(ZONESTAR_LCD)
  462. // TO TEST
  463. // #define ADC_KEYPAD_PIN 12
  464. #elif ENABLED(AZSMZ_12864)
  465. // TO TEST
  466. #else
  467. // Beeper on AUX-4
  468. // #define BEEPER_PIN 33
  469. // Buttons are directly attached to AUX-2
  470. #if ENABLED(REPRAPWORLD_KEYPAD)
  471. // TO TEST
  472. // #define SHIFT_OUT 40
  473. // #define SHIFT_CLK 44
  474. // #define SHIFT_LD 42
  475. // #define BTN_EN1 56 // Mega/Due:64 - AGCM4:56
  476. // #define BTN_EN2 72 // Mega/Due:59 - AGCM4:72
  477. // #define BTN_ENC 55 // Mega/Due:63 - AGCM4:55
  478. #elif ENABLED(PANEL_ONE)
  479. // TO TEST
  480. // #define BTN_EN1 72 // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72)
  481. // #define BTN_EN2 55 // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55)
  482. // #define BTN_ENC 49 // AUX3 PIN 7
  483. #else
  484. // TO TEST
  485. // #define BTN_EN1 37
  486. // #define BTN_EN2 35
  487. // #define BTN_ENC 31
  488. #endif
  489. #if ENABLED(G3D_PANEL)
  490. // TO TEST
  491. // #define SD_DETECT_PIN 49
  492. // #define KILL_PIN 41
  493. #endif
  494. #endif
  495. #endif // NEWPANEL
  496. #endif // HAS_SPI_LCD
  497. //
  498. // SD Support
  499. //
  500. #ifndef SDCARD_CONNECTION
  501. #define SDCARD_CONNECTION ONBOARD
  502. #endif
  503. #if SD_CONNECTION_IS(ONBOARD)
  504. #undef SDSS
  505. #define SDSS 83
  506. #undef SD_DETECT_PIN
  507. #define SD_DETECT_PIN 95
  508. #endif