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_SKR_common.h 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. #if ENABLED(SKR_HAS_LPC1769)
  24. #if NOT_TARGET(MCU_LPC1769)
  25. #error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
  26. #endif
  27. #elif NOT_TARGET(MCU_LPC1768)
  28. #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
  29. #endif
  30. // If you have the Big tree tech driver expansion module, enable HAS_BTT_EXP_MOT
  31. // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
  32. //#define HAS_BTT_EXP_MOT 1
  33. #if BOTH(HAS_WIRED_LCD, HAS_BTT_EXP_MOT)
  34. #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
  35. #define EXP_MOT_USE_EXP2_ONLY 1
  36. #else
  37. #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time."
  38. #endif
  39. #endif
  40. // Ignore temp readings during development.
  41. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  42. //
  43. // Steppers
  44. //
  45. #ifndef E1_STEP_PIN
  46. #define E1_STEP_PIN P0_01
  47. #endif
  48. #ifndef E1_DIR_PIN
  49. #define E1_DIR_PIN P0_00
  50. #endif
  51. #ifndef E1_ENABLE_PIN
  52. #define E1_ENABLE_PIN P0_10
  53. #endif
  54. //
  55. // Temperature Sensors
  56. // 3.3V max when defined as an analog input
  57. //
  58. #ifndef TEMP_0_PIN
  59. #define TEMP_0_PIN P0_24_A1 // A1 (T1) - (68) - TEMP_0_PIN
  60. #endif
  61. #ifndef TEMP_1_PIN
  62. #define TEMP_1_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_1_PIN
  63. #endif
  64. #ifndef TEMP_BED_PIN
  65. #define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN
  66. #endif
  67. #if HOTENDS == 1
  68. #if TEMP_SENSOR_PROBE
  69. #define TEMP_PROBE_PIN TEMP_1_PIN
  70. #elif TEMP_SENSOR_CHAMBER
  71. #define TEMP_CHAMBER_PIN TEMP_1_PIN
  72. #endif
  73. #endif
  74. //
  75. // Heaters / Fans
  76. //
  77. #ifndef HEATER_0_PIN
  78. #define HEATER_0_PIN P2_07
  79. #endif
  80. #if HOTENDS == 1
  81. #ifndef FAN1_PIN
  82. #define FAN1_PIN P2_04
  83. #endif
  84. #else
  85. #ifndef HEATER_1_PIN
  86. #define HEATER_1_PIN P2_04
  87. #endif
  88. #endif
  89. #ifndef FAN_PIN
  90. #define FAN_PIN P2_03
  91. #endif
  92. #ifndef HEATER_BED_PIN
  93. #define HEATER_BED_PIN P2_05
  94. #endif
  95. //
  96. // LCD / Controller
  97. //
  98. #if !defined(BEEPER_PIN) && HAS_WIRED_LCD && DISABLED(LCD_USE_I2C_BUZZER)
  99. #define BEEPER_PIN P1_30 // (37) not 5V tolerant
  100. #endif
  101. //
  102. // SD Support
  103. //
  104. #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
  105. #if SD_CONNECTION_IS(LCD)
  106. #define SD_SCK_PIN P0_15
  107. #define SD_MISO_PIN P0_17
  108. #define SD_MOSI_PIN P0_18
  109. #elif SD_CONNECTION_IS(ONBOARD)
  110. #undef SD_DETECT_PIN
  111. #define SD_DETECT_PIN P0_27
  112. #define SD_SCK_PIN P0_07
  113. #define SD_MISO_PIN P0_08
  114. #define SD_MOSI_PIN P0_09
  115. #define SD_SS_PIN ONBOARD_SD_CS_PIN
  116. #elif SD_CONNECTION_IS(CUSTOM_CABLE)
  117. #error "No custom SD drive cable defined for this board."
  118. #endif
  119. #if HAS_BTT_EXP_MOT
  120. /** _____ _____
  121. * NC | · · | GND NC | · · | GND
  122. * NC | · · | 1.31 (M1EN) (M2EN) 1.23 | · · | 1.22 (M3EN)
  123. * (M1STP) 0.18 | · · 3.25 (M1DIR) (M1RX) 1.21 | · · 1.20 (M1DIAG)
  124. * (M2DIR) 0.16 | · · | 3.26 (M2STP) (M2RX) 1.19 | · · | 1.18 (M2DIAG)
  125. * (M3DIR) 0.15 | · · | 0.17 (M3STP) (M3RX) 0.28 | · · | 1.30 (M3DIAG)
  126. * ----- -----
  127. * EXP2 EXP1
  128. *
  129. * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
  130. */
  131. // M1 on Driver Expansion Module
  132. #define E2_STEP_PIN EXP2_05_PIN
  133. #define E2_DIR_PIN EXP2_06_PIN
  134. #define E2_ENABLE_PIN EXP2_04_PIN
  135. #if !EXP_MOT_USE_EXP2_ONLY
  136. #define E2_DIAG_PIN EXP1_06_PIN
  137. #define E2_CS_PIN EXP1_05_PIN
  138. #if HAS_TMC_UART
  139. #define E2_SERIAL_TX_PIN EXP1_05_PIN
  140. #define E2_SERIAL_RX_PIN EXP1_05_PIN
  141. #endif
  142. #endif
  143. // M2 on Driver Expansion Module
  144. #define E3_STEP_PIN EXP2_08_PIN
  145. #define E3_DIR_PIN EXP2_07_PIN
  146. #if !EXP_MOT_USE_EXP2_ONLY
  147. #define E3_ENABLE_PIN EXP1_03_PIN
  148. #define E3_DIAG_PIN EXP1_08_PIN
  149. #define E3_CS_PIN EXP1_07_PIN
  150. #if HAS_TMC_UART
  151. #define E3_SERIAL_TX_PIN EXP1_07_PIN
  152. #define E3_SERIAL_RX_PIN EXP1_07_PIN
  153. #endif
  154. #else
  155. #define E3_ENABLE_PIN EXP2_04_PIN
  156. #endif
  157. // M3 on Driver Expansion Module
  158. #define E4_STEP_PIN EXP2_10_PIN
  159. #define E4_DIR_PIN EXP2_09_PIN
  160. #if !EXP_MOT_USE_EXP2_ONLY
  161. #define E4_ENABLE_PIN EXP1_04_PIN
  162. #define E4_DIAG_PIN EXP1_10_PIN
  163. #define E4_CS_PIN EXP1_09_PIN
  164. #if HAS_TMC_UART
  165. #define E4_SERIAL_TX_PIN EXP1_09_PIN
  166. #define E4_SERIAL_RX_PIN EXP1_09_PIN
  167. #endif
  168. #else
  169. #define E4_ENABLE_PIN EXP2_04_PIN
  170. #endif
  171. #endif // HAS_BTT_EXP_MOT