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_ZM3E2_V1_0.h 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "env_validate.h"
  24. #define BOARD_INFO_NAME "ZONESTAR ZM3E2 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) // 2KB
  30. #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
  31. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB
  32. #endif
  33. //=============================================================================
  34. // Zonestar ZM3E2 V1.0 (STM32F103RCT6) board pin assignments
  35. //=============================================================================
  36. // PA0 PWR_HOLD | PB0 BEEP | PC0 HEATER_0
  37. // PA1 FAN_PIN | PB1 KILL | PC1 HEATER_BED
  38. // PA2 TX2 | PB2 LCD_SDA | PC2 TEMP_BED
  39. // PA3 RX2 | PB3 E1_EN | PC3 TEMP_E0
  40. // PA4 SD_CS | PB4 Z_STOP | PC4 SD_DETECT
  41. // PA5 SD_SCK | PB5 Z_DIR | PC5 BTN_EN2
  42. // PA6 SD_MISO | PB6 Z_STEP | PC6 FAN1
  43. // PA7 SD_MOSI | PB7 Z_EN | PC7 FIL_RUNOUT
  44. // PA8 X_DIR | PB8 Y_STEP | PC8 X_EN
  45. // PA9 LCD_RS | PB9 Y_DIR | PC9 X_STEP
  46. // PA10 LCD_SCK | PB10 BTN_ENC | PC10 Z_MIN_PROBE_PIN
  47. // PA11 USB_D- | PB11 BTN_EN1 | PC11 FIL_RUNOUT2
  48. // PA12 USB_D+ | PB12 LED | PC12 E1_DIR
  49. // PA13 MS1 | PB13 E0_EN | PC13 Y_STOP
  50. // PA14 MS2 | PB14 E0_STEP | PC14 Y_EN
  51. // PA15 PWM | PB15 E0_DIR | PC15 X_STOP
  52. // PD0 NC
  53. // PD1 NC
  54. // PD2 E1_STEP
  55. //=============================================================================
  56. // EXP1 connector
  57. // MARK I/O ZONESTAR_12864LCD ZONESTAR_12864OLED
  58. // 10 MOSI PB1 KILL SDA
  59. // 9 SCK PB0 BEEP SCK
  60. // 8 TX1 PA9 DOGLCD_CS CS
  61. // 7 RX1 PA10 DOGLCD_SCK DC
  62. // 6 ENA PC5 BTN_EN2 KNOB_ENB
  63. // 5 DAT PB2 DOGLCD_MOSI RESET
  64. // 4 TX3 PB10 BTN_ENC KNOB_ENC
  65. // 3 RX3 PB11 BTN_EN1 KNOB_ENA
  66. // 2 +5V
  67. // 1 GND
  68. #define EXP1_03_PIN PB11
  69. #define EXP1_04_PIN PB10
  70. #define EXP1_05_PIN PB2
  71. #define EXP1_06_PIN PC5
  72. #define EXP1_07_PIN PA10
  73. #define EXP1_08_PIN PA9
  74. #define EXP1_09_PIN PB0
  75. #define EXP1_10_PIN PB1
  76. // AUX1 connector
  77. // 1 +5V
  78. // 2 TX2 PA2 UART2_TX
  79. // 3 RX2 PA3 UART2_RX
  80. // 4 GND
  81. // AUX2 connector to BLTouch
  82. // 1 +5V
  83. // 2 SEN PC10
  84. // 3 PWM PA15
  85. // 4 GND
  86. //=============================================================================
  87. //
  88. // Servos
  89. //
  90. #define SERVO0_PIN PA15
  91. //
  92. // Limit Switches
  93. //
  94. #define X_STOP_PIN PC15
  95. #define Y_STOP_PIN PC13
  96. #define Z_STOP_PIN PB4
  97. #ifndef Z_MIN_PROBE_PIN
  98. #define Z_MIN_PROBE_PIN PC10 // BLTouch (3DTouch)
  99. #endif
  100. //
  101. // Filament Runout Sensor
  102. //
  103. #define FIL_RUNOUT_PIN PC7 // E0_SW
  104. //#define FIL_RUNOUT2_PIN PC11 // E1_SW
  105. //
  106. // Steppers
  107. //
  108. #define MS1_PIN PA13
  109. #define MS2_PIN PA14
  110. #define X_STEP_PIN PC9
  111. #define X_DIR_PIN PA8
  112. #define X_ENABLE_PIN PC8
  113. #define Y_STEP_PIN PB8
  114. #define Y_DIR_PIN PB9
  115. #define Y_ENABLE_PIN PC14
  116. #define Z_STEP_PIN PB6
  117. #define Z_DIR_PIN PB5
  118. #define Z_ENABLE_PIN PB7
  119. #define E0_STEP_PIN PB14
  120. #define E0_DIR_PIN PB15
  121. #define E0_ENABLE_PIN PB13
  122. #define E1_STEP_PIN PD2
  123. #define E1_DIR_PIN PC12
  124. #define E1_ENABLE_PIN PB3
  125. //
  126. // Heaters / Fans
  127. //
  128. #define HEATER_0_PIN PC0 // EXTRUDER 1
  129. #define HEATER_BED_PIN PC1 // BED
  130. #define FAN1_PIN PC6
  131. #define FAN_PIN PA1
  132. //
  133. // Temperature Sensors
  134. //
  135. #define TEMP_BED_PIN PC2 // Analog Input
  136. #define TEMP_0_PIN PC3 // Analog Input
  137. #define LED_PIN PB12
  138. //#define KILL_PIN PB1 // @EXP1
  139. #define SUICIDE_PIN PA0
  140. //
  141. // SD card
  142. //
  143. #define ENABLE_SPI1
  144. #define SD_DETECT_PIN PC4
  145. #define SD_SCK_PIN PA5
  146. #define SD_MISO_PIN PA6
  147. #define SD_MOSI_PIN PA7
  148. #define SD_SS_PIN PA4
  149. //
  150. // LCD Pins
  151. //
  152. #if ENABLED(ZONESTAR_12864LCD)
  153. //================================================================================
  154. // LCD 128x64
  155. //================================================================================
  156. // EXP1 connector
  157. // MARK I/O ZONESTAR_12864LCD
  158. // 10 MOSI PB1 KILL
  159. // 9 SCK PB0 BEEP
  160. // 8 TX1 PA9 LCD_PINS_RS
  161. // 7 RX1 PA10 LCD_PINS_D4
  162. // 6 ENA PC5 BTN_EN2
  163. // 5 DAT PB2 LCD_PINS_ENABLE
  164. // 4 TX3 PB10 BTN_ENC
  165. // 3 RX3 PB11 BTN_EN1
  166. // 2 +5V
  167. // 1 GND
  168. #define LCDSCREEN_NAME "ZONESTAR LCD12864"
  169. #define LCD_PINS_RS EXP1_08_PIN
  170. #define LCD_PINS_ENABLE EXP1_05_PIN
  171. #define LCD_PINS_D4 EXP1_07_PIN
  172. //#define KILL_PIN EXP1_10_PIN
  173. #define BEEPER_PIN EXP1_09_PIN
  174. #define BTN_EN1 EXP1_03_PIN
  175. #define BTN_EN2 EXP1_06_PIN
  176. #define BTN_ENC EXP1_04_PIN
  177. #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
  178. #define BOARD_ST7920_DELAY_2 DELAY_NS(200)
  179. #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
  180. #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
  181. //================================================================================
  182. // OLED 128x64
  183. //================================================================================
  184. // 10 MOSI PB1 OLED_SDA
  185. // 9 SCK PB0 OLED_SCK
  186. // 8 TX1 PA9 OLED_CS
  187. // 7 RX1 PA10 OLED_DC
  188. // 6 ENA PC5 KNOB_ENA
  189. // 5 DAT PB2 OLED_RESET
  190. // 4 TX3 PB10 KNOB_ENC
  191. // 3 RX3 PB11 KNOB_ENB
  192. #define FORCE_SOFT_SPI
  193. #define LCDSCREEN_NAME "ZONESTAR 12864OLED"
  194. #define LCD_PINS_RS EXP1_05_PIN // = LCD_RESET_PIN
  195. #define LCD_PINS_DC EXP1_07_PIN // DC
  196. #define DOGLCD_CS EXP1_08_PIN // CS
  197. #define DOGLCD_A0 LCD_PINS_DC // A0 = DC
  198. #define DOGLCD_MOSI EXP1_10_PIN // SDA
  199. #define DOGLCD_SCK EXP1_09_PIN // SCK
  200. // Encoder
  201. #define BTN_EN1 EXP1_03_PIN
  202. #define BTN_EN2 EXP1_06_PIN
  203. #define BTN_ENC EXP1_04_PIN
  204. #endif