My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pins_MKS_ROBIN_MINI.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. /**
  24. * MKS Robin MINI (STM32F130VET6) board pin assignments
  25. */
  26. #ifndef __STM32F1__
  27. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  28. #elif HOTENDS > 1 || E_STEPPERS > 1
  29. #error "MKS Robin mini supports up to 1 hotends / E-steppers. Comment out this line to continue."
  30. #endif
  31. #define BOARD_INFO_NAME "MKS Robin mini"
  32. //
  33. // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
  34. //
  35. #define DISABLE_DEBUG
  36. #define FLASH_EEPROM_EMULATION
  37. // 2K in a AT24C16N
  38. #define EEPROM_PAGE_SIZE (uint16)0x800 // 2048
  39. #define EEPROM_START_ADDRESS ((uint32)(0x8000000 + 512 * 1024 - 2 * EEPROM_PAGE_SIZE))
  40. #define E2END (EEPROM_PAGE_SIZE - 1)
  41. //
  42. // Note: MKS Robin mini board is using SPI2 interface.
  43. //
  44. #define SPI_MODULE 2
  45. //
  46. // Limit Switches
  47. //
  48. #define X_STOP_PIN PA15
  49. #define Y_STOP_PIN PA12
  50. #define Z_MIN_PIN PA11
  51. #define Z_MAX_PIN PC4
  52. #ifndef FIL_RUNOUT_PIN
  53. #define FIL_RUNOUT_PIN PA4 // MT_DET
  54. #endif
  55. //
  56. // Steppers
  57. //
  58. #define X_ENABLE_PIN PE4
  59. #define X_STEP_PIN PE3
  60. #define X_DIR_PIN PE2
  61. #define Y_ENABLE_PIN PE1
  62. #define Y_STEP_PIN PE0
  63. #define Y_DIR_PIN PB9
  64. #define Z_ENABLE_PIN PB8
  65. #define Z_STEP_PIN PB5
  66. #define Z_DIR_PIN PB4
  67. #define E0_ENABLE_PIN PB3
  68. #define E0_STEP_PIN PD6
  69. #define E0_DIR_PIN PD3
  70. //
  71. // Temperature Sensors
  72. //
  73. #define TEMP_0_PIN PC1 // TH1
  74. #define TEMP_BED_PIN PC0 // TB1
  75. //
  76. // Heaters / Fans
  77. //
  78. #define HEATER_0_PIN PC3 // HEATER1
  79. #define HEATER_BED_PIN PA0 // HOT BED
  80. #define FAN_PIN PB1 // FAN
  81. //
  82. // Thermocouples
  83. //
  84. //#define MAX6675_SS_PIN PE5 // TC1 - CS1
  85. //#define MAX6675_SS_PIN PE6 // TC2 - CS2
  86. //
  87. // Misc. Functions
  88. //
  89. #define POWER_LOSS_PIN PA2 // PW_DET
  90. #define PS_ON_PIN PA3 // PW_OFF
  91. //#define LED_PIN PB2
  92. //
  93. // LCD / Controller
  94. //
  95. #define BEEPER_PIN PC5
  96. #define SD_DETECT_PIN PD12
  97. /**
  98. * Note: MKS Robin TFT screens use various TFT controllers.
  99. * If the screen stays white, disable 'LCD_RESET_PIN'
  100. * to let the bootloader init the screen.
  101. */
  102. #if ENABLED(FSMC_GRAPHICAL_TFT)
  103. #define FSMC_CS_PIN PD7 // NE4
  104. #define FSMC_RS_PIN PD11 // A0
  105. #define LCD_RESET_PIN PC6
  106. #define NO_LCD_REINIT // Suppress LCD re-initialization
  107. #define LCD_BACKLIGHT_PIN PD13
  108. #if ENABLED(TOUCH_BUTTONS)
  109. #define TOUCH_CS_PIN PC2
  110. #define TOUCH_SCK_PIN PB13
  111. #define TOUCH_MOSI_PIN PB15
  112. #define TOUCH_MISO_PIN PB14
  113. #endif
  114. #endif
  115. // Motor current PWM pins
  116. #define MOTOR_CURRENT_PWM_XY_PIN PA6
  117. #define MOTOR_CURRENT_PWM_Z_PIN PA7
  118. #define MOTOR_CURRENT_PWM_E_PIN PB0
  119. #define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
  120. #define DEFAULT_PWM_MOTOR_CURRENT { 1030, 1030, 1030 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
  121. // This is a kind of workaround in case native marlin "digipot" interface won't work.
  122. // Required to enable related code in STM32F1/HAL.cpp
  123. //#ifndef MKS_ROBIN_MINI_VREF_PWM
  124. // #define MKS_ROBIN_MINI_VREF_PWM
  125. //#endif
  126. //#define VREF_XY_PIN PA6
  127. //#define VREF_Z_PIN PA7
  128. //#define VREF_E1_PIN PB0