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.4KB

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