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_FYSETC_CHEETAH_V20.h 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. #define DEFAULT_MACHINE_NAME "3D Printer"
  25. #define BOARD_INFO_NAME "FYSETC Cheetah V2.0"
  26. #define BOARD_WEBSITE_URL "fysetc.com"
  27. // USB Flash Drive support
  28. //#define HAS_OTG_USB_HOST_SUPPORT
  29. // Ignore temp readings during development.
  30. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  31. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  32. #define FLASH_EEPROM_EMULATION
  33. #define FLASH_EEPROM_LEVELING
  34. #define FLASH_SECTOR 1
  35. #define FLASH_UNIT_SIZE 0x4000 // 16k
  36. #define FLASH_ADDRESS_START 0x8004000
  37. #endif
  38. //
  39. // Z Probe
  40. //
  41. #if ENABLED(BLTOUCH)
  42. #error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed."
  43. #define SERVO0_PIN PA0
  44. #elif !defined(Z_MIN_PROBE_PIN)
  45. #define Z_MIN_PROBE_PIN PA0
  46. #endif
  47. //
  48. // Limit Switches
  49. //
  50. #define X_STOP_PIN PB4
  51. #define Y_STOP_PIN PC8
  52. #define Z_STOP_PIN PB1
  53. //
  54. // Filament runout
  55. //
  56. #define FIL_RUNOUT_PIN PB5
  57. //
  58. // Steppers
  59. //
  60. #define X_STEP_PIN PC0
  61. #define X_DIR_PIN PC1
  62. #define X_ENABLE_PIN PA8
  63. #define Y_STEP_PIN PC14
  64. #define Y_DIR_PIN PC13
  65. #define Y_ENABLE_PIN PC15
  66. #define Z_STEP_PIN PB9
  67. #define Z_DIR_PIN PB8
  68. #define Z_ENABLE_PIN PC2
  69. #define E0_STEP_PIN PB2
  70. #define E0_DIR_PIN PA15
  71. #define E0_ENABLE_PIN PD2
  72. #if HAS_TMC_UART
  73. #define X_HARDWARE_SERIAL Serial2
  74. #define Y_HARDWARE_SERIAL Serial2
  75. #define Z_HARDWARE_SERIAL Serial2
  76. #define E0_HARDWARE_SERIAL Serial2
  77. // Default TMC slave addresses
  78. #ifndef X_SLAVE_ADDRESS
  79. #define X_SLAVE_ADDRESS 0
  80. #endif
  81. #ifndef Y_SLAVE_ADDRESS
  82. #define Y_SLAVE_ADDRESS 2
  83. #endif
  84. #ifndef Z_SLAVE_ADDRESS
  85. #define Z_SLAVE_ADDRESS 1
  86. #endif
  87. #ifndef E0_SLAVE_ADDRESS
  88. #define E0_SLAVE_ADDRESS 3
  89. #endif
  90. #endif
  91. //
  92. // Heaters / Fans
  93. //
  94. #define HEATER_0_PIN PC6
  95. #define HEATER_BED_PIN PC7
  96. #ifndef FAN_PIN
  97. #define FAN_PIN PA14
  98. #endif
  99. #define FAN1_PIN PA13
  100. #define FAN2_PIN PA1
  101. //
  102. // Temperature Sensors
  103. //
  104. #define TEMP_BED_PIN PC5 // Analog Input
  105. #define TEMP_0_PIN PC4 // Analog Input
  106. //
  107. // Misc. Functions
  108. //
  109. #define SDSS PA4
  110. #define SD_DETECT_PIN PC3
  111. #ifndef RGB_LED_R_PIN
  112. #define RGB_LED_R_PIN PB0
  113. #endif
  114. #ifndef RGB_LED_G_PIN
  115. #define RGB_LED_G_PIN PB7
  116. #endif
  117. #ifndef RGB_LED_B_PIN
  118. #define RGB_LED_B_PIN PB6
  119. #endif
  120. /**
  121. * ------ ------
  122. * (SD_MISO) PA6 | 1 2 | PA5 (SD_SCK) (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC)
  123. * (BTN_EN1) PC10 | 3 4 | PA4 (SD_SS) (LCD_EN) PB15 | 3 4 | PB12 (LCD_RS)
  124. * (BTN_EN2) PC11 5 6 | PA7 (SD_MOSI) (LCD_D4) PB13 5 6 | PB14 (LCD_D5)
  125. * (SD_DETECT) PC3 | 7 8 | RESET (LCD_D6) PB6 | 7 8 | PB7 (LCD_D7)
  126. * GND | 9 10 | 5V GND | 9 10 | 5V
  127. * ------ ------
  128. * EXP2 EXP1
  129. */
  130. /**
  131. * ------
  132. * 5V | 1 2 | GND
  133. * (LCD_EN/MOSI) PB15 | 3 4 | PB12 (LCD_RS)
  134. * (LCD_D4/SCK) PB13 5 6 | PC11 (BTN_EN2)
  135. * (LCD_D5/MISO) PB14 | 7 8 | PC10 (BTN_EN1)
  136. * (BTN_ENC) PC12 | 9 10 | PC9 (BEEPER)
  137. * ------
  138. * EXP3
  139. */
  140. #define EXP1_01_PIN PC9
  141. #define EXP1_02_PIN PC12
  142. #define EXP1_03_PIN PB15
  143. #define EXP1_04_PIN PB12
  144. #define EXP1_05_PIN PB13
  145. #define EXP1_06_PIN PB14
  146. #define EXP1_07_PIN PB6
  147. #define EXP1_08_PIN PB7
  148. #define EXP2_01_PIN PA6
  149. #define EXP2_02_PIN PA5
  150. #define EXP2_03_PIN PC10
  151. #define EXP2_04_PIN PA4
  152. #define EXP2_05_PIN PC11
  153. #define EXP2_06_PIN PA7
  154. #define EXP2_07_PIN PC3
  155. #define EXP2_08_PIN -1
  156. #if HAS_WIRED_LCD
  157. #define BEEPER_PIN EXP1_01_PIN
  158. #define BTN_ENC EXP1_02_PIN
  159. #if ENABLED(CR10_STOCKDISPLAY)
  160. #define LCD_PINS_RS EXP1_04_PIN
  161. #define BTN_EN1 EXP2_03_PIN
  162. #define BTN_EN2 EXP2_05_PIN
  163. #define LCD_PINS_ENABLE EXP1_03_PIN
  164. #define LCD_PINS_D4 EXP1_05_PIN
  165. #elif ENABLED(MKS_MINI_12864)
  166. #define DOGLCD_A0 EXP1_07_PIN
  167. #define DOGLCD_CS EXP1_06_PIN
  168. #define BTN_EN1 EXP2_03_PIN
  169. #define BTN_EN2 EXP2_05_PIN
  170. #else
  171. #define LCD_PINS_RS EXP1_04_PIN
  172. #define BTN_EN1 EXP2_05_PIN
  173. #define BTN_EN2 EXP2_03_PIN
  174. #define LCD_PINS_ENABLE EXP1_03_PIN
  175. #define LCD_PINS_D4 EXP1_05_PIN
  176. #if ENABLED(FYSETC_MINI_12864)
  177. #define DOGLCD_CS EXP1_03_PIN
  178. #define DOGLCD_A0 EXP1_04_PIN
  179. //#define LCD_BACKLIGHT_PIN -1
  180. #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
  181. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
  182. #ifndef RGB_LED_R_PIN
  183. #define RGB_LED_R_PIN EXP1_06_PIN
  184. #endif
  185. #ifndef RGB_LED_G_PIN
  186. #define RGB_LED_G_PIN EXP1_07_PIN
  187. #endif
  188. #ifndef RGB_LED_B_PIN
  189. #define RGB_LED_B_PIN EXP1_08_PIN
  190. #endif
  191. #elif ENABLED(FYSETC_MINI_12864_2_1)
  192. #define NEOPIXEL_PIN EXP1_06_PIN
  193. #endif
  194. #endif // !FYSETC_MINI_12864
  195. #if IS_ULTIPANEL
  196. #define LCD_PINS_D5 EXP1_06_PIN
  197. #define LCD_PINS_D6 EXP1_07_PIN
  198. #define LCD_PINS_D7 EXP1_08_PIN
  199. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  200. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  201. #endif
  202. #endif
  203. #endif
  204. #endif // HAS_WIRED_LCD
  205. // Alter timing for graphical display
  206. #if IS_U8GLIB_ST7920
  207. #define BOARD_ST7920_DELAY_1 96
  208. #define BOARD_ST7920_DELAY_2 48
  209. #define BOARD_ST7920_DELAY_3 600
  210. #endif
  211. #if ENABLED(TOUCH_UI_FTDI_EVE)
  212. #define BEEPER_PIN EXP1_01_PIN
  213. #define CLCD_MOD_RESET EXP2_03_PIN
  214. #define CLCD_SPI_CS EXP2_05_PIN
  215. #endif