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_V4210.h 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2021 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.10 (STM32F103RE / STM32F103RC) board pin assignments
  25. */
  26. #include "env_validate.h"
  27. #if HAS_MULTI_HOTEND || E_STEPPERS > 1
  28. #error "CREALITY supports up to 1 hotends / E-steppers. Comment out this line to continue."
  29. #endif
  30. #ifndef BOARD_INFO_NAME
  31. #define BOARD_INFO_NAME "Creality V4.2.10"
  32. #endif
  33. #ifndef DEFAULT_MACHINE_NAME
  34. #define DEFAULT_MACHINE_NAME "3DPrintMill"
  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. #endif
  47. #if ENABLED(IIC_BL24CXX_EEPROM)
  48. #define IIC_EEPROM_SDA PA11
  49. #define IIC_EEPROM_SCL PA12
  50. #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
  51. #else
  52. #define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
  53. #define MARLIN_EEPROM_SIZE 0x800 // 2K
  54. #endif
  55. //
  56. // Servos
  57. //
  58. #define SERVO0_PIN PB0 // BLTouch OUT
  59. //
  60. // Limit Switches
  61. //
  62. #define X_STOP_PIN PA3
  63. #define Y_STOP_PIN PA7
  64. #define Z_STOP_PIN PA5
  65. #ifndef Z_MIN_PROBE_PIN
  66. #define Z_MIN_PROBE_PIN PA5 // BLTouch IN
  67. #endif
  68. //
  69. // Filament Runout Sensor
  70. //
  71. #ifndef FIL_RUNOUT_PIN
  72. #define FIL_RUNOUT_PIN PA6 // "Pulled-high"
  73. #endif
  74. //
  75. // Steppers
  76. //
  77. #ifndef X_STEP_PIN
  78. #define X_STEP_PIN PC2
  79. #endif
  80. #ifndef X_DIR_PIN
  81. #define X_DIR_PIN PB9
  82. #endif
  83. #define X_ENABLE_PIN PC3
  84. #ifndef Y_STEP_PIN
  85. #define Y_STEP_PIN PB8
  86. #endif
  87. #ifndef Y_DIR_PIN
  88. #define Y_DIR_PIN PB7
  89. #endif
  90. #define Y_ENABLE_PIN X_ENABLE_PIN
  91. #ifndef Z_STEP_PIN
  92. #define Z_STEP_PIN PB6
  93. #endif
  94. #ifndef Z_DIR_PIN
  95. #define Z_DIR_PIN PB5
  96. #endif
  97. #define Z_ENABLE_PIN X_ENABLE_PIN
  98. #ifndef E0_STEP_PIN
  99. #define E0_STEP_PIN PB4
  100. #endif
  101. #ifndef E0_DIR_PIN
  102. #define E0_DIR_PIN PB3
  103. #endif
  104. #define E0_ENABLE_PIN X_ENABLE_PIN
  105. //
  106. // Temperature Sensors
  107. //
  108. #define TEMP_0_PIN PC5 // TH1
  109. #define TEMP_BED_PIN PC4 // TB1
  110. //
  111. // Heaters / Fans
  112. //
  113. #define HEATER_0_PIN PA0 // HEATER1
  114. #define HEATER_BED_PIN PA1 // HOT BED
  115. #define FAN_PIN PA2 // FAN
  116. #define FAN_SOFT_PWM_REQUIRED
  117. //
  118. // SD Card
  119. //
  120. #define SD_DETECT_PIN PC7
  121. #define SDCARD_CONNECTION ONBOARD
  122. #define ONBOARD_SPI_DEVICE 1
  123. #define ONBOARD_SD_CS_PIN PA4 // SDSS
  124. #define SDIO_SUPPORT
  125. #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
  126. #if ENABLED(CR10_STOCKDISPLAY)
  127. #if ENABLED(RET6_12864_LCD)
  128. /**
  129. * RET6 12864 LCD
  130. * ------
  131. * PC6 |10 9 | PB2
  132. * PB10 | 8 7 | PE8
  133. * PB14 6 5 | PB13
  134. * PB12 | 4 3 | PB15
  135. * GND | 2 1 | 5V
  136. * ------
  137. * EXP1
  138. */
  139. #define EXP1_03_PIN PB15
  140. #define EXP1_04_PIN PB12
  141. #define EXP1_05_PIN PB13
  142. #define EXP1_06_PIN PB14
  143. #define EXP1_07_PIN PE8
  144. #define EXP1_08_PIN PB10
  145. #define EXP1_09_PIN PB2
  146. #define EXP1_10_PIN PC6
  147. #define BEEPER_PIN EXP1_10_PIN
  148. #elif ENABLED(VET6_12864_LCD)
  149. /**
  150. * VET6 12864 LCD
  151. * ------
  152. * ? |10 9 | PC5
  153. * PB10 | 8 7 | ?
  154. * PA6 6 5 | PA5
  155. * PA4 | 4 3 | PA7
  156. * GND | 2 1 | 5V
  157. * ------
  158. * EXP1
  159. */
  160. #define EXP1_03_PIN PA7
  161. #define EXP1_04_PIN PA4
  162. #define EXP1_05_PIN PA5
  163. #define EXP1_06_PIN PA6
  164. #define EXP1_07_PIN -1
  165. #define EXP1_08_PIN PB10
  166. #define EXP1_09_PIN PC5
  167. #define EXP1_10_PIN -1
  168. #else
  169. #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
  170. #endif
  171. #define LCD_PINS_RS EXP1_04_PIN
  172. #define LCD_PINS_ENABLE EXP1_03_PIN
  173. #define LCD_PINS_D4 EXP1_05_PIN
  174. #define BTN_ENC EXP1_09_PIN
  175. #define BTN_EN1 EXP1_08_PIN
  176. #define BTN_EN2 EXP1_06_PIN
  177. #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
  178. // RET6 DWIN ENCODER LCD
  179. #define BTN_ENC PB14
  180. #define BTN_EN1 PB15
  181. #define BTN_EN2 PB12
  182. //#define LCD_LED_PIN PB2
  183. #ifndef BEEPER_PIN
  184. #define BEEPER_PIN PB13
  185. #endif
  186. #elif ENABLED(DWIN_VET6_CREALITY_LCD)
  187. // VET6 DWIN ENCODER LCD
  188. #define BTN_ENC PA6
  189. #define BTN_EN1 PA7
  190. #define BTN_EN2 PA4
  191. #define BEEPER_PIN PA5
  192. #endif