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_LERDGE_K.h 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #pragma once
  20. #define ALLOW_STM32DUINO
  21. #include "env_validate.h"
  22. #if HOTENDS > 2 || E_STEPPERS > 2
  23. #error "LERDGE K supports up to 2 hotends / E-steppers."
  24. #endif
  25. #define BOARD_INFO_NAME "Lerdge K"
  26. #define DEFAULT_MACHINE_NAME "LERDGE"
  27. // EEPROM
  28. #if NO_EEPROM_SELECTED
  29. #define I2C_EEPROM
  30. #define SOFT_I2C_EEPROM // Force the use of Software I2C
  31. #define I2C_SCL_PIN PG14
  32. #define I2C_SDA_PIN PG13
  33. #define MARLIN_EEPROM_SIZE 0x10000
  34. #endif
  35. // USB Flash Drive support
  36. #define HAS_OTG_USB_HOST_SUPPORT
  37. //
  38. // Servos
  39. //
  40. #define SERVO0_PIN PB11
  41. //
  42. // Limit Switches
  43. //
  44. #define X_STOP_PIN PG3
  45. #define Y_STOP_PIN PG4
  46. #define Z_STOP_PIN PG5
  47. //
  48. // Z Probe (when not Z_MIN_PIN)
  49. //
  50. //#ifndef Z_MIN_PROBE_PIN
  51. // #define Z_MIN_PROBE_PIN PG6
  52. //#endif
  53. //
  54. // Filament runout
  55. //
  56. #define FIL_RUNOUT_PIN PE5
  57. #define FIL_RUNOUT2_PIN PE6
  58. //
  59. // Steppers
  60. //
  61. #define X_STEP_PIN PG1
  62. #define X_DIR_PIN PB10
  63. #define X_ENABLE_PIN PG0
  64. //#ifndef X_CS_PIN
  65. // #define X_CS_PIN PE0
  66. //#endif
  67. #define Y_STEP_PIN PF14
  68. #define Y_DIR_PIN PF15
  69. #define Y_ENABLE_PIN PF13
  70. //#ifndef Y_CS_PIN
  71. // #define Y_CS_PIN PE1
  72. //#endif
  73. #define Z_STEP_PIN PF11
  74. #define Z_DIR_PIN PF12
  75. #define Z_ENABLE_PIN PC5
  76. //#ifndef Z_CS_PIN
  77. // #define Z_CS_PIN PE2
  78. //#endif
  79. #define E0_STEP_PIN PC14
  80. #define E0_DIR_PIN PC13
  81. #define E0_ENABLE_PIN PC15
  82. //#ifndef E0_CS_PIN
  83. // #define E0_CS_PIN PE3
  84. //#endif
  85. #define E1_STEP_PIN PF1
  86. #define E1_DIR_PIN PF0
  87. #define E1_ENABLE_PIN PF2
  88. //#ifndef E1_CS_PIN
  89. // #define E1_CS_PIN PE4
  90. //#endif
  91. //#define E2_STEP_PIN PF4 // best guess
  92. //#define E2_DIR_PIN PF3 // best guess
  93. //#define E2_ENABLE_PIN PF5 // best guess
  94. //#ifndef E2_CS_PIN
  95. // #define E2_CS_PIN PB2 // best guess
  96. //#endif
  97. #if HAS_TMC_UART
  98. /**
  99. * TMC2208/TMC2209 stepper drivers
  100. */
  101. #ifndef X_SERIAL_TX_PIN
  102. #define X_SERIAL_TX_PIN PB2
  103. #endif
  104. #ifndef X_SERIAL_RX_PIN
  105. #define X_SERIAL_RX_PIN PB2
  106. #endif
  107. #ifndef Y_SERIAL_TX_PIN
  108. #define Y_SERIAL_TX_PIN PE2
  109. #endif
  110. #ifndef Y_SERIAL_RX_PIN
  111. #define Y_SERIAL_RX_PIN PE2
  112. #endif
  113. #ifndef Z_SERIAL_TX_PIN
  114. #define Z_SERIAL_TX_PIN PE3
  115. #endif
  116. #ifndef Z_SERIAL_RX_PIN
  117. #define Z_SERIAL_RX_PIN PE3
  118. #endif
  119. #ifndef E0_SERIAL_TX_PIN
  120. #define E0_SERIAL_TX_PIN PE4
  121. #endif
  122. #ifndef E0_SERIAL_RX_PIN
  123. #define E0_SERIAL_RX_PIN PE4
  124. #endif
  125. #ifndef E1_SERIAL_TX_PIN
  126. #define E1_SERIAL_TX_PIN PE1
  127. #endif
  128. #ifndef E1_SERIAL_RX_PIN
  129. #define E1_SERIAL_RX_PIN PE1
  130. #endif
  131. #ifndef EX_SERIAL_TX_PIN
  132. #define E2_SERIAL_TX_PIN PE0
  133. #endif
  134. #ifndef EX_SERIAL_RX_PIN
  135. #define E2_SERIAL_RX_PIN PE0
  136. #endif
  137. // Reduce baud rate to improve software serial reliability
  138. #define TMC_BAUD_RATE 19200
  139. #endif
  140. //
  141. // Temperature Sensors
  142. //
  143. #define TEMP_0_PIN PC1 // Analog Input
  144. #define TEMP_1_PIN PC2 // Analog Input
  145. #define TEMP_BED_PIN PC0 // Analog Input
  146. // Lergde-K can choose thermocouple/thermistor mode in software.
  147. // For use with thermistors, these pins must be OUT/LOW.
  148. // This is done automatically.
  149. #define TEMP_0_TR_ENABLE_PIN PF10
  150. #define TEMP_1_TR_ENABLE_PIN PF9
  151. //
  152. // Heaters / Fans
  153. //
  154. #define HEATER_0_PIN PA1
  155. #define HEATER_1_PIN PA0
  156. #define HEATER_BED_PIN PA2
  157. #ifndef FAN_PIN
  158. #define FAN_PIN PF7
  159. #endif
  160. #define FAN1_PIN PF6
  161. #ifndef E0_AUTO_FAN_PIN
  162. #define E0_AUTO_FAN_PIN PB1
  163. #endif
  164. #ifndef E1_AUTO_FAN_PIN
  165. #define E1_AUTO_FAN_PIN PB0
  166. #endif
  167. #define CONTROLLER_FAN_PIN PF8
  168. //
  169. // LED / Lighting
  170. //
  171. //#define CASE_LIGHT_PIN_CI -1
  172. //#define CASE_LIGHT_PIN_DO -1
  173. //#define NEOPIXEL_PIN -1
  174. #ifndef RGB_LED_R_PIN
  175. #define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires
  176. #endif
  177. #ifndef RGB_LED_G_PIN
  178. #define RGB_LED_G_PIN PB7
  179. #endif
  180. #ifndef RGB_LED_B_PIN
  181. #define RGB_LED_B_PIN PB9
  182. #endif
  183. //
  184. // SD support
  185. //
  186. #define SDIO_SUPPORT
  187. #define SDIO_CLOCK 4800000
  188. //
  189. // Misc. Functions
  190. //
  191. #define SDSS PC11
  192. #define LED_PIN PA15 // Alive
  193. #define PS_ON_PIN PA4
  194. #define KILL_PIN -1
  195. #define POWER_LOSS_PIN PA4 // Power-loss / nAC_FAULT
  196. #define SD_SCK_PIN PC12
  197. #define SD_MISO_PIN PC8
  198. #define SD_MOSI_PIN PD2
  199. #define SD_SS_PIN PC11
  200. #define SD_DETECT_PIN PA8
  201. #define BEEPER_PIN PC7
  202. //
  203. // LCD / Controller
  204. //
  205. #if HAS_FSMC_TFT
  206. //#define TFT_DRIVER LERDGE_ST7796
  207. #define TFT_RESET_PIN PD6
  208. #define TFT_BACKLIGHT_PIN PD3
  209. #define TFT_CS_PIN PD7
  210. #define TFT_RS_PIN PD11
  211. #define TOUCH_CS_PIN PG15
  212. #define TOUCH_SCK_PIN PB3
  213. #define TOUCH_MOSI_PIN PB5
  214. #define TOUCH_MISO_PIN PB4
  215. #endif
  216. #if IS_NEWPANEL
  217. #define BTN_EN1 PG10
  218. #define BTN_EN2 PG11
  219. #define BTN_ENC PG9
  220. #endif