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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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. /**
  23. * CREALITY (STM32F103) board pin assignments
  24. */
  25. #ifndef __STM32F1__
  26. #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
  27. #endif
  28. #if HOTENDS > 1 || E_STEPPERS > 1
  29. #error "CREALITY supports up to 1 hotends / E-steppers. Comment out this line to continue."
  30. #endif
  31. #ifndef BOARD_INFO_NAME
  32. #define BOARD_INFO_NAME "Creality V4"
  33. #endif
  34. #ifndef DEFAULT_MACHINE_NAME
  35. #define DEFAULT_MACHINE_NAME "Ender 3 V2"
  36. #endif
  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 ?
  57. // 2K EEPROM
  58. //#define SPI_EEPROM2_CS ?
  59. // 32Mb FLASH
  60. //#define SPI_FLASH_CS ?
  61. #endif
  62. //
  63. // Servos
  64. //
  65. #define SERVO0_PIN PB0 // BLTouch OUT
  66. //
  67. // Limit Switches
  68. //
  69. #define X_STOP_PIN PA5
  70. #define Y_STOP_PIN PA6
  71. #define Z_STOP_PIN PA7
  72. #define Z_MIN_PROBE_PIN PB1 // BLTouch IN
  73. //
  74. // Filament Runout Sensor
  75. //
  76. #ifndef FIL_RUNOUT_PIN
  77. #define FIL_RUNOUT_PIN PA4 // "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 PA1 // HEATER1
  123. #define HEATER_BED_PIN PA2 // HOT BED
  124. #define FAN_PIN PA0 // FAN
  125. #define FAN_SOFT_PWM
  126. //
  127. // SD Card
  128. //
  129. #define SD_DETECT_PIN PC7
  130. #define SDCARD_CONNECTION ONBOARD
  131. #define ON_BOARD_SPI_DEVICE 1
  132. #define ONBOARD_SD_CS_PIN PA4 // SDSS
  133. #define SDIO_SUPPORT
  134. #if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
  135. #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
  136. #endif
  137. #if ENABLED(RET6_12864_LCD)
  138. /* RET6 12864 LCD */
  139. #define LCD_PINS_RS PB12
  140. #define LCD_PINS_ENABLE PB15
  141. #define LCD_PINS_D4 PB13
  142. #define BTN_ENC PB2
  143. #define BTN_EN1 PB10
  144. #define BTN_EN2 PB14
  145. #define BEEPER_PIN PC6
  146. #elif ENABLED(VET6_12864_LCD)
  147. /* VET6 12864 LCD */
  148. #define LCD_PINS_RS PA4
  149. #define LCD_PINS_ENABLE PA7
  150. #define LCD_PINS_D4 PA5
  151. #define BTN_ENC PC5
  152. #define BTN_EN1 PB10
  153. #define BTN_EN2 PA6
  154. #elif ENABLED(DWIN_CREALITY_LCD)
  155. /* RET6 DWIN ENCODER LCD */
  156. #define BTN_ENC PB14
  157. #define BTN_EN1 PB15
  158. #define BTN_EN2 PB12
  159. //#define LCD_LED_PIN PB2
  160. #ifndef BEEPER_PIN
  161. #define BEEPER_PIN PB13
  162. #undef SPEAKER
  163. #endif
  164. #elif ENABLED(DWIN_VET6_CREALITY_LCD)
  165. /* VET6 DWIN ENCODER LCD */
  166. #define BTN_ENC PA6
  167. #define BTN_EN1 PA7
  168. #define BTN_EN2 PA4
  169. #define BEEPER_PIN PA5
  170. #endif