My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins_MKS_ROBIN_E3_common.h 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. /**
  24. * MKS Robin E3 & E3D (STM32F103RCT6) common board pin assignments
  25. */
  26. #if NOT_TARGET(__STM32F1__)
  27. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  28. #endif
  29. #define BOARD_WEBSITE_URL "github.com/makerbase-mks"
  30. //#define DISABLE_DEBUG
  31. #define DISABLE_JTAG
  32. //
  33. // EEPROM
  34. //
  35. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  36. #define FLASH_EEPROM_EMULATION
  37. #define EEPROM_PAGE_SIZE (0x800U) // 2KB
  38. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  39. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
  40. #endif
  41. //
  42. // Servos
  43. //
  44. #define SERVO0_PIN PA3
  45. //
  46. // Limit Switches
  47. //
  48. #define X_STOP_PIN PA12
  49. #define Y_STOP_PIN PA11
  50. #define Z_MIN_PIN PC6
  51. #define Z_MAX_PIN PB1
  52. //
  53. // Steppers
  54. //
  55. #define X_STEP_PIN PC0
  56. #define X_DIR_PIN PB2
  57. #define X_ENABLE_PIN PC13
  58. #define Y_STEP_PIN PC2
  59. #define Y_DIR_PIN PB9
  60. #define Y_ENABLE_PIN PB12
  61. #define Z_STEP_PIN PB7
  62. #define Z_DIR_PIN PB6
  63. #define Z_ENABLE_PIN PB8
  64. #define E0_STEP_PIN PB4
  65. #define E0_DIR_PIN PB3
  66. #define E0_ENABLE_PIN PB5
  67. #if HAS_TMC220x
  68. /**
  69. * TMC2208/TMC2209 stepper drivers
  70. *
  71. * Hardware serial communication ports.
  72. * If undefined software serial is used according to the pins below
  73. */
  74. //#define X_HARDWARE_SERIAL MSerial1
  75. //#define Y_HARDWARE_SERIAL MSerial1
  76. //#define Z_HARDWARE_SERIAL MSerial1
  77. //#define E0_HARDWARE_SERIAL MSerial1
  78. //
  79. // Software serial
  80. //
  81. #define X_SERIAL_TX_PIN PC7
  82. #define X_SERIAL_RX_PIN PC7
  83. #define Y_SERIAL_TX_PIN PD2
  84. #define Y_SERIAL_RX_PIN PD2
  85. #define Z_SERIAL_TX_PIN PC12
  86. #define Z_SERIAL_RX_PIN PC12
  87. #define E0_SERIAL_TX_PIN PC11
  88. #define E0_SERIAL_RX_PIN PC11
  89. // Reduce baud rate to improve software serial reliability
  90. #define TMC_BAUD_RATE 19200
  91. #endif
  92. //
  93. // Heaters 0,1 / Fans / Bed
  94. //
  95. #define HEATER_0_PIN PC9
  96. #define FAN_PIN PA8
  97. #define HEATER_BED_PIN PC8
  98. //
  99. // Temperature Sensors
  100. //
  101. #define TEMP_BED_PIN PA1 // TB
  102. #define TEMP_0_PIN PA0 // TH1
  103. #define FIL_RUNOUT_PIN PB10 // MT_DET
  104. /**
  105. * _____ _____ _____
  106. * (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND
  107. * (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS) (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS)
  108. * (LCD_D4) PA6 | 5 6 PA7 (LCD_D5) (BTN_EN2) PB0 | 5 6 PB15 (SD_MOSI) (LCD_D4) PA6 | 5 6 PB0 (BTN_EN2)
  109. * (LCD_D6) PC4 | 7 8 | PC5 (LCD_D7) (SD_DETECT) PC10 | 7 8 | RESET RESET | 7 8 | PB11 (BTN_EN1)
  110. * GND | 9 10| 5V GND | 9 10| NC (BTN_ENC) PC3 | 9 10| PC1 (BEEPER)
  111. * ----- ----- -----
  112. * EXP1 EXP2 EXP3
  113. */
  114. #if HAS_WIRED_LCD
  115. #define BEEPER_PIN PC1
  116. #define BTN_ENC PC3
  117. #define LCD_PINS_ENABLE PA4
  118. #define LCD_PINS_RS PA5
  119. #define BTN_EN1 PB11
  120. #define BTN_EN2 PB0
  121. // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
  122. #if ENABLED(MKS_MINI_12864)
  123. #define LCD_BACKLIGHT_PIN -1
  124. #define LCD_RESET_PIN -1
  125. #define DOGLCD_A0 PC4
  126. #define DOGLCD_CS PA7
  127. #define DOGLCD_SCK PB13
  128. #define DOGLCD_MOSI PB15
  129. #else
  130. #define LCD_PINS_D4 PA6
  131. #if IS_ULTIPANEL
  132. #define LCD_PINS_D5 PA7
  133. #define LCD_PINS_D6 PC4
  134. #define LCD_PINS_D7 PC5
  135. #endif
  136. #endif // !MKS_MINI_12864
  137. #endif // HAS_WIRED_LCD
  138. //
  139. // SD Card
  140. //
  141. #define ENABLE_SPI2
  142. #define SD_DETECT_PIN PC10
  143. #define SCK_PIN PB13
  144. #define MISO_PIN PB14
  145. #define MOSI_PIN PB15
  146. #define SS_PIN PA15
  147. #ifndef BOARD_ST7920_DELAY_1
  148. #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
  149. #endif
  150. #ifndef BOARD_ST7920_DELAY_2
  151. #define BOARD_ST7920_DELAY_2 DELAY_NS(125)
  152. #endif
  153. #ifndef BOARD_ST7920_DELAY_3
  154. #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
  155. #endif