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

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