Advertisement
edensan

pin.h

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