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.h 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  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. * Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
  25. *
  26. * Applies to the following boards:
  27. *
  28. * RAMPS_14_EFB (Hotend, Fan, Bed)
  29. * RAMPS_14_EEB (Hotend0, Hotend1, Bed)
  30. * RAMPS_14_EFF (Hotend, Fan0, Fan1)
  31. * RAMPS_14_EEF (Hotend0, Hotend1, Fan)
  32. * RAMPS_14_SF (Spindle, Controller Fan)
  33. *
  34. * RAMPS_13_EFB (Hotend, Fan, Bed)
  35. * RAMPS_13_EEB (Hotend0, Hotend1, Bed)
  36. * RAMPS_13_EFF (Hotend, Fan0, Fan1)
  37. * RAMPS_13_EEF (Hotend0, Hotend1, Fan)
  38. * RAMPS_13_SF (Spindle, Controller Fan)
  39. *
  40. * Other pins_MYBOARD.h files may override these defaults
  41. *
  42. * Differences between
  43. * RAMPS_13 | RAMPS_14
  44. * 7 | 11
  45. */
  46. #ifdef TARGET_LPC1768
  47. #error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768."
  48. #elif defined(__STM32F1__)
  49. #error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1."
  50. #endif
  51. #if NOT_TARGET(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768, __AVR_ATmega1280__, __AVR_ATmega2560__)
  52. #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
  53. #endif
  54. // Custom flags and defines for the build
  55. //#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
  56. #ifndef BOARD_INFO_NAME
  57. #define BOARD_INFO_NAME "RAMPS 1.4"
  58. #endif
  59. //
  60. // Servos
  61. //
  62. #ifndef SERVO0_PIN
  63. #ifdef IS_RAMPS_13
  64. #define SERVO0_PIN 7
  65. #else
  66. #define SERVO0_PIN 11
  67. #endif
  68. #endif
  69. #ifndef SERVO1_PIN
  70. #define SERVO1_PIN 6
  71. #endif
  72. #ifndef SERVO2_PIN
  73. #define SERVO2_PIN 5
  74. #endif
  75. #ifndef SERVO3_PIN
  76. #define SERVO3_PIN 4
  77. #endif
  78. //
  79. // Limit Switches
  80. //
  81. #ifndef X_STOP_PIN
  82. #ifndef X_MIN_PIN
  83. #define X_MIN_PIN 3
  84. #endif
  85. #ifndef X_MAX_PIN
  86. #define X_MAX_PIN 2
  87. #endif
  88. #endif
  89. #ifndef Y_STOP_PIN
  90. #ifndef Y_MIN_PIN
  91. #define Y_MIN_PIN 14
  92. #endif
  93. #ifndef Y_MAX_PIN
  94. #define Y_MAX_PIN 15
  95. #endif
  96. #endif
  97. #ifndef Z_STOP_PIN
  98. #ifndef Z_MIN_PIN
  99. #define Z_MIN_PIN 18
  100. #endif
  101. #ifndef Z_MAX_PIN
  102. #define Z_MAX_PIN 19
  103. #endif
  104. #endif
  105. //
  106. // Z Probe (when not Z_MIN_PIN)
  107. //
  108. #ifndef Z_MIN_PROBE_PIN
  109. #define Z_MIN_PROBE_PIN 32
  110. #endif
  111. //
  112. // Steppers
  113. //
  114. #define X_STEP_PIN 54
  115. #define X_DIR_PIN 55
  116. #define X_ENABLE_PIN 38
  117. #ifndef X_CS_PIN
  118. #define X_CS_PIN 53
  119. #endif
  120. #define Y_STEP_PIN 60
  121. #define Y_DIR_PIN 61
  122. #define Y_ENABLE_PIN 56
  123. #ifndef Y_CS_PIN
  124. #define Y_CS_PIN 49
  125. #endif
  126. #ifndef Z_STEP_PIN
  127. #define Z_STEP_PIN 46
  128. #endif
  129. #define Z_DIR_PIN 48
  130. #define Z_ENABLE_PIN 62
  131. #ifndef Z_CS_PIN
  132. #define Z_CS_PIN 40
  133. #endif
  134. #define E0_STEP_PIN 26
  135. #define E0_DIR_PIN 28
  136. #define E0_ENABLE_PIN 24
  137. #ifndef E0_CS_PIN
  138. #define E0_CS_PIN 42
  139. #endif
  140. #define E1_STEP_PIN 36
  141. #define E1_DIR_PIN 34
  142. #define E1_ENABLE_PIN 30
  143. #ifndef E1_CS_PIN
  144. #define E1_CS_PIN 44
  145. #endif
  146. //
  147. // Temperature Sensors
  148. //
  149. #ifndef TEMP_0_PIN
  150. #define TEMP_0_PIN 13 // Analog Input
  151. #endif
  152. #ifndef TEMP_1_PIN
  153. #define TEMP_1_PIN 15 // Analog Input
  154. #endif
  155. #ifndef TEMP_BED_PIN
  156. #define TEMP_BED_PIN 14 // Analog Input
  157. #endif
  158. //
  159. // SPI for Max6675 or Max31855 Thermocouple
  160. //
  161. #ifndef MAX6675_SS_PIN
  162. #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN)
  163. #endif
  164. //
  165. // Augmentation for auto-assigning RAMPS plugs
  166. //
  167. #if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
  168. #if HAS_MULTI_HOTEND
  169. #if TEMP_SENSOR_BED
  170. #define IS_RAMPS_EEB
  171. #else
  172. #define IS_RAMPS_EEF
  173. #endif
  174. #elif TEMP_SENSOR_BED
  175. #define IS_RAMPS_EFB
  176. #else
  177. #define IS_RAMPS_EFF
  178. #endif
  179. #endif
  180. //
  181. // Heaters / Fans
  182. //
  183. #ifndef MOSFET_D_PIN
  184. #define MOSFET_D_PIN -1
  185. #endif
  186. #ifndef RAMPS_D8_PIN
  187. #define RAMPS_D8_PIN 8
  188. #endif
  189. #ifndef RAMPS_D9_PIN
  190. #define RAMPS_D9_PIN 9
  191. #endif
  192. #ifndef RAMPS_D10_PIN
  193. #define RAMPS_D10_PIN 10
  194. #endif
  195. #define HEATER_0_PIN RAMPS_D10_PIN
  196. #if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
  197. #define HEATER_BED_PIN RAMPS_D8_PIN
  198. #elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
  199. #define HEATER_1_PIN RAMPS_D9_PIN
  200. #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
  201. #define HEATER_1_PIN RAMPS_D9_PIN
  202. #define HEATER_BED_PIN RAMPS_D8_PIN
  203. #elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
  204. #define FAN1_PIN RAMPS_D8_PIN
  205. #elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
  206. #define HEATER_BED_PIN RAMPS_D8_PIN
  207. #if HOTENDS == 1
  208. #define FAN1_PIN MOSFET_D_PIN
  209. #else
  210. #define HEATER_1_PIN MOSFET_D_PIN
  211. #endif
  212. #endif
  213. #ifndef FAN_PIN
  214. #if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
  215. #define FAN_PIN RAMPS_D9_PIN
  216. #elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
  217. #define FAN_PIN RAMPS_D8_PIN
  218. #elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
  219. #define FAN_PIN 4 // IO pin. Buffer needed
  220. #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
  221. #define FAN_PIN RAMPS_D9_PIN
  222. #endif
  223. #endif
  224. //
  225. // Misc. Functions
  226. //
  227. #define SDSS 53
  228. #define LED_PIN 13
  229. #ifndef FILWIDTH_PIN
  230. #define FILWIDTH_PIN 5 // Analog Input on AUX2
  231. #endif
  232. // RAMPS 1.4 DIO 4 on the servos connector
  233. #ifndef FIL_RUNOUT_PIN
  234. #define FIL_RUNOUT_PIN 4
  235. #endif
  236. #ifndef PS_ON_PIN
  237. #define PS_ON_PIN 12
  238. #endif
  239. #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
  240. #if NUM_SERVOS <= 1 // Prefer the servo connector
  241. #define CASE_LIGHT_PIN 6 // Hardware PWM
  242. #elif HAS_FREE_AUX2_PINS
  243. #define CASE_LIGHT_PIN 44 // Hardware PWM
  244. #endif
  245. #endif
  246. //
  247. // M3/M4/M5 - Spindle/Laser Control
  248. //
  249. #if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN)
  250. #if !NUM_SERVOS // Use servo connector if possible
  251. #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
  252. #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
  253. #define SPINDLE_DIR_PIN 5
  254. #elif HAS_FREE_AUX2_PINS
  255. #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown!
  256. #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
  257. #define SPINDLE_DIR_PIN 65
  258. #else
  259. #error "No auto-assignable Spindle/Laser pins available."
  260. #endif
  261. #endif
  262. //
  263. // TMC software SPI
  264. //
  265. #if ENABLED(TMC_USE_SW_SPI)
  266. #ifndef TMC_SW_MOSI
  267. #define TMC_SW_MOSI 66
  268. #endif
  269. #ifndef TMC_SW_MISO
  270. #define TMC_SW_MISO 44
  271. #endif
  272. #ifndef TMC_SW_SCK
  273. #define TMC_SW_SCK 64
  274. #endif
  275. #endif
  276. #if HAS_TMC_UART
  277. /**
  278. * TMC2208/TMC2209 stepper drivers
  279. *
  280. * Hardware serial communication ports.
  281. * If undefined software serial is used according to the pins below
  282. */
  283. //#define X_HARDWARE_SERIAL Serial1
  284. //#define X2_HARDWARE_SERIAL Serial1
  285. //#define Y_HARDWARE_SERIAL Serial1
  286. //#define Y2_HARDWARE_SERIAL Serial1
  287. //#define Z_HARDWARE_SERIAL Serial1
  288. //#define Z2_HARDWARE_SERIAL Serial1
  289. //#define E0_HARDWARE_SERIAL Serial1
  290. //#define E1_HARDWARE_SERIAL Serial1
  291. //#define E2_HARDWARE_SERIAL Serial1
  292. //#define E3_HARDWARE_SERIAL Serial1
  293. //#define E4_HARDWARE_SERIAL Serial1
  294. //
  295. // Software serial
  296. //
  297. #ifndef X_SERIAL_TX_PIN
  298. #define X_SERIAL_TX_PIN 40
  299. #endif
  300. #ifndef X_SERIAL_RX_PIN
  301. #define X_SERIAL_RX_PIN 63
  302. #endif
  303. #ifndef X2_SERIAL_TX_PIN
  304. #define X2_SERIAL_TX_PIN -1
  305. #endif
  306. #ifndef X2_SERIAL_RX_PIN
  307. #define X2_SERIAL_RX_PIN -1
  308. #endif
  309. #ifndef Y_SERIAL_TX_PIN
  310. #define Y_SERIAL_TX_PIN 59
  311. #endif
  312. #ifndef Y_SERIAL_RX_PIN
  313. #define Y_SERIAL_RX_PIN 64
  314. #endif
  315. #ifndef Y2_SERIAL_TX_PIN
  316. #define Y2_SERIAL_TX_PIN -1
  317. #endif
  318. #ifndef Y2_SERIAL_RX_PIN
  319. #define Y2_SERIAL_RX_PIN -1
  320. #endif
  321. #ifndef Z_SERIAL_TX_PIN
  322. #define Z_SERIAL_TX_PIN 42
  323. #endif
  324. #ifndef Z_SERIAL_RX_PIN
  325. #define Z_SERIAL_RX_PIN 65
  326. #endif
  327. #ifndef Z2_SERIAL_TX_PIN
  328. #define Z2_SERIAL_TX_PIN -1
  329. #endif
  330. #ifndef Z2_SERIAL_RX_PIN
  331. #define Z2_SERIAL_RX_PIN -1
  332. #endif
  333. #ifndef E0_SERIAL_TX_PIN
  334. #define E0_SERIAL_TX_PIN 44
  335. #endif
  336. #ifndef E0_SERIAL_RX_PIN
  337. #define E0_SERIAL_RX_PIN 66
  338. #endif
  339. #ifndef E1_SERIAL_TX_PIN
  340. #define E1_SERIAL_TX_PIN -1
  341. #endif
  342. #ifndef E1_SERIAL_RX_PIN
  343. #define E1_SERIAL_RX_PIN -1
  344. #endif
  345. #ifndef E2_SERIAL_TX_PIN
  346. #define E2_SERIAL_TX_PIN -1
  347. #endif
  348. #ifndef E2_SERIAL_RX_PIN
  349. #define E2_SERIAL_RX_PIN -1
  350. #endif
  351. #ifndef E3_SERIAL_TX_PIN
  352. #define E3_SERIAL_TX_PIN -1
  353. #endif
  354. #ifndef E3_SERIAL_RX_PIN
  355. #define E3_SERIAL_RX_PIN -1
  356. #endif
  357. #ifndef E4_SERIAL_TX_PIN
  358. #define E4_SERIAL_TX_PIN -1
  359. #endif
  360. #ifndef E4_SERIAL_RX_PIN
  361. #define E4_SERIAL_RX_PIN -1
  362. #endif
  363. #ifndef E5_SERIAL_TX_PIN
  364. #define E5_SERIAL_TX_PIN -1
  365. #endif
  366. #ifndef E5_SERIAL_RX_PIN
  367. #define E5_SERIAL_RX_PIN -1
  368. #endif
  369. #ifndef E6_SERIAL_TX_PIN
  370. #define E6_SERIAL_TX_PIN -1
  371. #endif
  372. #ifndef E6_SERIAL_RX_PIN
  373. #define E6_SERIAL_RX_PIN -1
  374. #endif
  375. #ifndef E7_SERIAL_TX_PIN
  376. #define E7_SERIAL_TX_PIN -1
  377. #endif
  378. #ifndef E7_SERIAL_RX_PIN
  379. #define E7_SERIAL_RX_PIN -1
  380. #endif
  381. #endif
  382. //
  383. // Průša i3 MK2 Multiplexer Support
  384. //
  385. #ifndef E_MUX0_PIN
  386. #define E_MUX0_PIN 40 // Z_CS_PIN
  387. #endif
  388. #ifndef E_MUX1_PIN
  389. #define E_MUX1_PIN 42 // E0_CS_PIN
  390. #endif
  391. #ifndef E_MUX2_PIN
  392. #define E_MUX2_PIN 44 // E1_CS_PIN
  393. #endif
  394. //////////////////////////
  395. // LCDs and Controllers //
  396. //////////////////////////
  397. #if HAS_WIRED_LCD
  398. //
  399. // LCD Display output pins
  400. //
  401. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  402. #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  403. #define LCD_PINS_ENABLE 51 // SID (MOSI)
  404. #define LCD_PINS_D4 52 // SCK (CLK) clock
  405. #elif BOTH(IS_NEWPANEL, PANEL_ONE)
  406. #define LCD_PINS_RS 40
  407. #define LCD_PINS_ENABLE 42
  408. #define LCD_PINS_D4 65
  409. #define LCD_PINS_D5 66
  410. #define LCD_PINS_D6 44
  411. #define LCD_PINS_D7 64
  412. #elif ENABLED(TFTGLCD_PANEL_SPI)
  413. #define TFTGLCD_CS 33
  414. #else
  415. #if ENABLED(CR10_STOCKDISPLAY)
  416. #define LCD_PINS_RS 27
  417. #define LCD_PINS_ENABLE 29
  418. #define LCD_PINS_D4 25
  419. #if !IS_NEWPANEL
  420. #define BEEPER_PIN 37
  421. #endif
  422. #elif ENABLED(ZONESTAR_LCD)
  423. #define LCD_PINS_RS 64
  424. #define LCD_PINS_ENABLE 44
  425. #define LCD_PINS_D4 63
  426. #define LCD_PINS_D5 40
  427. #define LCD_PINS_D6 42
  428. #define LCD_PINS_D7 65
  429. #else
  430. #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
  431. #define LCD_PINS_DC 25 // Set as output on init
  432. #define LCD_PINS_RS 27 // Pull low for 1s to init
  433. // DOGM SPI LCD Support
  434. #define DOGLCD_A0 LCD_PINS_DC
  435. #define DOGLCD_CS 16
  436. #define DOGLCD_MOSI 17
  437. #define DOGLCD_SCK 23
  438. #else
  439. #define LCD_PINS_RS 16
  440. #define LCD_PINS_ENABLE 17
  441. #define LCD_PINS_D4 23
  442. #define LCD_PINS_D5 25
  443. #define LCD_PINS_D6 27
  444. #endif
  445. #define LCD_PINS_D7 29
  446. #if !IS_NEWPANEL
  447. #define BEEPER_PIN 33
  448. #endif
  449. #endif
  450. #if !IS_NEWPANEL
  451. // Buttons attached to a shift register
  452. // Not wired yet
  453. //#define SHIFT_CLK 38
  454. //#define SHIFT_LD 42
  455. //#define SHIFT_OUT 40
  456. //#define SHIFT_EN 17
  457. #endif
  458. #endif
  459. //
  460. // LCD Display input pins
  461. //
  462. #if IS_NEWPANEL
  463. #if IS_RRD_SC
  464. #define BEEPER_PIN 37
  465. #if ENABLED(CR10_STOCKDISPLAY)
  466. #define BTN_EN1 17
  467. #define BTN_EN2 23
  468. #else
  469. #define BTN_EN1 31
  470. #define BTN_EN2 33
  471. #endif
  472. #define BTN_ENC 35
  473. #ifndef SD_DETECT_PIN
  474. #define SD_DETECT_PIN 49
  475. #endif
  476. #ifndef KILL_PIN
  477. #define KILL_PIN 41
  478. #endif
  479. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  480. #define LCD_BACKLIGHT_PIN 39
  481. #endif
  482. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  483. #define BTN_EN1 64
  484. #define BTN_EN2 59
  485. #define BTN_ENC 63
  486. #define SD_DETECT_PIN 42
  487. #elif ENABLED(LCD_I2C_PANELOLU2)
  488. #define BTN_EN1 47
  489. #define BTN_EN2 43
  490. #define BTN_ENC 32
  491. #define LCD_SDSS SDSS
  492. #define KILL_PIN 41
  493. #elif ENABLED(LCD_I2C_VIKI)
  494. #define BTN_EN1 40 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  495. #define BTN_EN2 42
  496. #define BTN_ENC -1
  497. #define LCD_SDSS SDSS
  498. #define SD_DETECT_PIN 49
  499. #elif ANY(VIKI2, miniVIKI)
  500. #define DOGLCD_CS 45
  501. #define DOGLCD_A0 44
  502. #define LCD_SCREEN_ROT_180
  503. #define BEEPER_PIN 33
  504. #define STAT_LED_RED_PIN 32
  505. #define STAT_LED_BLUE_PIN 35
  506. #define BTN_EN1 22
  507. #define BTN_EN2 7
  508. #define BTN_ENC 39
  509. #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
  510. #define KILL_PIN 31
  511. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  512. #define DOGLCD_CS 29
  513. #define DOGLCD_A0 27
  514. #define BEEPER_PIN 23
  515. #define LCD_BACKLIGHT_PIN 33
  516. #define BTN_EN1 35
  517. #define BTN_EN2 37
  518. #define BTN_ENC 31
  519. #define LCD_SDSS SDSS
  520. #define SD_DETECT_PIN 49
  521. #define KILL_PIN 41
  522. #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864)
  523. #define BEEPER_PIN 37
  524. #define BTN_ENC 35
  525. #define SD_DETECT_PIN 49
  526. #ifndef KILL_PIN
  527. #define KILL_PIN 41
  528. #endif
  529. #if ENABLED(MKS_MINI_12864)
  530. #define DOGLCD_A0 27
  531. #define DOGLCD_CS 25
  532. // GLCD features
  533. // Uncomment screen orientation
  534. //#define LCD_SCREEN_ROT_90
  535. //#define LCD_SCREEN_ROT_180
  536. //#define LCD_SCREEN_ROT_270
  537. // not connected to a pin
  538. #define LCD_BACKLIGHT_PIN -1 // 65 (MKS mini12864 can't adjust backlight by software!)
  539. #define BTN_EN1 31
  540. #define BTN_EN2 33
  541. #elif ENABLED(FYSETC_MINI_12864)
  542. // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
  543. #define DOGLCD_A0 16
  544. #define DOGLCD_CS 17
  545. #define BTN_EN1 33
  546. #define BTN_EN2 31
  547. //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
  548. // results in LCD soft SPI mode 3, SD soft SPI mode 0
  549. #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally.
  550. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  551. #ifndef RGB_LED_R_PIN
  552. #define RGB_LED_R_PIN 25
  553. #endif
  554. #ifndef RGB_LED_G_PIN
  555. #define RGB_LED_G_PIN 27
  556. #endif
  557. #ifndef RGB_LED_B_PIN
  558. #define RGB_LED_B_PIN 29
  559. #endif
  560. #elif ENABLED(FYSETC_MINI_12864_2_1)
  561. #define NEOPIXEL_PIN 25
  562. #endif
  563. #endif
  564. #elif ENABLED(MINIPANEL)
  565. #define BEEPER_PIN 42
  566. // not connected to a pin
  567. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  568. #define DOGLCD_A0 44
  569. #define DOGLCD_CS 66
  570. // GLCD features
  571. // Uncomment screen orientation
  572. //#define LCD_SCREEN_ROT_90
  573. //#define LCD_SCREEN_ROT_180
  574. //#define LCD_SCREEN_ROT_270
  575. #define BTN_EN1 40
  576. #define BTN_EN2 63
  577. #define BTN_ENC 59
  578. #define SD_DETECT_PIN 49
  579. #define KILL_PIN 64
  580. #elif ENABLED(ZONESTAR_LCD)
  581. #define ADC_KEYPAD_PIN 12
  582. #elif ENABLED(AZSMZ_12864)
  583. // Pins only defined for RAMPS_SMART currently
  584. #error "No pins defined for RAMPS with AZSMZ_12864."
  585. #elif IS_TFTGLCD_PANEL
  586. #define SD_DETECT_PIN 49
  587. #else
  588. // Beeper on AUX-4
  589. #define BEEPER_PIN 33
  590. // Buttons are directly attached to AUX-2
  591. #if ENABLED(PANEL_ONE)
  592. #define BTN_EN1 59 // AUX2 PIN 3
  593. #define BTN_EN2 63 // AUX2 PIN 4
  594. #define BTN_ENC 49 // AUX3 PIN 7
  595. #else
  596. #define BTN_EN1 37
  597. #define BTN_EN2 35
  598. #define BTN_ENC 31
  599. #endif
  600. #if ENABLED(G3D_PANEL)
  601. #define SD_DETECT_PIN 49
  602. #define KILL_PIN 41
  603. #endif
  604. #endif
  605. #endif // IS_NEWPANEL
  606. #endif // HAS_WIRED_LCD
  607. #if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS
  608. #define SHIFT_OUT 40
  609. #define SHIFT_CLK 44
  610. #define SHIFT_LD 42
  611. #ifndef BTN_EN1
  612. #define BTN_EN1 64
  613. #endif
  614. #ifndef BTN_EN2
  615. #define BTN_EN2 59
  616. #endif
  617. #ifndef BTN_ENC
  618. #define BTN_ENC 63
  619. #endif
  620. #endif
  621. #if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
  622. #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. Comment out this line to continue."
  623. /** FYSETC TFT TFT81050 display pinout
  624. *
  625. * Board Display
  626. * _____ _____
  627. * (SCK) D52 | 1 2 | D50 (MISO) MISO | 1 2 | SCK
  628. * (SD_CS) D53 | 3 4 | D33 (BNT_EN2) (BNT_EN2) MOD_RESET | 3 4 | SD_CS
  629. * (MOSI) D51 | 5 6 D31 (BNT_EN1) (BNT_EN1) LCD_CS | 5 6 MOSI
  630. * RESET | 7 8 | D49 (SD_DET) SD_DET | 7 8 | RESET
  631. * NC | 9 10| GND GND | 9 10| 5V
  632. * ----- -----
  633. * EXP2 EXP1
  634. *
  635. * Needs custom cable:
  636. *
  637. * Board Adapter Display
  638. * _________
  639. * EXP2-1 ----------- EXP1-10
  640. * EXP2-2 ----------- EXP1-9
  641. * EXP2-4 ----------- EXP1-8
  642. * EXP2-4 ----------- EXP1-7
  643. * EXP2-3 ----------- EXP1-6
  644. * EXP2-6 ----------- EXP1-5
  645. * EXP2-7 ----------- EXP1-4
  646. * EXP2-8 ----------- EXP1-3
  647. * EXP2-1 ----------- EXP1-2
  648. * EXP1-10 ----------- EXP1-1
  649. *
  650. * NOTE: The MISO pin should not get a 5V signal.
  651. * To fix, insert a 1N4148 diode in the MISO line.
  652. */
  653. #define BEEPER_PIN 37
  654. #define SD_DETECT_PIN 49
  655. #define CLCD_MOD_RESET 31
  656. #define CLCD_SPI_CS 33
  657. #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050