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_ZMIB_V2.h 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. #define ALLOW_MEGA644P
  24. #include "env_validate.h"
  25. #define BOARD_INFO_NAME "Zonestar ZMIB_V2"
  26. #define BOARD_WEBSITE_URL "www.aliexpress.com/item/32957490744.html"
  27. #define IS_ZMIB_V2
  28. /**
  29. * ZMIB pin assignments
  30. *
  31. * The ZMIB board needs a bootloader installed before Marlin can be uploaded.
  32. * If you don't have a chip programmer you can use a spare Arduino plus a few
  33. * electronic components to write the bootloader.
  34. *
  35. * See http://www.instructables.com/id/Burn-Arduino-Bootloader-with-Arduino-MEGA/
  36. */
  37. /**
  38. * PIN: 0 Port: B0 HEATER_0_PIN
  39. * PIN: 1 Port: B1 HEATER_BED_PIN
  40. * PIN: 2 Port: B2 EXP1_4(BTN_EN2)
  41. * PIN: 3 Port: B3 V1: SD_DETECT_PIN
  42. * PIN: 3 Port: B3 V2: EXP1_6
  43. * PIN: 4 Port: B4 SDSS
  44. * PIN: 4 Port: B4 V1: EXP1_6
  45. * PIN: 5 Port: B5 AVR_MOSI_PIN
  46. * . SD_MOSI_PIN
  47. * PIN: 6 Port: B6 AVR_MISO_PIN
  48. * . EXP1_9(SD_MISO_PIN)
  49. * PIN: 7 Port: B7 AVR_SCK_PIN
  50. * . EXP1_10(SD_SCK_PIN)
  51. * PIN: 8 Port: D0 RXD
  52. * PIN: 9 Port: D1 TXD
  53. * PIN: 10 Port: D2 EXP1_8
  54. * PIN: 11 Port: D3 EXP1_7
  55. * PIN: 12 Port: D4 EXP1_5(BTN_EN1)
  56. * PIN: 13 Port: D5 Z_MIN_PIN
  57. * PIN: 14 Port: D6 E1_DIR_PIN
  58. * PIN: 15 Port: D7 E1_STEP_PIN
  59. * PIN: 16 Port: C0 Z_DIR_PIN
  60. * PIN: 17 Port: C1 Z_STEP_PIN
  61. * PIN: 18 Port: C2 Y_MIN_PIN
  62. * PIN: 19 Port: C3 Y_DIR_PIN
  63. * PIN: 20 Port: C4 Y_STEP_PIN
  64. * PIN: 21 Port: C5 X_MIN_PIN
  65. * PIN: 22 Port: C6 X_DIR_PIN
  66. * PIN: 23 Port: C7 X_STEP_PIN
  67. * PIN: 24 Port: A7 X_ENABLE_PIN
  68. * Y_ENABLE_PIN
  69. * Z_ENABLE_PIN
  70. * E0_ENABLE_PIN
  71. * E1_ENABLE_PIN
  72. * PIN: 25 Port: A6 FIL_RUNOUT_PIN
  73. * PIN: 26 Port: A5 E0_DIR_PIN
  74. * PIN: 27 Port: A4 E0_STEP_PIN
  75. * PIN: 28 Port: A3 FAN_PIN
  76. * PIN: 29 Port: A2 EXP1_3(BTN_ENC)
  77. * ADC_KEY_PIN
  78. * PIN: 30 Port: A1 TEMP_0_PIN
  79. * PIN: 31 Port: A0 TEMP_BED_PIN
  80. */
  81. //
  82. // Limit Switches
  83. //
  84. #define X_MIN_PIN 21
  85. #define Y_MIN_PIN 18
  86. #if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
  87. #define Z_MIN_PIN 25
  88. #else
  89. #define Z_MIN_PIN 13
  90. #endif
  91. //
  92. // Steppers
  93. //
  94. #define X_STEP_PIN 23
  95. #define X_DIR_PIN 22
  96. #define X_ENABLE_PIN 24
  97. #define Y_STEP_PIN 20
  98. #define Y_DIR_PIN 19
  99. #define Y_ENABLE_PIN 24
  100. #if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
  101. #define Z_STEP_PIN 27
  102. #define Z_DIR_PIN 26
  103. #else
  104. #define Z_STEP_PIN 17
  105. #define Z_DIR_PIN 16
  106. #endif
  107. #define Z_ENABLE_PIN 24
  108. #if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
  109. #define E0_STEP_PIN 15
  110. #define E0_DIR_PIN 14
  111. #else
  112. #define E0_STEP_PIN 27
  113. #define E0_DIR_PIN 26
  114. #endif
  115. #define E0_ENABLE_PIN 24
  116. #define E1_STEP_PIN 15
  117. #define E1_DIR_PIN 14
  118. #define E1_ENABLE_PIN 24
  119. //
  120. // Temperature Sensors
  121. //
  122. #define TEMP_0_PIN 1 // Analog Input
  123. #define TEMP_BED_PIN 0 // Analog Input
  124. //
  125. // Heaters / Fans
  126. //
  127. #define HEATER_0_PIN 0
  128. #define HEATER_BED_PIN 1
  129. #define FAN_PIN 28
  130. #define FAN1_PIN -1
  131. //
  132. // Filament Runout Sensor
  133. //
  134. #if EITHER(Z6S_ZFAULT, Z6BS_ZFAULT)
  135. #define FIL_RUNOUT_PIN 13
  136. #else
  137. #define FIL_RUNOUT_PIN 25 // Z-MIN
  138. #endif
  139. //
  140. // SD card
  141. //
  142. #if ENABLED(SDSUPPORT)
  143. #define SDSS 4
  144. #endif
  145. #define SD_DETECT_PIN -1
  146. /** EXP1
  147. * ------
  148. * (MOSI) D5 | 1 2 | D7 (SCK)
  149. * (CS) D11 | 3 4 | D10 (DC/D4)
  150. * (EN2) D12 5 6 | D4 or D3 (EN/RS)
  151. * (ENC) D29 | 7 8 | D2 (EN1)
  152. * (GND) | 9 10 | (5V)
  153. * ------
  154. */
  155. #define EXP1_01_PIN 5
  156. #define EXP1_02_PIN 7
  157. #define EXP1_03_PIN 11
  158. #define EXP1_04_PIN 10
  159. #define EXP1_05_PIN 12
  160. #ifndef IS_ZMIB_V2
  161. #define EXP1_06_PIN 4 // ZMIB V1
  162. #else
  163. #define EXP1_06_PIN 3 // ZMIB V2
  164. #endif
  165. #define EXP1_07_PIN 29
  166. #define EXP1_08_PIN 2
  167. #if ENABLED(ZONESTAR_12864LCD)
  168. //
  169. // LCD 128x64
  170. //
  171. #define LCDSCREEN_NAME "ZONESTAR_12864LCD"
  172. #define FORCE_SOFT_SPI
  173. //#define LCD_SDSS EXP1_03_PIN
  174. #define LCD_PINS_RS EXP1_03_PIN // ST7920_CS_PIN (LCD module pin 4)
  175. #define LCD_PINS_ENABLE EXP1_06_PIN // ST7920_DAT_PIN (LCD module pin 5)
  176. #define LCD_PINS_D4 EXP1_04_PIN // ST7920_CLK_PIN (LCD module pin 6)
  177. #define BOARD_ST7920_DELAY_1 DELAY_2_NOP
  178. #define BOARD_ST7920_DELAY_2 DELAY_2_NOP
  179. #define BOARD_ST7920_DELAY_3 DELAY_2_NOP
  180. #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
  181. //
  182. // OLED 128x64
  183. //
  184. #define LCDSCREEN_NAME "ZONESTAR 12864OLED"
  185. #define FORCE_SOFT_SPI
  186. #define LCD_PINS_RS EXP1_06_PIN
  187. #define LCD_PINS_DC EXP1_04_PIN
  188. #define DOGLCD_CS EXP1_03_PIN
  189. #if ENABLED(OLED_HW_IIC)
  190. #error "Oops! can't choose HW IIC for ZMIB board!!"
  191. #else
  192. #define DOGLCD_A0 LCD_PINS_DC
  193. #if DISABLED(OLED_HW_SPI)
  194. #define DOGLCD_MOSI AVR_MOSI_PIN // Software SPI
  195. #define DOGLCD_SCK AVR_SCK_PIN
  196. #endif
  197. #endif
  198. #endif
  199. //
  200. // All the above are also RRDSC with rotary encoder
  201. //
  202. #if IS_RRD_SC
  203. #define BTN_EN1 EXP1_08_PIN
  204. #define BTN_EN2 EXP1_05_PIN
  205. #define BTN_ENC EXP1_07_PIN
  206. #define BEEPER_PIN -1
  207. #define KILL_PIN -1
  208. #endif