My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

pins_CREALITY_V521.h 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2022 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 5.2.1 (STM32F103RE) board pin assignments
  25. */
  26. #include "env_validate.h"
  27. #if HOTENDS > 2 || E_STEPPERS > 2
  28. #error "Creality v5.2.1 supports up to 2 hotends / E steppers."
  29. #endif
  30. #ifndef BOARD_INFO_NAME
  31. #define BOARD_INFO_NAME "Creality V521"
  32. #endif
  33. #ifndef DEFAULT_MACHINE_NAME
  34. #define DEFAULT_MACHINE_NAME "Creality V5.2.1"
  35. #endif
  36. //
  37. // EEPROM
  38. //
  39. #if NO_EEPROM_SELECTED
  40. // FLASH
  41. //#define FLASH_EEPROM_EMULATION
  42. // I2C
  43. #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
  44. #if ENABLED(IIC_BL24CXX_EEPROM)
  45. #define IIC_EEPROM_SDA PC2
  46. #define IIC_EEPROM_SCL PC3
  47. #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
  48. #else
  49. #define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
  50. #define MARLIN_EEPROM_SIZE 0x800 // 2K
  51. #endif
  52. #undef NO_EEPROM_SELECTED
  53. #endif
  54. //
  55. // Servos
  56. //
  57. #define SERVO0_PIN PD13 // BLTouch OUT
  58. //
  59. // Limit Switches
  60. //
  61. #define X_STOP_PIN PD10 // X
  62. #define X2_STOP_PIN PE15 // X2
  63. #define Y_STOP_PIN PE0 // Y
  64. #define Z_STOP_PIN PE1 // Z
  65. #define Z2_STOP_PIN PE2 // Z2
  66. #ifndef Z_MIN_PROBE_PIN
  67. #define Z_MIN_PROBE_PIN PD12 // BLTouch IN
  68. #endif
  69. //
  70. // Filament Runout Sensor
  71. //
  72. #define FIL_RUNOUT_PIN PE5 // "Pulled-high"
  73. #define FIL_RUNOUT2_PIN PE6 // "Pulled-high"
  74. //
  75. // Steppers
  76. //
  77. #define X_ENABLE_PIN PC7
  78. #define X_STEP_PIN PD15
  79. #define X_DIR_PIN PD14
  80. #define Y_ENABLE_PIN PB9
  81. #define Y_STEP_PIN PB7
  82. #define Y_DIR_PIN PB6
  83. #define Z_ENABLE_PIN PB5
  84. #define Z_STEP_PIN PB3
  85. #define Z_DIR_PIN PD7
  86. #define E0_ENABLE_PIN PD4
  87. #define E0_STEP_PIN PD1
  88. #define E0_DIR_PIN PD0
  89. #define E1_ENABLE_PIN PE7
  90. #define E1_STEP_PIN PB1
  91. #define E1_DIR_PIN PB0
  92. #define X2_ENABLE_PIN PE11
  93. #define X2_STEP_PIN PE9
  94. #define X2_DIR_PIN PE8
  95. #define Z2_ENABLE_PIN PC5
  96. #define Z2_STEP_PIN PA7
  97. #define Z2_DIR_PIN PA6
  98. //
  99. // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
  100. //
  101. #define DISABLE_JTAG
  102. //
  103. // Temperature Sensors
  104. //
  105. #define TEMP_0_PIN PA4 // TH0
  106. #define TEMP_1_PIN PA5 // TH1
  107. #define TEMP_BED_PIN PA3 // TB1
  108. //
  109. // Heaters / Fans
  110. //
  111. #define HEATER_0_PIN PA1 // HEATER0
  112. #define HEATER_1_PIN PA0 // HEATER1
  113. #define HEATER_BED_PIN PA2 // HOT BED
  114. #define FAN_PIN PB14 // FAN
  115. #define FAN1_PIN PB12 // FAN
  116. #define FAN_SOFT_PWM
  117. //
  118. // SD Card
  119. //
  120. #define SD_DETECT_PIN PA8
  121. #define SDCARD_CONNECTION ONBOARD
  122. #define ONBOARD_SPI_DEVICE 1
  123. #define ONBOARD_SD_CS_PIN PC11 // SDSS
  124. #define SDIO_SUPPORT
  125. #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
  126. #if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
  127. /**
  128. * RET6 12864 LCD
  129. * ------
  130. * PC6 | 1 2 | PB2
  131. * PB10 | 3 4 | PE8
  132. * PB14 5 6 | PB13
  133. * PB12 | 7 8 | PB15
  134. * GND | 9 10 | 5V
  135. * ------
  136. */
  137. #define EXP3_01_PIN PC6
  138. #define EXP3_02_PIN PB2
  139. #define EXP3_03_PIN PB10
  140. #define EXP3_04_PIN PE8
  141. #define EXP3_05_PIN PB14
  142. #define EXP3_06_PIN PB13
  143. #define EXP3_07_PIN PB12
  144. #define EXP3_08_PIN PB15
  145. #elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
  146. /**
  147. * VET6 12864 LCD
  148. * ------
  149. * ? | 1 2 | PC5
  150. * PB10 | 3 4 | ?
  151. * PA6 5 6 | PA5
  152. * PA4 | 7 8 | PA7
  153. * GND | 9 10 | 5V
  154. * ------
  155. */
  156. #define EXP3_01_PIN -1
  157. #define EXP3_02_PIN PC5
  158. #define EXP3_03_PIN PB10
  159. #define EXP3_04_PIN -1
  160. #define EXP3_05_PIN PA6
  161. #define EXP3_06_PIN PA5
  162. #define EXP3_07_PIN PA4
  163. #define EXP3_08_PIN PA7
  164. #endif
  165. #if ENABLED(CR10_STOCKDISPLAY)
  166. #if NONE(RET6_12864_LCD, VET6_12864_LCD)
  167. #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
  168. #endif
  169. #define LCD_PINS_RS EXP3_07_PIN
  170. #define LCD_PINS_ENABLE EXP3_08_PIN
  171. #define LCD_PINS_D4 EXP3_06_PIN
  172. #define BTN_ENC EXP3_02_PIN
  173. #define BTN_EN1 EXP3_03_PIN
  174. #define BTN_EN2 EXP3_05_PIN
  175. #define BEEPER_PIN EXP3_01_PIN
  176. #elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
  177. // RET6 / VET6 DWIN ENCODER LCD
  178. #define BTN_ENC EXP3_05_PIN
  179. #define BTN_EN1 EXP3_08_PIN
  180. #define BTN_EN2 EXP3_07_PIN
  181. //#define LCD_LED_PIN EXP3_02_PIN
  182. #ifndef BEEPER_PIN
  183. #define BEEPER_PIN EXP3_06_PIN
  184. #endif
  185. #endif
  186. // DGUS LCDs
  187. #if HAS_DGUS_LCD
  188. #define LCD_SERIAL_PORT 3
  189. #endif