My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

pins_CREALITY_V4.h 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. * Creality 4.2.x (STM32F103RE / STM32F103RC) board pin assignments
  25. */
  26. #include "env_validate.h"
  27. #if HAS_MULTI_HOTEND || E_STEPPERS > 1
  28. #error "Creality V4 only supports one hotend / E-stepper. Comment out this line to continue."
  29. #endif
  30. #ifndef BOARD_INFO_NAME
  31. #define BOARD_INFO_NAME "Creality V4"
  32. #endif
  33. #ifndef DEFAULT_MACHINE_NAME
  34. #define DEFAULT_MACHINE_NAME "Ender 3 V2"
  35. #endif
  36. #define BOARD_NO_NATIVE_USB
  37. //
  38. // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
  39. //
  40. #ifndef DISABLE_DEBUG
  41. #define DISABLE_DEBUG
  42. #endif
  43. //
  44. // EEPROM
  45. //
  46. #if NO_EEPROM_SELECTED
  47. #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
  48. //#define SDCARD_EEPROM_EMULATION
  49. #endif
  50. #if ENABLED(IIC_BL24CXX_EEPROM)
  51. #define IIC_EEPROM_SDA PA11
  52. #define IIC_EEPROM_SCL PA12
  53. #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
  54. #elif ENABLED(SDCARD_EEPROM_EMULATION)
  55. #define MARLIN_EEPROM_SIZE 0x800 // 2K
  56. #endif
  57. //
  58. // Servos
  59. //
  60. #ifndef SERVO0_PIN
  61. #ifndef HAS_PIN_27_BOARD
  62. #define SERVO0_PIN PB0 // BLTouch OUT
  63. #else
  64. #define SERVO0_PIN PC6
  65. #endif
  66. #endif
  67. //
  68. // Limit Switches
  69. //
  70. #define X_STOP_PIN PA5
  71. #define Y_STOP_PIN PA6
  72. #ifndef Z_STOP_PIN
  73. #define Z_STOP_PIN PA7
  74. #endif
  75. #ifndef Z_MIN_PROBE_PIN
  76. #define Z_MIN_PROBE_PIN PB1 // BLTouch IN
  77. #endif
  78. //
  79. // Filament Runout Sensor
  80. //
  81. #ifndef FIL_RUNOUT_PIN
  82. #define FIL_RUNOUT_PIN PA4 // "Pulled-high"
  83. #endif
  84. //
  85. // Steppers
  86. //
  87. #ifndef X_STEP_PIN
  88. #define X_STEP_PIN PC2
  89. #endif
  90. #ifndef X_DIR_PIN
  91. #define X_DIR_PIN PB9
  92. #endif
  93. #define X_ENABLE_PIN PC3 // Shared
  94. #ifndef Y_STEP_PIN
  95. #define Y_STEP_PIN PB8
  96. #endif
  97. #ifndef Y_DIR_PIN
  98. #define Y_DIR_PIN PB7
  99. #endif
  100. #define Y_ENABLE_PIN X_ENABLE_PIN
  101. #ifndef Z_STEP_PIN
  102. #define Z_STEP_PIN PB6
  103. #endif
  104. #ifndef Z_DIR_PIN
  105. #define Z_DIR_PIN PB5
  106. #endif
  107. #define Z_ENABLE_PIN X_ENABLE_PIN
  108. #ifndef E0_STEP_PIN
  109. #define E0_STEP_PIN PB4
  110. #endif
  111. #ifndef E0_DIR_PIN
  112. #define E0_DIR_PIN PB3
  113. #endif
  114. #define E0_ENABLE_PIN X_ENABLE_PIN
  115. //
  116. // Temperature Sensors
  117. //
  118. #define TEMP_0_PIN PC5 // TH1
  119. #define TEMP_BED_PIN PC4 // TB1
  120. //
  121. // Heaters / Fans
  122. //
  123. #ifndef HEATER_0_PIN
  124. #define HEATER_0_PIN PA1 // HEATER1
  125. #endif
  126. #ifndef HEATER_BED_PIN
  127. #define HEATER_BED_PIN PA2 // HOT BED
  128. #endif
  129. #ifndef FAN_PIN
  130. #define FAN_PIN PA0 // FAN
  131. #endif
  132. #define FAN_SOFT_PWM_REQUIRED
  133. //
  134. // SD Card
  135. //
  136. #define SD_DETECT_PIN PC7
  137. #define SDCARD_CONNECTION ONBOARD
  138. #define SDIO_SUPPORT
  139. #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
  140. #if ENABLED(CR10_STOCKDISPLAY)
  141. #if ENABLED(RET6_12864_LCD)
  142. // RET6 12864 LCD
  143. #define LCD_PINS_RS PB12
  144. #define LCD_PINS_ENABLE PB15
  145. #define LCD_PINS_D4 PB13
  146. #define BTN_ENC PB2
  147. #define BTN_EN1 PB10
  148. #define BTN_EN2 PB14
  149. #ifndef HAS_PIN_27_BOARD
  150. #define BEEPER_PIN PC6
  151. #endif
  152. #elif ENABLED(VET6_12864_LCD)
  153. // VET6 12864 LCD
  154. #define LCD_PINS_RS PA4
  155. #define LCD_PINS_ENABLE PA7
  156. #define LCD_PINS_D4 PA5
  157. #define BTN_ENC PC5
  158. #define BTN_EN1 PB10
  159. #define BTN_EN2 PA6
  160. #else
  161. #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
  162. #endif
  163. #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
  164. // RET6 DWIN ENCODER LCD
  165. #define BTN_ENC PB14
  166. #define BTN_EN1 PB15
  167. #define BTN_EN2 PB12
  168. //#define LCD_LED_PIN PB2
  169. #ifndef BEEPER_PIN
  170. #define BEEPER_PIN PB13
  171. #endif
  172. #elif ENABLED(DWIN_VET6_CREALITY_LCD)
  173. // VET6 DWIN ENCODER LCD
  174. #define BTN_ENC PA6
  175. #define BTN_EN1 PA7
  176. #define BTN_EN2 PA4
  177. #define BEEPER_PIN PA5
  178. #endif