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 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 <http://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. #define BOARD_INFO_NAME "CREALITY V4"
  32. #define DEFAULT_MACHINE_NAME "Ender 3 V2"
  33. //
  34. // EEPROM
  35. //
  36. /* I2C */
  37. #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
  38. //#define E2END 0x3FFF // 16Kb (24c16)
  39. #define IIC_EEPROM_SDA PA11
  40. #define IIC_EEPROM_SCL PA12
  41. // SD EEPROM was in your original build, so...
  42. #define SDCARD_EEPROM_EMULATION
  43. /* SPI */
  44. //#define SPI_EEPROM // EEPROM on SPI-0
  45. //#define SPI_CHAN_EEPROM1 ?
  46. //#define SPI_EEPROM1_CS ?
  47. // 2K EEPROM
  48. //#define SPI_EEPROM2_CS ?
  49. // 32Mb FLASH
  50. //#define SPI_FLASH_CS ?
  51. /* FLASH */
  52. //#define FLASH_EEPROM_EMULATION
  53. //
  54. // Servos
  55. //
  56. #define SERVO0_PIN PB0 // BLTouch OUT
  57. //
  58. // Limit Switches
  59. //
  60. #define X_STOP_PIN PA5
  61. #define Y_STOP_PIN PA6
  62. #define Z_STOP_PIN PA7
  63. #define Z_PROBE_PIN PB1 // BLTouch IN
  64. //
  65. // Steppers
  66. //
  67. #define X_ENABLE_PIN PC3
  68. #define X_STEP_PIN PC2
  69. #define X_DIR_PIN PB9
  70. #define Y_ENABLE_PIN PC3
  71. #define Y_STEP_PIN PB8
  72. #define Y_DIR_PIN PB7
  73. #define Z_ENABLE_PIN PC3
  74. #define Z_STEP_PIN PB6
  75. #define Z_DIR_PIN PB5
  76. #define E0_ENABLE_PIN PC3
  77. #define E0_STEP_PIN PB4
  78. #define E0_DIR_PIN PB3
  79. //
  80. // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
  81. //
  82. #define DISABLE_DEBUG
  83. //
  84. // Temperature Sensors
  85. //
  86. #define TEMP_0_PIN PC5 // TH1
  87. #define TEMP_BED_PIN PC4 // TB1
  88. //
  89. // Heaters / Fans
  90. //
  91. #define HEATER_0_PIN PA1 // HEATER1
  92. #define HEATER_BED_PIN PA2 // HOT BED
  93. #define FAN_PIN PA0 // FAN
  94. #define FAN_SOFT_PWM
  95. //
  96. // SD Card
  97. //
  98. #define SD_DETECT_PIN PC7
  99. #define SDCARD_CONNECTION ONBOARD
  100. #define ON_BOARD_SPI_DEVICE 1
  101. #define ONBOARD_SD_CS_PIN PA4 // SDSS
  102. #define SDIO_SUPPORT
  103. #if ENABLED(RET6_12864_LCD)
  104. /* RET6 12864 LCD */
  105. #define LCD_PINS_RS PB12
  106. #define LCD_PINS_ENABLE PB15
  107. #define LCD_PINS_D4 PB13
  108. #define BTN_ENC PB2
  109. #define BTN_EN1 PB10
  110. #define BTN_EN2 PB14
  111. #define BEEPER_PIN PC6
  112. #elif ENABLED(VET6_12864_LCD)
  113. /* VET6 12864 LCD */
  114. #define LCD_PINS_RS PA4
  115. #define LCD_PINS_ENABLE PA7
  116. #define LCD_PINS_D4 PA5
  117. #define BTN_ENC PC5
  118. #define BTN_EN1 PB10
  119. #define BTN_EN2 PA6
  120. #elif ENABLED(DWIN_CREALITY_LCD)
  121. /* RET6 DWIN ENCODER LCD */
  122. #define BTN_ENC PB14
  123. #define BTN_EN1 PB15
  124. #define BTN_EN2 PB12
  125. //#define LCD_LED_PIN PB2
  126. #define BEEPER_PIN PB13
  127. #elif ENABLED(DWIN_VET6_CREALITY_LCD)
  128. /* VET6 DWIN ENCODER LCD */
  129. #define BTN_ENC PA6
  130. #define BTN_EN1 PA7
  131. #define BTN_EN2 PA4
  132. #define BEEPER_PIN PA5
  133. #endif