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

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