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_MKS_ROBIN_LITE.h 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. #include "env_validate.h"
  24. #if HAS_MULTI_HOTEND || E_STEPPERS > 1
  25. #error "MKS Robin Lite only supports one hotend / E-stepper. Comment out this line to continue."
  26. #endif
  27. #ifndef BOARD_INFO_NAME
  28. #define BOARD_INFO_NAME "MKS Robin Lite"
  29. #endif
  30. #define BOARD_WEBSITE_URL "github.com/makerbase-mks"
  31. #define BOARD_NO_NATIVE_USB
  32. //#define DISABLE_DEBUG
  33. #define DISABLE_JTAG
  34. //
  35. // Limit Switches
  36. //
  37. #define X_STOP_PIN PC13
  38. #define Y_STOP_PIN PC0
  39. #define Z_MIN_PIN PC12
  40. #define Z_MAX_PIN PB9
  41. //
  42. // Steppers
  43. //
  44. #define X_STEP_PIN PC6
  45. #define X_DIR_PIN PB12
  46. #define X_ENABLE_PIN PB10
  47. #define Y_STEP_PIN PB11
  48. #define Y_DIR_PIN PB2
  49. #define Y_ENABLE_PIN PB10
  50. #define Z_STEP_PIN PB1
  51. #define Z_DIR_PIN PC5
  52. #define Z_ENABLE_PIN PB10
  53. #define E0_STEP_PIN PC4
  54. #define E0_DIR_PIN PA5
  55. #define E0_ENABLE_PIN PA4
  56. //
  57. // Heaters / Fans
  58. //
  59. #define HEATER_0_PIN PC9
  60. #define FAN_PIN PA8
  61. #define HEATER_BED_PIN PC8
  62. //
  63. // Temperature Sensors
  64. //
  65. #define TEMP_BED_PIN PA1
  66. #define TEMP_0_PIN PA0
  67. #define FIL_RUNOUT_PIN PB8 // MT_DET
  68. /** ------
  69. * (BEEPER) PD2 |10 9 | PB3 (BTN_ENC)
  70. * (BTN_EN1) PB5 | 8 7 | PA11 (RESET?)
  71. * (BTN_EN2) PB4 6 5 | PC1 (LCD_D4)
  72. * (LCD_RS) PC3 | 4 3 | PC2 (LCD_EN)
  73. * GND | 2 1 | 5V
  74. * ------
  75. * "E3" EXP1
  76. */
  77. #define E3_EXP1_01_PIN -1 // 5V
  78. #define E3_EXP1_02_PIN -1 // GND
  79. #define E3_EXP1_03_PIN PC2
  80. #define E3_EXP1_04_PIN PC3
  81. #define E3_EXP1_05_PIN PC1
  82. #define E3_EXP1_06_PIN PB4
  83. #define E3_EXP1_07_PIN PA11 // RESET?
  84. #define E3_EXP1_08_PIN PB5
  85. #define E3_EXP1_09_PIN PB3
  86. #define E3_EXP1_10_PIN PD2
  87. //
  88. // LCD Pins
  89. //
  90. #if HAS_WIRED_LCD
  91. #define BEEPER_PIN E3_EXP1_10_PIN
  92. #define BTN_ENC E3_EXP1_09_PIN
  93. #define LCD_PINS_RS E3_EXP1_04_PIN
  94. #define BTN_EN1 E3_EXP1_08_PIN
  95. #define BTN_EN2 E3_EXP1_06_PIN
  96. #define LCD_PINS_ENABLE E3_EXP1_03_PIN
  97. #if ENABLED(MKS_MINI_12864)
  98. #define LCD_BACKLIGHT_PIN -1
  99. #define LCD_RESET_PIN -1
  100. #define DOGLCD_A0 E3_EXP1_05_PIN
  101. #define DOGLCD_CS E3_EXP1_03_PIN
  102. #define DOGLCD_SCK PB13
  103. #define DOGLCD_MOSI PB15
  104. #else // !MKS_MINI_12864
  105. #define LCD_PINS_D4 E3_EXP1_05_PIN
  106. #if IS_ULTIPANEL
  107. #define LCD_PINS_D5 -1
  108. #define LCD_PINS_D6 -1
  109. #define LCD_PINS_D7 -1
  110. #endif
  111. #endif // !MKS_MINI_12864
  112. // Alter timing for graphical display
  113. #if IS_U8GLIB_ST7920
  114. #define BOARD_ST7920_DELAY_1 125
  115. #define BOARD_ST7920_DELAY_2 125
  116. #define BOARD_ST7920_DELAY_3 125
  117. #endif
  118. #endif // HAS_WIRED_LCD
  119. // Motor current PWM pins
  120. #define MOTOR_CURRENT_PWM_XY_PIN PB0
  121. #define MOTOR_CURRENT_PWM_Z_PIN PA7
  122. #define MOTOR_CURRENT_PWM_E_PIN PA6
  123. #define MOTOR_CURRENT_PWM_RANGE (65535/10/3.3) // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
  124. #define DEFAULT_PWM_MOTOR_CURRENT { 1000, 1000, 1000 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
  125. //
  126. // SD Card
  127. //
  128. #define SD_DETECT_PIN PC10
  129. //
  130. // SPI
  131. //
  132. #define SPI_DEVICE 2
  133. #define SD_SCK_PIN PB13
  134. #define SD_MISO_PIN PB14
  135. #define SD_MOSI_PIN PB15
  136. #define SD_SS_PIN PA15
  137. // EXP1 replace LCD with keys for EasyThreeD ET4000+ Mainboard
  138. #if ENABLED(EASYTHREED_UI)
  139. #define BTN_HOME E3_EXP1_04_PIN // INPUT_PULLUP (unused)
  140. #define BTN_FEED E3_EXP1_09_PIN // Run E Forward
  141. #define BTN_RETRACT E3_EXP1_08_PIN // Run E Backward
  142. #define BTN_PRINT E3_EXP1_07_PIN // Start File Print
  143. #define BTN_HOME_GND E3_EXP1_03_PIN // OUTPUT (LOW)
  144. #define BTN_FEED_GND E3_EXP1_06_PIN // OUTPUT (LOW)
  145. #define BTN_RETRACT_GND E3_EXP1_05_PIN // OUTPUT (LOW)
  146. #define EASYTHREED_LED_PIN E3_EXP1_10_PIN // Indicator LED
  147. #endif