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_STM3R_MINI.h 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. #if !defined(__STM32F1__) && !defined(__STM32F4__)
  23. #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'"
  24. #endif
  25. /**
  26. * 21017 Victor Perez Marlin for stm32f1 test
  27. */
  28. #define DEFAULT_MACHINE_NAME "STM3R Mini"
  29. #define BOARD_NAME "Marlin for STM32"
  30. // Enable I2C_EEPROM for testing
  31. #define I2C_EEPROM
  32. // Ignore temp readings during develpment.
  33. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  34. //
  35. // Limit Switches
  36. //
  37. #define U_MIN_PIN -1
  38. #define V_MIN_PIN -1
  39. #define W_MIN_PIN -1
  40. #define X_STOP_PIN PD0
  41. #define Y_STOP_PIN PD1
  42. #define Z_STOP_PIN PD4
  43. //
  44. // Steppers
  45. //
  46. #define X_STEP_PIN PE1
  47. #define X_DIR_PIN PE0
  48. #define X_ENABLE_PIN PC0
  49. #define Y_STEP_PIN PE3
  50. #define Y_DIR_PIN PE2
  51. #define Y_ENABLE_PIN PC1
  52. #define Z_STEP_PIN PE5
  53. #define Z_DIR_PIN PE4
  54. #define Z_ENABLE_PIN PC2
  55. #define E0_STEP_PIN PE7
  56. #define E0_DIR_PIN PE6
  57. #define E0_ENABLE_PIN PC3
  58. #define E1_STEP_PIN PE9
  59. #define E1_DIR_PIN PE8
  60. #define E1_ENABLE_PIN PC4
  61. #define E2_STEP_PIN PE11
  62. #define E2_DIR_PIN PE10
  63. #define E2_ENABLE_PIN PC5
  64. //
  65. // Misc. Functions
  66. //
  67. #define SDSS PA15
  68. #define LED_PIN PB2
  69. //
  70. // Heaters / Fans
  71. //
  72. #define HEATER_0_PIN PD12 // EXTRUDER 1
  73. //#define HEATER_1_PIN PD13
  74. #define HEATER_BED_PIN PB9 // BED
  75. //#define HEATER_BED2_PIN -1 // BED2
  76. //#define HEATER_BED3_PIN -1 // BED3
  77. #ifndef FAN_PIN
  78. #define FAN_PIN PD14
  79. #endif
  80. #define FAN1_PIN PD13
  81. #define FAN_SOFT_PWM
  82. //
  83. // Temperature Sensors
  84. //
  85. #define TEMP_BED_PIN PA0
  86. #define TEMP_0_PIN PA1
  87. #define TEMP_1_PIN PA2
  88. #define TEMP_2_PIN PA3
  89. // Laser control
  90. #if HAS_CUTTER
  91. #define SPINDLE_LASER_PWM_PIN PB8
  92. #define SPINDLE_LASER_ENA_PIN PD5
  93. #endif
  94. //
  95. // LCD Pins
  96. //
  97. #if HAS_SPI_LCD
  98. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  99. #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
  100. #define LCD_PINS_ENABLE 51 // SID (MOSI)
  101. #define LCD_PINS_D4 52 // SCK (CLK) clock
  102. #elif BOTH(NEWPANEL, PANEL_ONE)
  103. #define LCD_PINS_RS PB8
  104. #define LCD_PINS_ENABLE PD2
  105. #define LCD_PINS_D4 PB12
  106. #define LCD_PINS_D5 PB13
  107. #define LCD_PINS_D6 PB14
  108. #define LCD_PINS_D7 PB15
  109. #else
  110. #define LCD_PINS_RS PB8
  111. #define LCD_PINS_ENABLE PD2
  112. #define LCD_PINS_D4 PB12
  113. #define LCD_PINS_D5 PB13
  114. #define LCD_PINS_D6 PB14
  115. #define LCD_PINS_D7 PB15
  116. #if DISABLED(NEWPANEL)
  117. #define BEEPER_PIN 33
  118. // Buttons are attached to a shift register
  119. // Not wired yet
  120. //#define SHIFT_CLK 38
  121. //#define SHIFT_LD 42
  122. //#define SHIFT_OUT 40
  123. //#define SHIFT_EN 17
  124. #endif
  125. #endif
  126. #if ENABLED(NEWPANEL)
  127. #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
  128. #define BEEPER_PIN 37
  129. #define BTN_EN1 31
  130. #define BTN_EN2 33
  131. #define BTN_ENC 35
  132. #define SD_DETECT_PIN 49
  133. #define KILL_PIN 41
  134. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  135. #define LCD_BACKLIGHT_PIN 39
  136. #endif
  137. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  138. #define BTN_EN1 64
  139. #define BTN_EN2 59
  140. #define BTN_ENC 63
  141. #define SD_DETECT_PIN 42
  142. #elif ENABLED(LCD_I2C_PANELOLU2)
  143. #define BTN_EN1 47
  144. #define BTN_EN2 43
  145. #define BTN_ENC 32
  146. #define LCD_SDSS 53
  147. #define SD_DETECT_PIN -1
  148. #define KILL_PIN 41
  149. #elif ENABLED(LCD_I2C_VIKI)
  150. #define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  151. #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  152. #define BTN_ENC -1
  153. #define LCD_SDSS 53
  154. #define SD_DETECT_PIN 49
  155. #elif ANY(VIKI2, miniVIKI)
  156. #define BEEPER_PIN 33
  157. // Pins for DOGM SPI LCD Support
  158. #define DOGLCD_A0 44
  159. #define DOGLCD_CS 45
  160. #define LCD_SCREEN_ROT_180
  161. #define BTN_EN1 22
  162. #define BTN_EN2 7
  163. #define BTN_ENC 39
  164. #define SDSS 53
  165. #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
  166. #define KILL_PIN 31
  167. #define STAT_LED_RED_PIN 32
  168. #define STAT_LED_BLUE_PIN 35
  169. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  170. #define BTN_EN1 35
  171. #define BTN_EN2 37
  172. #define BTN_ENC 31
  173. #define SD_DETECT_PIN 49
  174. #define LCD_SDSS 53
  175. #define KILL_PIN 41
  176. #define BEEPER_PIN 23
  177. #define DOGLCD_CS 29
  178. #define DOGLCD_A0 27
  179. #define LCD_BACKLIGHT_PIN 33
  180. #elif ENABLED(MINIPANEL)
  181. #define BEEPER_PIN 42
  182. // Pins for DOGM SPI LCD Support
  183. #define DOGLCD_A0 44
  184. #define DOGLCD_CS 66
  185. #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
  186. #define SDSS 53
  187. #define KILL_PIN 64
  188. // GLCD features
  189. // Uncomment screen orientation
  190. //#define LCD_SCREEN_ROT_90
  191. //#define LCD_SCREEN_ROT_180
  192. //#define LCD_SCREEN_ROT_270
  193. // The encoder and click button
  194. #define BTN_EN1 40
  195. #define BTN_EN2 63
  196. #define BTN_ENC 59
  197. // not connected to a pin
  198. #define SD_DETECT_PIN 49
  199. #else
  200. // Beeper on AUX-4
  201. #define BEEPER_PIN 33
  202. // buttons are directly attached using AUX-2
  203. #if ENABLED(REPRAPWORLD_KEYPAD)
  204. #define BTN_EN1 64
  205. #define BTN_EN2 59
  206. #define BTN_ENC 63
  207. #define SHIFT_OUT 40
  208. #define SHIFT_CLK 44
  209. #define SHIFT_LD 42
  210. #elif ENABLED(PANEL_ONE)
  211. #define BTN_EN1 59 // AUX2 PIN 3
  212. #define BTN_EN2 63 // AUX2 PIN 4
  213. #define BTN_ENC 49 // AUX3 PIN 7
  214. #else
  215. #define BTN_EN1 37
  216. #define BTN_EN2 35
  217. #define BTN_ENC 31
  218. #endif
  219. #if ENABLED(G3D_PANEL)
  220. #define SD_DETECT_PIN 49
  221. #define KILL_PIN 41
  222. #else
  223. //#define SD_DETECT_PIN -1 // Ramps doesn't use this
  224. #endif
  225. #endif
  226. #endif // NEWPANEL
  227. #endif // HAS_SPI_LCD