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_BTT_BTT002_V1_0.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #ifndef TARGET_STM32F4
  24. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  25. #elif HOTENDS > 1 || E_STEPPERS > 1
  26. #error "BIGTREE BTT002 V1.0 supports up to 1 hotends / E-steppers."
  27. #endif
  28. #define BOARD_INFO_NAME "BIGTREE Btt002 1.0"
  29. #define SRAM_EEPROM_EMULATION
  30. // Ignore temp readings during development.
  31. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  32. //
  33. // Servos
  34. //
  35. #define SERVO0_PIN PC3
  36. //
  37. // Limit Switches
  38. //
  39. #define X_MIN_PIN PD3
  40. #define X_MAX_PIN PD3
  41. #define Y_MIN_PIN PD2
  42. #define Y_MAX_PIN PD2
  43. #define Z_MIN_PIN PD1
  44. #define Z_MAX_PIN PD1
  45. //
  46. // Z Probe must be this pin
  47. //
  48. #ifndef Z_MIN_PROBE_PIN
  49. #define Z_MIN_PROBE_PIN PD1
  50. #endif
  51. //
  52. // Filament Runout Sensor
  53. //
  54. #ifndef FIL_RUNOUT_PIN
  55. #define FIL_RUNOUT_PIN PA15
  56. #endif
  57. //
  58. // Power Loss Detection
  59. //
  60. #ifndef POWER_LOSS_PIN
  61. #define POWER_LOSS_PIN PD4
  62. #endif
  63. //
  64. // Steppers
  65. //
  66. #define X_STEP_PIN PA9
  67. #define X_DIR_PIN PA10
  68. #define X_ENABLE_PIN PA8
  69. #ifndef X_CS_PIN
  70. #define X_CS_PIN PE2
  71. #endif
  72. #define Y_STEP_PIN PC8
  73. #define Y_DIR_PIN PC9
  74. #define Y_ENABLE_PIN PC7
  75. #ifndef Y_CS_PIN
  76. #define Y_CS_PIN PE3
  77. #endif
  78. #define Z_STEP_PIN PD15
  79. #define Z_DIR_PIN PC6
  80. #define Z_ENABLE_PIN PD14
  81. #ifndef Z_CS_PIN
  82. #define Z_CS_PIN PE4
  83. #endif
  84. #define E0_STEP_PIN PD12
  85. #define E0_DIR_PIN PD13
  86. #define E0_ENABLE_PIN PD11
  87. #ifndef E0_CS_PIN
  88. #define E0_CS_PIN PD7
  89. #endif
  90. //
  91. // Software SPI pins for TMC2130 stepper drivers
  92. //
  93. #if ENABLED(TMC_USE_SW_SPI)
  94. #ifndef TMC_SW_MOSI
  95. #define TMC_SW_MOSI PB15
  96. #endif
  97. #ifndef TMC_SW_MISO
  98. #define TMC_SW_MISO PB14
  99. #endif
  100. #ifndef TMC_SW_SCK
  101. #define TMC_SW_SCK PB13
  102. #endif
  103. #endif
  104. #if HAS_TMC220x
  105. /**
  106. * TMC2208/TMC2209 stepper drivers
  107. *
  108. * Hardware serial communication ports.
  109. * If undefined software serial is used according to the pins below
  110. */
  111. //#define X_HARDWARE_SERIAL Serial1
  112. //#define X2_HARDWARE_SERIAL Serial1
  113. //#define Y_HARDWARE_SERIAL Serial1
  114. //#define Y2_HARDWARE_SERIAL Serial1
  115. //#define Z_HARDWARE_SERIAL Serial1
  116. //#define Z2_HARDWARE_SERIAL Serial1
  117. //#define E0_HARDWARE_SERIAL Serial1
  118. //#define E1_HARDWARE_SERIAL Serial1
  119. //#define E2_HARDWARE_SERIAL Serial1
  120. //#define E3_HARDWARE_SERIAL Serial1
  121. //#define E4_HARDWARE_SERIAL Serial1
  122. //
  123. // Software serial ##
  124. //
  125. #define X_SERIAL_TX_PIN PE2
  126. #define X_SERIAL_RX_PIN PE2
  127. #define Y_SERIAL_TX_PIN PE3
  128. #define Y_SERIAL_RX_PIN PE3
  129. #define Z_SERIAL_TX_PIN PE4
  130. #define Z_SERIAL_RX_PIN PE4
  131. #define E0_SERIAL_TX_PIN PD7
  132. #define E0_SERIAL_RX_PIN PD7
  133. // Reduce baud rate to improve software serial reliability
  134. #define TMC_BAUD_RATE 19200
  135. #endif
  136. //
  137. // Temperature Sensors
  138. //
  139. #define TEMP_0_PIN PA0 // T1 <-> E0
  140. #define TEMP_1_PIN PA1 // T2 <-> E1
  141. #define TEMP_BED_PIN PA2 // T0 <-> Bed
  142. //
  143. // Heaters / Fans
  144. //
  145. #define HEATER_0_PIN PE6 // Heater0
  146. #define HEATER_BED_PIN PE5 // Hotbed
  147. #define FAN_PIN PB9 // Fan0
  148. #define FAN1_PIN PB8 // Fan1
  149. // HAL SPI1 pins
  150. #define CUSTOM_SPI_PINS
  151. #if ENABLED(CUSTOM_SPI_PINS)
  152. #define SCK_PIN PA5 // SPI1 SCLK
  153. #define SS_PIN PA4 // SPI1 SSEL
  154. #define MISO_PIN PA6 // SPI1 MISO
  155. #define MOSI_PIN PA7 // SPI1 MOSI
  156. #endif
  157. //
  158. // Misc. Functions
  159. //
  160. #define SDSS PA4
  161. /**
  162. * -------------------------------------BTT002 V1.0-----------------------------------------------
  163. * _____ _____ |
  164. * PA3 | · · | GND 5V | · · | GND |
  165. * NRESET | · · | PC4(SD_DET) (LCD_D7) PE13 | · · | PE12 (LCD_D6) |
  166. * (MOSI)PA7 | · · | PB0(BTN_EN2) (LCD_D5) PE11 | · · | PE10 (LCD_D4) |
  167. * (SD_SS)PA4 | · · | PC5(BTN_EN1) (LCD_RS) PE8 | · · | PE9 (LCD_EN) |
  168. * (SCK)PA5 | · · | PA6(MISO) (BTN_ENC) PB1 | · · | PE7 (BEEPER) |
  169. *  ̄ ̄  ̄ ̄ |
  170. * EXP2 EXP1 |
  171. * ---------------------------------------------------------------------------------------------
  172. */
  173. //
  174. // LCDs and Controllers
  175. //
  176. #if HAS_SPI_LCD
  177. #define BEEPER_PIN PE7
  178. #define BTN_ENC PB1
  179. #if ENABLED(CR10_STOCKDISPLAY)
  180. #define LCD_PINS_RS PE12
  181. #define BTN_EN1 PE9
  182. #define BTN_EN2 PE10
  183. #define LCD_PINS_ENABLE PE13
  184. #define LCD_PINS_D4 PE11
  185. #else
  186. #define LCD_PINS_RS PE8
  187. #define BTN_EN1 PC5
  188. #define BTN_EN2 PB0
  189. #define SD_DETECT_PIN PC4
  190. #define LCD_SDSS PA4
  191. #define LCD_PINS_ENABLE PE9
  192. #define LCD_PINS_D4 PE10
  193. #if ENABLED(ULTIPANEL)
  194. #define LCD_PINS_D5 PE11
  195. #define LCD_PINS_D6 PE12
  196. #define LCD_PINS_D7 PE13
  197. #endif
  198. #endif
  199. // Alter timing for graphical display
  200. #if HAS_GRAPHICAL_LCD
  201. #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
  202. #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
  203. #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
  204. #endif
  205. #endif // HAS_SPI_LCD
  206. //
  207. // RGB LEDs
  208. //
  209. #ifndef RGB_LED_R_PIN
  210. #define RGB_LED_R_PIN PB5
  211. #endif
  212. #ifndef RGB_LED_G_PIN
  213. #define RGB_LED_G_PIN PB4
  214. #endif
  215. #ifndef RGB_LED_B_PIN
  216. #define RGB_LED_B_PIN PB3
  217. #endif
  218. #ifndef RGB_LED_W_PIN
  219. #define RGB_LED_W_PIN -1
  220. #endif