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_RAMPS_144.h 17KB

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