My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pins_ZM3E4_V1_0.h 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 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. #define BOARD_INFO_NAME "ZONESTAR ZM3E4 V1.0"
  25. //#define DISABLE_DEBUG
  26. #define DISABLE_JTAG
  27. #if NO_EEPROM_SELECTED
  28. #define FLASH_EEPROM_EMULATION
  29. #define EEPROM_PAGE_SIZE (0x800) // 2K
  30. #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
  31. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K
  32. #endif
  33. //#define OPTION_DUALZ_DRIVE
  34. //#define OPTION_Z2_ENDSTOP
  35. //#define SWITCH_EXTRUDER_SEQUENCE
  36. //=============================================================================
  37. // Zonestar ZM3E4 V1.0 (STM32F103VCT6) board pin assignments
  38. //=============================================================================
  39. // PA0 | PB0 HEAT_1 | PC0 AXU_SDA
  40. // PA1 | PB1 FAN1 | PC1 TEMP_E1
  41. // PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0
  42. // PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED
  43. // PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT
  44. // PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0
  45. // PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP
  46. // PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN
  47. // PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN
  48. // PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR
  49. // PA10 UART1_TX | PB10 TX3 | PC10 E0_EN
  50. // PA11 USB_D- | PB11 RX3 | PC11 Z2_EN
  51. // PA12 USB_D+ | PB12 LED | PC12 Z2_STEP
  52. // PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN
  53. // PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST
  54. // PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS
  55. // PD0 Z2_DIR | PE0 Y_EN
  56. // PD1 Z2_MIN | PE1 Y_STEP
  57. // PD2 Z1_EN | PE2 Y_DIR
  58. // PD3 Z1_STEP | PE3 Y_MIN
  59. // PD4 Z1_DIR | PE4 X_DIR
  60. // PD5 WIFI_RXD | PE5 X_STEP
  61. // PD6 WIFI_TXD | PE6 X_EN
  62. // PD7 Z1_MIN | PE7 AXU_SCL
  63. // PD8 X_MAX | PE8 BTN_EN1
  64. // PD9 E3_DIR | PE9 LCD_SCK
  65. // PD10 E3_STEP | PE10 LCD_MOSI
  66. // PD11 E3_EN | PE11 BEEPER
  67. // PD12 E2_DIR | PE12 LCD_EN
  68. // PD13 E2_STEP | PE13 KILL
  69. // PD14 E2_EN | PE14 BTN_EN2
  70. // PD15 E1_DIR | PE15 BTN_ENC
  71. //=============================================================================
  72. // EXP1 connector
  73. // MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864
  74. // 10 RS PE13 KILL BTN_ENC
  75. // 9 BP PE11 BEEP BEEP
  76. // 8 EN PE12 DOGLCD_CS LCDRS
  77. // 7 MOSI PE10 DOGLCD_SCK LCDE
  78. // 6 EN1 PE8 BTN_EN1 NC
  79. // 5 SCK PE9 DOGLCD_MOSI LCD4
  80. // 4 ENC PE15 BTN_ENC NC
  81. // 3 EN2 PE14 BTN_EN2 NC
  82. // 2 +5V +5V
  83. // 1 GND GND
  84. #define EXP1_01_PIN PE13
  85. #define EXP1_02_PIN PE11
  86. #define EXP1_03_PIN PE12
  87. #define EXP1_04_PIN PE10
  88. #define EXP1_05_PIN PE8
  89. #define EXP1_06_PIN PE9
  90. #define EXP1_07_PIN PE15
  91. #define EXP1_08_PIN PE14
  92. // EXP2 connector
  93. // MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864
  94. // 10
  95. // 9
  96. // 8 RX0 PA9 UART1_RX
  97. // 7 TX0 PA10 UART1_TX BTN_EN2
  98. // 6 CS3 PA15
  99. // 5 MISO3 PB4 BTN_EN1
  100. // 4 MOSI3 PB5 KILL
  101. // 3 SCK3 PB3
  102. // 2 +5V +5V
  103. // 1 GND GND
  104. #define EXP2_03_PIN PA9
  105. #define EXP2_04_PIN PA10
  106. #define EXP2_05_PIN PA15
  107. #define EXP2_06_PIN PB4
  108. #define EXP2_07_PIN PB5
  109. #define EXP2_08_PIN PB3
  110. // AUX1 connector
  111. // 1 +5V
  112. // 2 GND
  113. // 3 RX3 PB11 UART3_RX
  114. // 4 TX3 PB10 UART3_TX
  115. // 5 SCL PE7
  116. // 6 SDA PC0
  117. // WiFi
  118. // 1 +5V
  119. // 2 GND
  120. // 3 WIFI_TXD PD5 UART2_RX
  121. // 4 WIFI_RXD PD6 UART2_TX
  122. // 5 WIFI_RST PC14
  123. // 6 WIFI_CS PC15
  124. //=============================================================================
  125. //
  126. // Servos
  127. //
  128. #define SERVO0_PIN PB9
  129. #define SERVO2_PIN PB7
  130. #define SERVO3_PIN PB6
  131. //
  132. // Limit Switches
  133. //
  134. #define X_MIN_PIN PC13
  135. #define X_MAX_PIN PD8
  136. #define Y_MIN_PIN PE3
  137. #define Y_MAX_PIN PB14
  138. #define Z_MIN_PIN PD7
  139. #define Z_MAX_PIN PB13
  140. //
  141. // Filament Runout Sensor
  142. //
  143. #ifndef FIL_RUNOUT_PIN
  144. #define FIL_RUNOUT_PIN PC8
  145. #endif
  146. //
  147. // Steppers
  148. //
  149. #if ENABLED(COREXY)
  150. #define X_ENABLE_PIN PE0
  151. #define X_STEP_PIN PE1
  152. #define X_DIR_PIN PE2
  153. #define Y_ENABLE_PIN PE6
  154. #define Y_STEP_PIN PE5
  155. #define Y_DIR_PIN PE4
  156. #else
  157. #define X_ENABLE_PIN PE6
  158. #define X_STEP_PIN PE5
  159. #define X_DIR_PIN PE4
  160. #define Y_ENABLE_PIN PE0
  161. #define Y_STEP_PIN PE1
  162. #define Y_DIR_PIN PE2
  163. #endif
  164. #define Z_ENABLE_PIN PD2
  165. #define Z_STEP_PIN PD3
  166. #define Z_DIR_PIN PD4
  167. #ifdef OPTION_DUALZ_DRIVE
  168. #define Z2_ENABLE_PIN PC11
  169. #define Z2_STEP_PIN PC12
  170. #define Z2_DIR_PIN PD0
  171. #endif
  172. #ifdef OPTION_Z2_ENDSTOP
  173. #define Z2_MIN_PIN PD1
  174. #define Z2_MAX_PIN PB12
  175. #endif
  176. #ifdef SWITCH_EXTRUDER_SEQUENCE
  177. #define E3_ENABLE_PIN PC10
  178. #define E3_STEP_PIN PA8
  179. #define E3_DIR_PIN PC9
  180. #define E2_STEP_PIN PC6
  181. #define E2_DIR_PIN PD15
  182. #define E2_ENABLE_PIN PC7
  183. #define E1_STEP_PIN PD13
  184. #define E1_DIR_PIN PD12
  185. #define E1_ENABLE_PIN PD14
  186. #define E0_STEP_PIN PD10
  187. #define E0_DIR_PIN PD9
  188. #define E0_ENABLE_PIN PD11
  189. #else
  190. #define E0_ENABLE_PIN PC10
  191. #define E0_STEP_PIN PA8
  192. #define E0_DIR_PIN PC9
  193. #define E1_STEP_PIN PC6
  194. #define E1_DIR_PIN PD15
  195. #define E1_ENABLE_PIN PC7
  196. #define E2_STEP_PIN PD13
  197. #define E2_DIR_PIN PD12
  198. #define E2_ENABLE_PIN PD14
  199. #define E3_STEP_PIN PD10
  200. #define E3_DIR_PIN PD9
  201. #define E3_ENABLE_PIN PD11
  202. #endif
  203. //
  204. // Temperature Sensors
  205. //
  206. #define TEMP_0_PIN PC2 // TH0
  207. #define TEMP_BED_PIN PC3 // TB1
  208. //
  209. // Heaters / Fans
  210. //
  211. #define HEATER_0_PIN PC5 // HEATER0
  212. #define HEATER_BED_PIN PA2 // HOT BED
  213. #if ENABLED(OPTION_CHAMBER)
  214. #define TEMP_CHAMBER_PIN PC1
  215. #define HEATER_CHAMBER_PIN PB0
  216. #else
  217. #define TEMP_1_PIN PC1 // TH1
  218. #define HEATER_1_PIN PB0 // HEATER1
  219. #endif
  220. #define FAN_PIN PB1 // FAN1
  221. #define FAN1_PIN PB8 // FAN2
  222. //
  223. // Misc. Functions
  224. //
  225. //#define POWER_LOSS_PIN PB15
  226. #define LED_PIN PA0
  227. #define SUICIDE_PIN PA3
  228. //
  229. // SD card
  230. //
  231. #define ENABLE_SPI1
  232. #define SD_DETECT_PIN PC4
  233. #define SD_SCK_PIN PA5
  234. #define SD_MISO_PIN PA6
  235. #define SD_MOSI_PIN PA7
  236. #define SD_SS_PIN PA4
  237. // WiFi Functions
  238. #define WIFI_RST PC15
  239. #define WIFI_EN PC14
  240. //
  241. // LCD / Controller
  242. //
  243. #if ENABLED(ZONESTAR_12864LCD)
  244. #define LCDSCREEN_NAME "ZONESTAR LCD12864"
  245. #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4!
  246. #define LCD_PINS_ENABLE EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4!
  247. #define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4!
  248. #define BEEPER_PIN EXP1_02_PIN
  249. #define KILL_PIN -1 // EXP1_01_PIN
  250. #define BTN_EN1 EXP1_05_PIN
  251. #define BTN_EN2 EXP1_08_PIN
  252. #define BTN_ENC EXP1_07_PIN
  253. #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  254. #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864"
  255. #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4!
  256. #define LCD_PINS_ENABLE EXP1_04_PIN // 6 DATA make sure for zonestar zm3e4!
  257. #define LCD_PINS_D4 EXP1_06_PIN // 8 SCK make sure for zonestar zm3e4!
  258. #define BEEPER_PIN EXP1_02_PIN
  259. #define KILL_PIN EXP2_07_PIN
  260. #define BTN_EN1 EXP2_06_PIN
  261. #define BTN_EN2 EXP2_04_PIN
  262. #define BTN_ENC EXP1_01_PIN
  263. #elif ENABLED(ZONESTAR_DWIN_LCD)
  264. // Connect to EXP2 connector
  265. #define LCDSCREEN_NAME "ZONESTAR DWIN LCD"
  266. #define BEEPER_PIN EXP2_05_PIN
  267. #define KILL_PIN PC0
  268. #define BTN_EN1 EXP2_08_PIN
  269. #define BTN_EN2 EXP2_07_PIN
  270. #define BTN_ENC EXP2_06_PIN
  271. #endif
  272. #if ENABLED(ZONESTAR_LCD2004_KNOB)
  273. #define LCDSCREEN_NAME "LCD2004 KNOB"
  274. #define LCD_PINS_RS EXP1_03_PIN
  275. #define LCD_PINS_ENABLE EXP1_04_PIN
  276. #define LCD_PINS_D4 EXP1_06_PIN
  277. #define LCD_PINS_D5 EXP1_05_PIN
  278. #define LCD_PINS_D6 EXP1_08_PIN
  279. #define LCD_PINS_D7 EXP1_07_PIN
  280. #define BTN_EN1 EXP2_04_PIN
  281. #define BTN_EN2 EXP2_06_PIN
  282. #define BTN_ENC EXP1_01_PIN
  283. #define BEEPER_PIN EXP1_02_PIN
  284. #define KILL_PIN EXP2_07_PIN
  285. #elif ENABLED(ZONESTAR_LCD2004_ADCKEY)
  286. #define LCDSCREEN_NAME "LCD2004 5KEY"
  287. #define LCD_PINS_RS EXP1_03_PIN
  288. #define LCD_PINS_ENABLE EXP1_04_PIN
  289. #define LCD_PINS_D4 EXP1_06_PIN
  290. #define LCD_PINS_D5 EXP1_05_PIN
  291. #define LCD_PINS_D6 EXP1_08_PIN
  292. #define LCD_PINS_D7 EXP1_07_PIN
  293. #define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1
  294. #endif
  295. // Alter timing for graphical display
  296. #if IS_U8GLIB_ST7920
  297. #define BOARD_ST7920_DELAY_1 125
  298. #define BOARD_ST7920_DELAY_2 250
  299. #define BOARD_ST7920_DELAY_3 125
  300. #endif
  301. // Remap SERVO0 PIN for BLTouch
  302. #if ENABLED(BLTOUCH_ON_EXP1)
  303. // BLTouch connected to EXP1
  304. #define BLTOUCH_PROBE_PIN EXP1_05_PIN
  305. #define BLTOUCH_GND_PIN EXP1_07_PIN
  306. #undef SERVO0_PIN
  307. #define SERVO0_PIN EXP1_08_PIN
  308. #elif ENABLED(BLTOUCH_ON_EXP2)
  309. // BLTouch connected to EXP2
  310. #define BLTOUCH_PROBE_PIN EXP2_08_PIN
  311. #define BLTOUCH_GND_PIN EXP2_07_PIN
  312. #undef SERVO0_PIN
  313. #define SERVO0_PIN EXP2_05_PIN
  314. #else
  315. #define BLTOUCH_PROBE_PIN PB13
  316. #endif