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_CREALITY_V4.h 5.4KB

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