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

pins_RAMPS_144.h 17KB

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