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_CHITU3D.h 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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. #include "env_validate.h"
  24. /**
  25. * 2017 Victor Perez Marlin for stm32f1 test
  26. */
  27. #define BOARD_INFO_NAME "Chitu3D"
  28. #define DEFAULT_MACHINE_NAME "STM32F103RET6"
  29. #define BOARD_NO_NATIVE_USB
  30. // Enable I2C_EEPROM for testing
  31. //#define I2C_EEPROM
  32. // Ignore temp readings during development.
  33. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
  34. //
  35. // Limit Switches
  36. //
  37. #define X_STOP_PIN PG10
  38. #define Y_STOP_PIN PA12
  39. #define Z_STOP_PIN PA14
  40. //
  41. // Steppers
  42. //
  43. #define X_STEP_PIN PE5
  44. #define X_DIR_PIN PE6
  45. #define X_ENABLE_PIN PC13
  46. #define Y_STEP_PIN PE2
  47. #define Y_DIR_PIN PE3
  48. #define Y_ENABLE_PIN PE4
  49. #define Z_STEP_PIN PB9
  50. #define Z_DIR_PIN PE0
  51. #define Z_ENABLE_PIN PE1
  52. #define E0_STEP_PIN PB4
  53. #define E0_DIR_PIN PB5
  54. #define E0_ENABLE_PIN PB8
  55. //
  56. // Misc. Functions
  57. //
  58. #define SDSS -1
  59. #define LED_PIN -1
  60. #ifndef CASE_LIGHT_PIN
  61. #define CASE_LIGHT_PIN PA8 // 8
  62. #endif
  63. #define PS_ON_PIN -1
  64. #define KILL_PIN PD6 // LED strip 24v
  65. //
  66. // Heaters / Fans
  67. //
  68. #define HEATER_0_PIN PD12 // HOT-END
  69. #define HEATER_BED_PIN PG11 // HOT-BED
  70. #ifndef FAN_PIN
  71. #define FAN_PIN PG14 // MAIN BOARD FAN
  72. #endif
  73. #define FAN_SOFT_PWM_REQUIRED
  74. //
  75. // Temperature Sensors
  76. //
  77. #define TEMP_0_PIN PA1 // Analog Input
  78. #define TEMP_BED_PIN PA0 // Analog Input
  79. //
  80. // LCD Pins
  81. //
  82. #if HAS_WIRED_LCD
  83. #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  84. #define LCD_PINS_RS PD1 // 49 // CS chip select /SS chip slave select
  85. #define LCD_PINS_ENABLE PD3 // 51 // SID (MOSI)
  86. #define LCD_PINS_D4 PD4 // 52 // SCK (CLK) clock
  87. #elif BOTH(IS_NEWPANEL, PANEL_ONE)
  88. #define LCD_PINS_RS PB8
  89. #define LCD_PINS_ENABLE PD2
  90. #define LCD_PINS_D4 PB12
  91. #define LCD_PINS_D5 PB13
  92. #define LCD_PINS_D6 PB14
  93. #define LCD_PINS_D7 PB15
  94. #else
  95. #define LCD_PINS_RS PB8
  96. #define LCD_PINS_ENABLE PD2
  97. #define LCD_PINS_D4 PB12
  98. #define LCD_PINS_D5 PB13
  99. #define LCD_PINS_D6 PB14
  100. #define LCD_PINS_D7 PB15
  101. #if !IS_NEWPANEL
  102. #define BEEPER_PIN PC1 // 33
  103. // Buttons attached to a shift register
  104. // Not wired yet
  105. //#define SHIFT_CLK_PIN PC6 // 38
  106. //#define SHIFT_LD_PIN PC10 // 42
  107. //#define SHIFT_OUT_PIN PC8 // 40
  108. //#define SHIFT_EN_PIN PA1 // 17
  109. #endif
  110. #endif
  111. #if IS_NEWPANEL
  112. #if IS_RRD_SC
  113. #define BEEPER_PIN PC5
  114. #define BTN_EN1 PB15 // 31
  115. #define BTN_EN2 PC1 // 33
  116. #define BTN_ENC PC3 // 35
  117. #define SD_DETECT_PIN PD1 // 49
  118. #define KILL_PIN PC9 // 41
  119. #if ENABLED(BQ_LCD_SMART_CONTROLLER)
  120. #define LCD_BACKLIGHT_PIN PC7 // 39
  121. #endif
  122. #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  123. #define BTN_EN1 PE0 // 64
  124. #define BTN_EN2 PD11 // 59
  125. #define BTN_ENC PD15 // 63
  126. #define SD_DETECT_PIN PC10 // 42
  127. #elif ENABLED(LCD_I2C_PANELOLU2)
  128. #define BTN_EN1 PC15 // 47
  129. #define BTN_EN2 PC11 // 43
  130. #define BTN_ENC PC0 // 32
  131. #define LCD_SDSS PD5 // 53
  132. #define SD_DETECT_PIN -1
  133. #define KILL_PIN PC9 // 41
  134. #elif ENABLED(LCD_I2C_VIKI)
  135. #define BTN_EN1 PB6 // 22 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
  136. #define BTN_EN2 PA7 // 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
  137. #define BTN_ENC -1
  138. #define LCD_SDSS PD5 // 53
  139. #define SD_DETECT_PIN PD1 // 49
  140. #elif ANY(VIKI2, miniVIKI)
  141. #define BEEPER_PIN PC1 // 33
  142. // Pins for DOGM SPI LCD Support
  143. #define DOGLCD_A0 PC12 // 44
  144. #define DOGLCD_CS PC13 // 45
  145. #define LCD_SCREEN_ROT_180
  146. #define BTN_EN1 PB6 // 22
  147. #define BTN_EN2 PA7 // 7
  148. #define BTN_ENC PC7 // 39
  149. #define SDSS PD5 // 53
  150. #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
  151. #define KILL_PIN PB15 // 31
  152. #define STAT_LED_RED_PIN PC0 // 32
  153. #define STAT_LED_BLUE_PIN PC3 // 35
  154. #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
  155. #define BTN_EN1 PC3 // 35
  156. #define BTN_EN2 PC5 // 37
  157. #define BTN_ENC PB15 // 31
  158. #define SD_DETECT_PIN PD1 // 49
  159. #define LCD_SDSS PD5 // 53
  160. #define KILL_PIN PC9 // 41
  161. #define BEEPER_PIN PB7 // 23
  162. #define DOGLCD_CS PB13 // 29
  163. #define DOGLCD_A0 PB11 // 27
  164. #define LCD_BACKLIGHT_PIN PC1 // 33
  165. #elif ENABLED(MINIPANEL)
  166. #define BEEPER_PIN PC10 // 42
  167. // Pins for DOGM SPI LCD Support
  168. #define DOGLCD_A0 PC12 // 44
  169. #define DOGLCD_CS PE2 // 66
  170. #define LCD_BACKLIGHT_PIN PE1 // 65 // backlight LED on A11/D65
  171. #define SDSS PD5 // 53
  172. #define KILL_PIN PE0 // 64
  173. // GLCD features
  174. // Uncomment screen orientation
  175. //#define LCD_SCREEN_ROT_90
  176. //#define LCD_SCREEN_ROT_180
  177. //#define LCD_SCREEN_ROT_270
  178. // The encoder and click button
  179. #define BTN_EN1 PC8 // 40
  180. #define BTN_EN2 PD15 // 63
  181. #define BTN_ENC PD11 // 59
  182. // not connected to a pin
  183. #define SD_DETECT_PIN PD1 // 49
  184. #else
  185. // Beeper on AUX-4
  186. #define BEEPER_PIN PC1 // 33
  187. // Buttons directly attached to AUX-2
  188. #if IS_RRW_KEYPAD
  189. #define BTN_EN1 PE0 // 64
  190. #define BTN_EN2 PD11 // 59
  191. #define BTN_ENC PD15 // 63
  192. #define SHIFT_OUT_PIN PC8 // 40
  193. #define SHIFT_CLK_PIN PC12 // 44
  194. #define SHIFT_LD_PIN PC10 // 42
  195. #elif ENABLED(PANEL_ONE)
  196. #define BTN_EN1 PD11 // 59 // AUX2 PIN 3
  197. #define BTN_EN2 PD15 // 63 // AUX2 PIN 4
  198. #define BTN_ENC PD1 // 49 // AUX3 PIN 7
  199. #else
  200. #define BTN_EN1 PC5 // 37
  201. #define BTN_EN2 PC3 // 35
  202. #define BTN_ENC PB15 // 31
  203. #endif
  204. #if ENABLED(G3D_PANEL)
  205. #define SD_DETECT_PIN PD1 // 49
  206. #define KILL_PIN PC9 // 41
  207. #else
  208. //#define SD_DETECT_PIN -1 // Ramps doesn't use this
  209. #endif
  210. #endif
  211. #endif // IS_NEWPANEL
  212. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  213. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  214. #endif
  215. #endif // HAS_WIRED_LCD