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

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