My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

pins_BIQU_SKR_V1.1.h 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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. #ifndef TARGET_LPC1768
  23. #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
  24. #endif
  25. #ifndef BOARD_NAME
  26. #define BOARD_NAME "BIQU SKR V1.1"
  27. #endif
  28. //
  29. // Limit Switches
  30. //
  31. #define X_MIN_PIN P1_29
  32. #define X_MAX_PIN P1_28
  33. #define Y_MIN_PIN P1_27
  34. #define Y_MAX_PIN P1_26
  35. #define Z_MIN_PIN P1_25
  36. #define Z_MAX_PIN P1_24
  37. //
  38. // Steppers
  39. //
  40. #define X_STEP_PIN P0_04
  41. #define X_DIR_PIN P0_05
  42. #define X_ENABLE_PIN P4_28
  43. #define Y_STEP_PIN P2_01
  44. #define Y_DIR_PIN P2_02
  45. #define Y_ENABLE_PIN P2_00
  46. #define Z_STEP_PIN P0_20
  47. #define Z_DIR_PIN P0_21
  48. #define Z_ENABLE_PIN P0_19
  49. #define E0_STEP_PIN P0_11
  50. #define E0_DIR_PIN P2_13
  51. #define E0_ENABLE_PIN P2_12
  52. #define E1_STEP_PIN P0_01
  53. #define E1_DIR_PIN P0_00
  54. #define E1_ENABLE_PIN P0_10
  55. //
  56. // Temperature Sensors
  57. // 3.3V max when defined as an analog input
  58. //
  59. #define TEMP_BED_PIN 0 // Analog Input
  60. #define TEMP_0_PIN 1 // Analog Input
  61. #define TEMP_1_PIN 2 // Analog Input
  62. //
  63. // Heaters / Fans
  64. //
  65. #define HEATER_0_PIN P2_07
  66. #if HOTENDS == 1
  67. #define FAN1_PIN P2_04
  68. #else
  69. #define HEATER_1_PIN P2_04
  70. #endif
  71. #define FAN_PIN P2_03
  72. #define HEATER_BED_PIN P2_05
  73. /**
  74. * LCD / Controller
  75. *
  76. * As of 20 JAN 2019 only the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER display has
  77. * been tested with these settings. It can be connected to the SKR using standard cables
  78. * via the EXP1 and EXP2 ports. Other displays may need a custom cable and/or changes to
  79. * the pins defined below.
  80. *
  81. * The SD card on the LCD controller uses the same SPI signals as the LCD, resulting in
  82. * garbage/lines on the LCD display during SD card access. The LCD code mitigates this
  83. * by redrawing the screen after SD card accesses.
  84. */
  85. #if ENABLED(ULTRA_LCD)
  86. #define BEEPER_PIN P1_30
  87. #define BTN_EN1 P3_26
  88. #define BTN_EN2 P3_25
  89. #define BTN_ENC P2_11
  90. #define SD_DETECT_PIN P1_31
  91. #define LCD_SDSS P1_23
  92. #define LCD_PINS_RS P0_16
  93. #define LCD_PINS_ENABLE P0_18
  94. #define LCD_PINS_D4 P0_15
  95. #endif
  96. //
  97. // SD Support
  98. //
  99. //#define USB_SD_DISABLED // Disable host access to SD card as mass storage device through USB
  100. #define USB_SD_ONBOARD // Enable host access to SD card as mass storage device through USB
  101. //#define LPC_SD_LCD // Marlin uses the SD drive attached to the LCD
  102. #define LPC_SD_ONBOARD // Marlin uses the SD drive on the control board. There is no SD detect pin
  103. // for the onboard card. Init card from LCD menu or send M21 whenever printer
  104. // is powered on to enable SD access.
  105. #if ENABLED(LPC_SD_LCD)
  106. #define SCK_PIN P0_15
  107. #define MISO_PIN P0_17
  108. #define MOSI_PIN P0_18
  109. #define SS_PIN P1_23 // Chip select for SD card used by Marlin
  110. #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
  111. #elif ENABLED(LPC_SD_ONBOARD)
  112. #if ENABLED(USB_SD_ONBOARD)
  113. // When sharing the SD card with a PC we want the menu options to
  114. // mount/unmount the card and refresh it. So we disable card detect.
  115. #define SHARED_SD_CARD
  116. #undef SD_DETECT_PIN // there is also no detect pin for the onboard card
  117. #endif
  118. #define SCK_PIN P0_07
  119. #define MISO_PIN P0_08
  120. #define MOSI_PIN P0_09
  121. #define SS_PIN P0_06 // Chip select for SD card used by Marlin
  122. #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card
  123. #endif
  124. // Trinamic driver support
  125. #if HAS_TRINAMIC
  126. // Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately
  127. // the SKR does not have many free pins (especially if a display is in use). The SPI-based devices
  128. // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.
  129. // The UART-based devices require 2 pis per deriver (one of which must be interrupt capable).
  130. // The same SPI pins can be shared with the display/SD card reader, meaning SPI-based devices are
  131. // probably a good choice for this board.
  132. //
  133. // SOFTWARE_DRIVER_ENABLE is a good option. It uses SPI to control the driver enable and allows the
  134. // hardware ENABLE pins for each driver to be repurposed as SPI chip select. To use this mode the
  135. // driver modules will probably need to be modified, removing the pin used for the enable line from
  136. // the module and wiring this connection directly to GND (as is the case for TMC2130).
  137. // Using this option and sharing all of the SPI pins allows 5 TMC2130 drivers to be used along with
  138. // a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER without requiring the use of any extra pins.
  139. //
  140. // Other options will probably require the use of any free pins and the TFT serial port or a
  141. // different type of display (like the TFT), using the pins normally used for the display and encoder.
  142. // Unfortunately, tests show it's not possible to use endstop and thermistor pins for chip-select.
  143. // Sample settings are provided below, but only some have been tested.
  144. //
  145. // Another option is to share the enable and chip-select pins when using SPI. Several users have
  146. // reported that this works. However, it's unlikely that this configuration will allow SPI communi-
  147. // cation with the device when the drivers are active, meaning that some of the more advanced TMC
  148. // options may not be available.
  149. // When using any TMC SPI-based drivers, software SPI is used
  150. // because pins may be shared with the display or SD card.
  151. #define TMC_USE_SW_SPI
  152. #define TMC_SW_MOSI P0_18
  153. #define TMC_SW_MISO P0_17
  154. // To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
  155. #define TMC_SW_SCK P0_15
  156. // If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
  157. //#define TMC_SW_SCK P2_06
  158. #if ENABLED(SOFTWARE_DRIVER_ENABLE)
  159. // Software enable allows the enable pins to be repurposed as chip-select pins.
  160. // Note: Requires the driver modules to be modified to always be enabled with the enable pin removed.
  161. #if AXIS_DRIVER_TYPE_X(TMC2130)
  162. #define X_CS_PIN P4_28
  163. #undef X_ENABLE_PIN
  164. #define X_ENABLE_PIN -1
  165. #endif
  166. #if AXIS_DRIVER_TYPE_Y(TMC2130)
  167. #define Y_CS_PIN P2_00
  168. #undef Y_ENABLE_PIN
  169. #define Y_ENABLE_PIN -1
  170. #endif
  171. #if AXIS_DRIVER_TYPE_Z(TMC2130)
  172. #define Z_CS_PIN P0_19
  173. #undef Z_ENABLE_PIN
  174. #define Z_ENABLE_PIN -1
  175. #endif
  176. #if AXIS_DRIVER_TYPE_E0(TMC2130)
  177. #define E0_CS_PIN P2_12
  178. #undef E0_ENABLE_PIN
  179. #define E0_ENABLE_PIN -1
  180. #endif
  181. #if AXIS_DRIVER_TYPE_E1(TMC2130)
  182. #define E1_CS_PIN P0_10
  183. #undef E1_ENABLE_PIN
  184. #define E1_ENABLE_PIN -1
  185. #endif
  186. #else // !SOFTWARE_DRIVER_ENABLE
  187. // A chip-select pin is needed for each driver.
  188. // EXAMPLES
  189. // Example 1: No LCD attached or a TFT style display using the AUX header RX/TX pins.
  190. // LPC_SD_LCD must not be enabled. Nothing should be connected to EXP1/EXP2.
  191. //#define SKR_USE_LCD_PINS_FOR_CS
  192. #if ENABLED(SKR_USE_LCD_PINS_FOR_CS)
  193. #if ENABLED(LPC_SD_LCD)
  194. #error "LPC_SD_LCD must not be enabled with SKR_USE_LCD_PINS_FOR_CS."
  195. #endif
  196. #define X_CS_PIN P1_23
  197. #define Y_CS_PIN P3_26
  198. #define Z_CS_PIN P2_11
  199. #define E0_CS_PIN P3_25
  200. #define E1_CS_PIN P1_31
  201. #endif
  202. // Example 2: A REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  203. // The SD card reader attached to the LCD (if present) can't be used because
  204. // the pins will be in use. So LPC_SD_LCD must not be defined.
  205. //#define SKR_USE_LCD_SD_CARD_PINS_FOR_CS
  206. #if ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS)
  207. #if ENABLED(LPC_SD_LCD)
  208. #error "LPC_SD_LCD must not be enabled with SKR_USE_LCD_SD_CARD_PINS_FOR_CS."
  209. #endif
  210. #define X_CS_PIN P0_02
  211. #define Y_CS_PIN P0_03
  212. #define Z_CS_PIN P2_06
  213. // We use SD_DETECT_PIN for E0
  214. #undef SD_DETECT_PIN
  215. #define E0_CS_PIN P1_31
  216. // We use LCD_SDSS pin for E1
  217. #undef LCD_SDSS
  218. #define LCD_SDSS -1
  219. #define E1_CS_PIN P1_23
  220. #endif
  221. // Example 3: Use the driver enable pins for chip-select.
  222. // Commands must not be sent to the drivers when enabled. So certain
  223. // advanced features (like driver monitoring) will not be available.
  224. //#define SKR_USE_ENABLE_CS
  225. #if ENABLED(SKR_USE_ENABLE_FOR_CS)
  226. #define X_CS_PIN X_ENABLE_PIN
  227. #define Y_CS_PIN Y_ENABLE_PIN
  228. #define Z_CS_PIN Z_ENABLE_PIN
  229. #define E0_CS_PIN E0_ENABLE_PIN
  230. #define E1_CS_PIN E1_ENABLE_PIN
  231. #endif
  232. #endif // SOFTWARE_DRIVER_ENABLE
  233. #endif