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.h 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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"
  26. #define BOARD_WEBSITE_URL "fysetc.com"
  27. // Ignore temp readings during development.
  28. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  29. #define BOARD_NO_NATIVE_USB
  30. #define RESET_STEPPERS_ON_MEDIA_INSERT
  31. #define DISABLE_JTAG
  32. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  33. #define FLASH_EEPROM_EMULATION
  34. #define EEPROM_PAGE_SIZE (0x800U) // 2K
  35. #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
  36. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K
  37. #endif
  38. //
  39. // Servos
  40. //
  41. #define SERVO0_PIN PA0
  42. //
  43. // Limit Switches
  44. //
  45. #define X_STOP_PIN PA1
  46. #define Y_STOP_PIN PB4
  47. #define Z_STOP_PIN PA15
  48. //
  49. // Filament runout
  50. //
  51. #define FIL_RUNOUT_PIN PB5
  52. //
  53. // Steppers
  54. //
  55. #define X_STEP_PIN PB8
  56. #define X_DIR_PIN PB9
  57. #define X_ENABLE_PIN PA8
  58. #define Y_STEP_PIN PB2
  59. #define Y_DIR_PIN PB3
  60. #define Y_ENABLE_PIN PB1
  61. #define Z_STEP_PIN PC0
  62. #define Z_DIR_PIN PC1
  63. #define Z_ENABLE_PIN PC2
  64. #define E0_STEP_PIN PC15
  65. #define E0_DIR_PIN PC14
  66. #define E0_ENABLE_PIN PC13
  67. #if HAS_TMC_UART
  68. #define X_HARDWARE_SERIAL MSerial2
  69. #define Y_HARDWARE_SERIAL MSerial2
  70. #define Z_HARDWARE_SERIAL MSerial2
  71. #define E0_HARDWARE_SERIAL MSerial2
  72. // Default TMC slave addresses
  73. #ifndef X_SLAVE_ADDRESS
  74. #define X_SLAVE_ADDRESS 0
  75. #endif
  76. #ifndef Y_SLAVE_ADDRESS
  77. #define Y_SLAVE_ADDRESS 1
  78. #endif
  79. #ifndef Z_SLAVE_ADDRESS
  80. #define Z_SLAVE_ADDRESS 2
  81. #endif
  82. #ifndef E0_SLAVE_ADDRESS
  83. #define E0_SLAVE_ADDRESS 3
  84. #endif
  85. #endif
  86. //
  87. // Heaters / Fans
  88. //
  89. #define HEATER_0_PIN PC6
  90. #define HEATER_BED_PIN PC7
  91. #ifndef FAN_PIN
  92. #define FAN_PIN PC8
  93. #endif
  94. //
  95. // Temperature Sensors
  96. //
  97. #define TEMP_BED_PIN PC5 // Analog Input
  98. #define TEMP_0_PIN PC4 // Analog Input
  99. //
  100. // Misc. Functions
  101. //
  102. #define SDSS PA4
  103. #define SD_DETECT_PIN PC3
  104. #ifndef RGB_LED_R_PIN
  105. #define RGB_LED_R_PIN PB0
  106. #endif
  107. #ifndef RGB_LED_G_PIN
  108. #define RGB_LED_G_PIN PB7
  109. #endif
  110. #ifndef RGB_LED_B_PIN
  111. #define RGB_LED_B_PIN PB6
  112. #endif
  113. /**
  114. * EXP1 pinout for the LCD according to FYSETC's Cheetah board schematic
  115. * ------
  116. * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC)
  117. * (BTN_EN2) PC11 | 3 4 | PB14 (LCD_RS / MISO)
  118. * (BTN_EN1) PC10 5 6 | PB13 (SCK)
  119. * (LCD_EN) PB12 | 7 8 | PB15 (MOSI)
  120. * GND | 9 10 | 5V
  121. * ------
  122. * EXP1
  123. *
  124. * Notes:
  125. * - The pin-numbers match the connector correctly and are not in reverse order like on the Ender-3 board.
  126. * - Functionally the pins are assigned in the same order as on the Ender-3 board.
  127. * - Pin 4 on the Cheetah board is assigned to an I/O, it is assigned to RESET on the Ender-3 board.
  128. */
  129. #define EXP1_01_PIN PC9
  130. #define EXP1_02_PIN PC12
  131. #define EXP1_03_PIN PC11
  132. #define EXP1_04_PIN PB14
  133. #define EXP1_05_PIN PC10
  134. #define EXP1_06_PIN PB13
  135. #define EXP1_07_PIN PB12
  136. #define EXP1_08_PIN PB15
  137. #if HAS_WIRED_LCD
  138. #define BEEPER_PIN EXP1_01_PIN
  139. #if HAS_MARLINUI_U8GLIB
  140. #define DOGLCD_A0 EXP1_04_PIN
  141. #define DOGLCD_CS EXP1_07_PIN
  142. #define DOGLCD_SCK EXP1_06_PIN
  143. #define DOGLCD_MOSI EXP1_08_PIN
  144. #if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920)
  145. #define FORCE_SOFT_SPI
  146. #endif
  147. //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
  148. #endif
  149. #define LCD_PINS_RS EXP1_07_PIN // CS -- SOFT SPI for ENDER3 LCD
  150. #define LCD_PINS_D4 EXP1_06_PIN // SCLK
  151. #define LCD_PINS_ENABLE EXP1_08_PIN // DATA MOSI
  152. //#define LCD_CONTRAST_INIT 190
  153. #if IS_NEWPANEL
  154. #define BTN_EN1 EXP1_05_PIN
  155. #define BTN_EN2 EXP1_03_PIN
  156. #define BTN_ENC EXP1_02_PIN
  157. #endif
  158. #endif
  159. #if ENABLED(TOUCH_UI_FTDI_EVE)
  160. #define BEEPER_PIN EXP1_01_PIN
  161. #define CLCD_MOD_RESET EXP1_03_PIN
  162. #define CLCD_SPI_CS EXP1_07_PIN
  163. //#define CLCD_USE_SOFT_SPI // the Cheetah can use hardware-SPI so we do not really need this
  164. #if ENABLED(CLCD_USE_SOFT_SPI)
  165. #define CLCD_SOFT_SPI_MOSI EXP1_08_PIN
  166. #define CLCD_SOFT_SPI_MISO EXP1_04_PIN
  167. #define CLCD_SOFT_SPI_SCLK EXP1_06_PIN
  168. #else
  169. #define CLCD_SPI_BUS 2
  170. #endif
  171. #endif