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 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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. #ifndef __STM32F1__
  24. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  25. #endif
  26. #if HOTENDS > 1 || E_STEPPERS > 1
  27. #error "MKS Robin Lite supports up to 1 hotends / E-steppers. Comment out this line to continue."
  28. #endif
  29. #ifndef BOARD_INFO_NAME
  30. #define BOARD_INFO_NAME "MKS Robin Lite"
  31. #endif
  32. #define BOARD_WEBSITE_URL "github.com/makerbase-mks"
  33. //#define DISABLE_DEBUG
  34. #define DISABLE_JTAG
  35. #define ENABLE_SPI2
  36. //
  37. // Limit Switches
  38. //
  39. #define X_STOP_PIN PC13
  40. #define Y_STOP_PIN PC0
  41. #define Z_MIN_PIN PC12
  42. #define Z_MAX_PIN PB9
  43. //
  44. // Steppers
  45. //
  46. #define X_STEP_PIN PC6
  47. #define X_DIR_PIN PB12
  48. #define X_ENABLE_PIN PB10
  49. #define Y_STEP_PIN PB11
  50. #define Y_DIR_PIN PB2
  51. #define Y_ENABLE_PIN PB10
  52. #define Z_STEP_PIN PB1
  53. #define Z_DIR_PIN PC5
  54. #define Z_ENABLE_PIN PB10
  55. #define E0_STEP_PIN PC4
  56. #define E0_DIR_PIN PA5
  57. #define E0_ENABLE_PIN PA4
  58. //
  59. // Heaters / Fans
  60. //
  61. #define HEATER_0_PIN PC9
  62. #define FAN_PIN PA8
  63. #define HEATER_BED_PIN PC8
  64. //
  65. // Temperature Sensors
  66. //
  67. #define TEMP_BED_PIN PA1
  68. #define TEMP_0_PIN PA0
  69. #define FIL_RUNOUT_PIN PB8 // MT_DET
  70. //
  71. // LCD Pins
  72. //
  73. #if HAS_SPI_LCD
  74. #define BEEPER_PIN PD2
  75. #define BTN_ENC PB3
  76. #define LCD_PINS_RS PC3
  77. #define BTN_EN1 PB5
  78. #define BTN_EN2 PB4
  79. #define LCD_PINS_ENABLE PC2
  80. #if ENABLED(MKS_MINI_12864)
  81. #define LCD_BACKLIGHT_PIN -1
  82. #define LCD_RESET_PIN -1
  83. #define DOGLCD_A0 PC1
  84. #define DOGLCD_CS PC2
  85. #define DOGLCD_SCK PB13
  86. #define DOGLCD_MOSI PB15
  87. #else // !MKS_MINI_12864
  88. #define LCD_PINS_D4 PC1
  89. #if ENABLED(ULTIPANEL)
  90. #define LCD_PINS_D5 -1
  91. #define LCD_PINS_D6 -1
  92. #define LCD_PINS_D7 -1
  93. #endif
  94. #endif // !MKS_MINI_12864
  95. #endif // HAS_SPI_LCD
  96. // Motor current PWM pins
  97. #define MOTOR_CURRENT_PWM_XY_PIN PB0
  98. #define MOTOR_CURRENT_PWM_Z_PIN PA7
  99. #define MOTOR_CURRENT_PWM_E_PIN PA6
  100. #define MOTOR_CURRENT_PWM_RANGE (65535/10/3.3) // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
  101. #define DEFAULT_PWM_MOTOR_CURRENT { 1000, 1000, 1000 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
  102. //
  103. // SD Card
  104. //
  105. #define ENABLE_SPI2
  106. #define SD_DETECT_PIN PC10
  107. #define SCK_PIN PB13
  108. #define MISO_PIN P1B4
  109. #define MOSI_PIN P1B5
  110. #define SS_PIN PA15
  111. #ifndef ST7920_DELAY_1
  112. #define ST7920_DELAY_1 DELAY_NS(125)
  113. #endif
  114. #ifndef ST7920_DELAY_2
  115. #define ST7920_DELAY_2 DELAY_NS(125)
  116. #endif
  117. #ifndef ST7920_DELAY_3
  118. #define ST7920_DELAY_3 DELAY_NS(125)
  119. #endif