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.8KB

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