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_ANET_ET4.h 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 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. #include "env_validate.h"
  24. #if HAS_MULTI_HOTEND || E_STEPPERS > 1
  25. #error "Anet ET4 only supports 1 hotend / E stepper."
  26. #endif
  27. #ifndef BOARD_INFO_NAME
  28. #define BOARD_INFO_NAME "Anet ET4 1.x"
  29. #endif
  30. //
  31. // EEPROM
  32. //
  33. // Use one of these or SDCard-based Emulation will be used
  34. #if NO_EEPROM_SELECTED
  35. //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
  36. #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
  37. //#define IIC_BL24CXX_EEPROM // Use I2C EEPROM onboard IC (AT24C04C, Size 4K, PageSize 16B)
  38. #endif
  39. #if ENABLED(FLASH_EEPROM_EMULATION)
  40. // Decrease delays and flash wear by spreading writes across the
  41. // 128 kB sector allocated for EEPROM emulation.
  42. #define FLASH_EEPROM_LEVELING
  43. #elif ENABLED(IIC_BL24CXX_EEPROM)
  44. #define IIC_EEPROM_SDA PB11
  45. #define IIC_EEPROM_SCL PB10
  46. #define EEPROM_DEVICE_ADDRESS 0xA0
  47. #define MARLIN_EEPROM_SIZE 0x1000 // 4K
  48. #endif
  49. //
  50. // Limit Switches
  51. //
  52. #define X_STOP_PIN PC13
  53. #define Y_STOP_PIN PE12
  54. #define Z_STOP_PIN PE11
  55. //
  56. // Z Probe
  57. //
  58. #if ENABLED(BLTOUCH)
  59. #error "You will need to use 24V to 5V converter and remove one resistor and capacitor from the motherboard. See https://bit.ly/3xg9cXO for more information. Comment out this line to proceed at your own risk."
  60. #define SERVO0_PIN PC3
  61. #elif !defined(Z_MIN_PROBE_PIN)
  62. #define Z_MIN_PROBE_PIN PC3
  63. #endif
  64. //
  65. // Filament Runout Sensor
  66. //
  67. #ifndef FIL_RUNOUT_PIN
  68. #define FIL_RUNOUT_PIN PA2
  69. #endif
  70. //
  71. // Power Loss Detection
  72. //
  73. #ifndef POWER_LOSS_PIN
  74. #define POWER_LOSS_PIN PA8
  75. #endif
  76. //
  77. // LED PIN
  78. //
  79. #define LED_PIN PD12
  80. //
  81. // Steppers
  82. //
  83. #define X_STEP_PIN PB6
  84. #define X_DIR_PIN PB5
  85. #define X_ENABLE_PIN PB7
  86. #define Y_STEP_PIN PB3
  87. #define Y_DIR_PIN PD6
  88. #define Y_ENABLE_PIN PB4
  89. #define Z_STEP_PIN PA12
  90. #define Z_DIR_PIN PA11
  91. #define Z_ENABLE_PIN PA15
  92. #define E0_STEP_PIN PB9
  93. #define E0_DIR_PIN PB8
  94. #define E0_ENABLE_PIN PE0
  95. //
  96. // Temperature Sensors
  97. //
  98. #define TEMP_0_PIN PA1
  99. #define TEMP_BED_PIN PA4
  100. //
  101. // Heaters
  102. //
  103. #define HEATER_0_PIN PA0
  104. #define HEATER_BED_PIN PE2
  105. //
  106. // Fans
  107. //
  108. #define FAN_PIN PE3 // Layer fan
  109. #define FAN1_PIN PE1 // Hotend fan
  110. #ifndef E0_AUTO_FAN_PIN
  111. #define E0_AUTO_FAN_PIN FAN1_PIN
  112. #endif
  113. //
  114. // LCD / Controller
  115. //
  116. #if HAS_SPI_TFT || HAS_FSMC_TFT
  117. #define TFT_RESET_PIN PE6
  118. #define TFT_CS_PIN PD7
  119. #define TFT_RS_PIN PD13
  120. #if HAS_FSMC_TFT
  121. #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
  122. #define FSMC_CS_PIN TFT_CS_PIN
  123. #define FSMC_RS_PIN TFT_RS_PIN
  124. #define TFT_INTERFACE_FSMC_8BIT
  125. #endif
  126. #endif
  127. //
  128. // Touch Screen
  129. // https://ldm-systems.ru/f/doc/catalog/HY-TFT-2,8/XPT2046.pdf
  130. //
  131. #if NEED_TOUCH_PINS
  132. #define TOUCH_CS_PIN PB2
  133. #define TOUCH_SCK_PIN PB0
  134. #define TOUCH_MOSI_PIN PE5
  135. #define TOUCH_MISO_PIN PE4
  136. #define TOUCH_INT_PIN PB1
  137. #endif
  138. #if ENABLED(ANET_ET5_TFT35)
  139. #ifndef TOUCH_CALIBRATION_X
  140. #define TOUCH_CALIBRATION_X 17125
  141. #endif
  142. #ifndef TOUCH_CALIBRATION_Y
  143. #define TOUCH_CALIBRATION_Y -11307
  144. #endif
  145. #ifndef TOUCH_OFFSET_X
  146. #define TOUCH_OFFSET_X -26
  147. #endif
  148. #ifndef TOUCH_OFFSET_Y
  149. #define TOUCH_OFFSET_Y 337
  150. #endif
  151. #ifndef TOUCH_ORIENTATION
  152. #define TOUCH_ORIENTATION TOUCH_PORTRAIT
  153. #endif
  154. #elif ENABLED(ANET_ET4_TFT28)
  155. #ifndef TOUCH_CALIBRATION_X
  156. #define TOUCH_CALIBRATION_X -11838
  157. #endif
  158. #ifndef TOUCH_CALIBRATION_Y
  159. #define TOUCH_CALIBRATION_Y 8776
  160. #endif
  161. #ifndef TOUCH_OFFSET_X
  162. #define TOUCH_OFFSET_X 333
  163. #endif
  164. #ifndef TOUCH_OFFSET_Y
  165. #define TOUCH_OFFSET_Y -17
  166. #endif
  167. #ifndef TOUCH_ORIENTATION
  168. #define TOUCH_ORIENTATION TOUCH_PORTRAIT
  169. #endif
  170. #endif
  171. //
  172. // SD Card
  173. //
  174. //#define SDIO_SUPPORT
  175. #ifndef SDCARD_CONNECTION
  176. #define SDCARD_CONNECTION CUSTOM_CABLE
  177. #endif
  178. #if ENABLED(SDSUPPORT)
  179. #if DISABLED(SDIO_SUPPORT)
  180. #define SOFTWARE_SPI
  181. #define SDSS PC11
  182. #define SD_SCK_PIN PC12
  183. #define SD_MISO_PIN PC8
  184. #define SD_MOSI_PIN PD2
  185. #endif
  186. #ifndef SD_DETECT_PIN
  187. #define SD_DETECT_PIN PD3
  188. #endif
  189. #endif