My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2017 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. /**
  23. * Anet V1.0 board pin assignments
  24. */
  25. /**
  26. * Rev B 16 JUN 2017
  27. *
  28. * 1) no longer uses Sanguino files to define some of the pins
  29. * 2) added pointers to useable Arduino IDE extensions
  30. *
  31. */
  32. /**
  33. * The standard Arduino IDE extension (board manager) for this board
  34. * is located at https://github.com/SkyNet3D/anet-board.
  35. *
  36. * Installation instructions are on that page.
  37. *
  38. * After copying the files to the appropriate location, restart Arduino and
  39. * you'll see "Anet V1.0" and "Anet V1.0 (Optiboot)" in the boards list.
  40. *
  41. * "Anet V1.0" uses the bootloader that was installed on the board when
  42. * it shipped from the factory.
  43. *
  44. * "Anet V1.0 (Optiboot)" frees up another 3K of FLASH. You'll need to burn
  45. * a new bootloader to the board to be able to automatically download a
  46. * compiled image.
  47. *
  48. */
  49. /**
  50. * Another usable Arduino IDE extension (board manager) can be found at
  51. * https://github.com/Lauszus/Sanguino
  52. *
  53. * This extension has been tested on Arduino 1.6.12 & 1.8.0
  54. *
  55. * Here's the JSON path:
  56. * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
  57. *
  58. * When installing select 1.0.2
  59. *
  60. * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
  61. * Just use the above JSON URL instead of Sparkfun's JSON.
  62. *
  63. * Once installed select the Sanguino board and then select the CPU.
  64. *
  65. */
  66. /**
  67. * To burn a new bootloader:
  68. *
  69. * 1. Connect your programmer to the board.
  70. * 2. In the Arduino IDE select the board and then select the programmer.
  71. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
  72. * 4. The programmer is no longer needed. Remove it.
  73. */
  74. /**
  75. * Additional info:
  76. *
  77. * Anet Schematics - https://github.com/ralf-e/ANET-3D-Board-V1.0
  78. * Wiring RRDFG Smart Controller - http://www.thingiverse.com/thing:2103748
  79. * SkyNet3D Anet software development - https://github.com/SkyNet3D/Marlin/
  80. * Anet Users / Skynet SW on Facebook - https://www.facebook.com/skynet3ddevelopment/
  81. *
  82. * Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community.
  83. */
  84. #if !defined(__AVR_ATmega1284P__)
  85. #error "Oops! Make sure you have 'Anet V1.0', 'Anet V1.0 (Optiboot)' or 'Sanguino' selected from the 'Tools -> Boards' menu."
  86. #endif
  87. #ifndef BOARD_NAME
  88. #define BOARD_NAME "Anet"
  89. #endif
  90. #define LARGE_FLASH true
  91. //
  92. // Limit Switches
  93. //
  94. #define X_STOP_PIN 18
  95. #define Y_STOP_PIN 19
  96. #define Z_STOP_PIN 20
  97. //
  98. // Steppers
  99. //
  100. #define X_STEP_PIN 15
  101. #define X_DIR_PIN 21
  102. #define X_ENABLE_PIN 14
  103. #define Y_STEP_PIN 22
  104. #define Y_DIR_PIN 23
  105. #define Y_ENABLE_PIN 14
  106. #define Z_STEP_PIN 3
  107. #define Z_DIR_PIN 2
  108. #define Z_ENABLE_PIN 26
  109. #define E0_STEP_PIN 1
  110. #define E0_DIR_PIN 0
  111. #define E0_ENABLE_PIN 14
  112. //
  113. // Temperature Sensors
  114. //
  115. #define TEMP_0_PIN 7 // Analog Input (pin 33 extruder)
  116. #define TEMP_BED_PIN 6 // Analog Input (pin 34 bed)
  117. //
  118. // Heaters / Fans
  119. //
  120. #define HEATER_0_PIN 13 // (extruder)
  121. #define HEATER_BED_PIN 12 // (bed)
  122. #define FAN_PIN 4
  123. //
  124. // Misc. Functions
  125. //
  126. #define SDSS 31
  127. #define LED_PIN -1
  128. /**
  129. * LCD / Controller
  130. *
  131. * Only the following displays are supported:
  132. * ANET_KEYPAD_LCD
  133. * ANET_FULL_GRAPHICS_LCD
  134. * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  135. */
  136. #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
  137. #define LCD_SDSS 28
  138. #if ENABLED(ADC_KEYPAD)
  139. #define SERVO0_PIN 27 // free for BLTouch/3D-Touch
  140. #define LCD_PINS_RS 28
  141. #define LCD_PINS_ENABLE 29
  142. #define LCD_PINS_D4 10
  143. #define LCD_PINS_D5 11
  144. #define LCD_PINS_D6 16
  145. #define LCD_PINS_D7 17
  146. #define BTN_EN1 -1
  147. #define BTN_EN2 -1
  148. #define BTN_ENC -1
  149. #define ADC_KEYPAD_PIN 1
  150. #define ENCODER_FEEDRATE_DEADZONE 2
  151. #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(ANET_FULL_GRAPHICS_LCD)
  152. // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
  153. // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb
  154. // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748
  155. #define SERVO0_PIN 29 // free for BLTouch/3D-Touch
  156. #define BEEPER_PIN 17
  157. #define LCD_PINS_RS 27
  158. #define LCD_PINS_ENABLE 28
  159. #define LCD_PINS_D4 30
  160. #define BTN_EN1 11
  161. #define BTN_EN2 10
  162. #define BTN_ENC 16
  163. #define ST7920_DELAY_1 DELAY_0_NOP
  164. #define ST7920_DELAY_2 DELAY_1_NOP
  165. #define ST7920_DELAY_3 DELAY_2_NOP
  166. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  167. #define ENCODER_STEPS_PER_MENU_ITEM 1
  168. #endif
  169. #ifndef ENCODER_PULSES_PER_STEP
  170. #define ENCODER_PULSES_PER_STEP 4
  171. #endif
  172. #endif
  173. #endif // ULTRA_LCD && NEWPANEL
  174. /**
  175. * ====================================================================
  176. * =============== Alternative RepRapDiscount Wiring ==================
  177. * ====================================================================
  178. *
  179. * An alternative wiring scheme for the RepRapDiscount Full Graphics Display is
  180. * published by oderwat on Thingiverse at https://www.thingiverse.com/thing:2103748.
  181. *
  182. * Using that adapter requires changing the pin definition as follows:
  183. * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch
  184. * #define BEEPER_PIN 28
  185. * #define LCD_PINS_RS 30
  186. * #define LCD_PINS_ENABLE 29
  187. * #define LCD_PINS_D4 17
  188. *
  189. * The BLTouch pin becomes LCD:3
  190. */
  191. /**
  192. * ====================================================================
  193. * ===================== LCD PINOUTS ==================================
  194. * ====================================================================
  195. *
  196. * Anet V1.0 controller | ANET_KEYPAD_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring
  197. * physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | http://www.thingiverse
  198. * pin pin functions | | | | .com/thing:2103748
  199. *------------------------------------------------------------------------------------------------------------------------
  200. * ANET-J3.1 8 *** | N/A | J3_TX *** | |
  201. * ANET-J3.2 9 *** | N/A | J3_RX *** | |
  202. * ANET-J3.3 6 MISO | N/A | MISO *** | EXP2.1 MISO | EXP2.1 MISO
  203. * ANET-J3.4 +5V | N/A | +5V | |
  204. * ANET-J3.5 7 SCK | N/A | SCK *** | EXP2.2 SCK | EXP2.2 SCK
  205. * ANET-J3.6 5 MOSI | N/A | MOSI *** | EXP2.6 MOSI | EXP2.6 MOSI
  206. * ANET-J3.7 !RESET | N/A | button | EXP2.8 panel button | EXP2.8 panel button
  207. * ANET-J3.8 GND | N/A | GND | EXP2.9 GND | EXP2.9 GND
  208. * ANET-J3.9 4 Don't use | N/A | N/C | |
  209. * ANET-J3.10 +3.3V | N/A | +3.3V *** | |
  210. * | | | |
  211. * | | | |
  212. * ANET-LCD.1 GND | GND | GND | EXP1.9 GND | EXP1.9 GND
  213. * ANET-LCD.2 +5V | +5V | +5V | EXP1.10 +5V | EXP1.10 +5V
  214. * ANET-LCD.3 27 A4 | N/C * | LCD_PINS_RS | EXP1.4 LCD_PINS_RS | EXP2.4 SDSS or N/C *
  215. * ANET-LCD.4 10 | LCD_PINS_D4 | BTN_EN2 | EXP2.3 BTN_EN2 | EXP2.3 BTN_EN2
  216. * ANET-LCD.5 28 A3 | LCD_PINS_RS | LCD_PINS_ENABLE | EXP1.3 LCD_PINS_ENABLE | EXP1.1 BEEPER_PIN
  217. * ANET-LCD.6 11 | LCD_PINS_D5 | BTN_EN1 | EXP2.5 BTN_EN1 | EXP2.5 BTN_EN1
  218. * ANET-LCD.7 29 A2 | LCD_PINS_ENABLE | N/C * | EXP2.4 SDSS or N/C * | EXP1.3 LCD_PINS_ENABLE
  219. * ANET-LCD.8 16 SCL | LCD_PINS_D6 | BTN_ENC | EXP1.2 BTN_ENC | EXP1.2 BTN_ENC
  220. * ANET-LCD.9 30 A1 | ADC_KEYPAD_PIN ** | LCD_PINS_D4 | EXP1.5 LCD_PINS_D4 | EXP1.4 LCD_PINS_RS
  221. * ANET-LCD.10 17 SDA | LCD_PINS_D7 | BEEPER_PIN | EXP1.1 BEEPER_PIN | EXP1.5 LCD_PINS_D4
  222. *
  223. * N/C * - if not connected to the LCD can be used for BLTouch servo input
  224. * ** - analog pin -WITHOUT a pullup
  225. * *** - only connected to something if the Bluetooth module is populated
  226. */
  227. /**
  228. * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  229. * physical pin function
  230. * EXP1.1 BEEPER
  231. * EXP1.2 BTN_ENC
  232. * EXP1.3 LCD_PINS_ENABLE
  233. * EXP1.4 LCD_PINS_RS
  234. * EXP1.5 LCD_PINS_D4
  235. * EXP1.6 LCD_PINS_D5 (not used)
  236. * EXP1.7 LCD_PINS_D6 (not used)
  237. * EXP1.8 LCD_PINS_D7 (not used)
  238. * EXP1.9 GND
  239. * EXP1.10 VCC
  240. *
  241. *
  242. * EXP2.1 MISO
  243. * EXP2.2 SCK
  244. * EXP2.3 BTN_EN2
  245. * EXP2.4 SDSS
  246. * EXP2.5 BTN_EN1
  247. * EXP2.6 MOSI
  248. * EXP2.7 SD_DETECT_PIN
  249. * EXP2.8 button
  250. * EXP2.9 GND
  251. * EXP2.10 NC
  252. */