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_ANET_10.h 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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. /**
  24. * Anet V1.0 board pin assignments
  25. */
  26. /**
  27. * Rev B 16 JUN 2017
  28. *
  29. * 1) no longer uses Sanguino files to define some of the pins
  30. * 2) added pointers to useable Arduino IDE extensions
  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. * Another usable Arduino IDE extension (board manager) can be found at
  50. * https://github.com/Lauszus/Sanguino
  51. *
  52. * This extension has been tested on Arduino 1.6.12 & 1.8.0
  53. *
  54. * Here's the JSON path:
  55. * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
  56. *
  57. * When installing select 1.0.2
  58. *
  59. * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
  60. * Just use the above JSON URL instead of Sparkfun's JSON.
  61. *
  62. * Once installed select the Sanguino board and then select the CPU.
  63. */
  64. /**
  65. * To burn a new bootloader:
  66. *
  67. * 1. Connect your programmer to the board.
  68. * 2. In the Arduino IDE select the board and then select the programmer.
  69. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
  70. * 4. The programmer is no longer needed. Remove it.
  71. */
  72. /**
  73. * Additional info:
  74. *
  75. * Anet Schematics - https://github.com/ralf-e/ANET-3D-Board-V1.0
  76. * Wiring RRDFG Smart Controller - https://www.thingiverse.com/thing:2103748
  77. * SkyNet3D Anet software development - https://github.com/SkyNet3D/Marlin/
  78. * Anet Users / Skynet SW on Facebook - https://www.facebook.com/skynet3ddevelopment/
  79. *
  80. * Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community.
  81. */
  82. /**
  83. * OptiBoot Bootloader:
  84. * Optiboot is an alternative bootloader that can be flashed on the board to free up space for a larger firmware build.
  85. * See https://github.com/Optiboot/optiboot for more information.
  86. *
  87. * Install Marlin with Arduino IDE:
  88. * For a board with the stock bootloader, select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.'
  89. * For a board with OptiBoot, select 'Sanguino (Optiboot)' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.'
  90. *
  91. * Install Marlin with PlatformIO IDE:
  92. * (NOTE: You can set a default build environment by editing the value of 'default_env' in 'platformio.ini'.
  93. * For the best user experience install the "Auto Build Marlin" extension.)
  94. * For a board with the stock bootloader use Build / Upload under the 'sanguino1284p' or 'sanguino1284p_optimized' target.
  95. * For a board with OptiBoot, use Build / Upload under the 'melzi_optiboot' target.
  96. */
  97. #if NOT_TARGET(__AVR_ATmega1284P__)
  98. #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'sanguino1284p' or 'sanguino1284p_optimized'. With optiboot, use 'melzi_optiboot.')"
  99. #endif
  100. #define BOARD_INFO_NAME "Anet 1.0"
  101. //
  102. // Limit Switches
  103. //
  104. #define X_STOP_PIN 18
  105. #define Y_STOP_PIN 19
  106. #define Z_STOP_PIN 20
  107. //
  108. // Steppers
  109. //
  110. #define X_STEP_PIN 15
  111. #define X_DIR_PIN 21
  112. #define X_ENABLE_PIN 14
  113. #define Y_STEP_PIN 22
  114. #define Y_DIR_PIN 23
  115. #define Y_ENABLE_PIN 14
  116. #define Z_STEP_PIN 3
  117. #define Z_DIR_PIN 2
  118. #define Z_ENABLE_PIN 26
  119. #define E0_STEP_PIN 1
  120. #define E0_DIR_PIN 0
  121. #define E0_ENABLE_PIN 14
  122. //
  123. // Temperature Sensors
  124. //
  125. #define TEMP_0_PIN 7 // Analog Input (pin 33 extruder)
  126. #define TEMP_BED_PIN 6 // Analog Input (pin 34 bed)
  127. //
  128. // Heaters / Fans
  129. //
  130. #define HEATER_0_PIN 13 // (extruder)
  131. #define HEATER_BED_PIN 12 // (bed)
  132. #ifndef FAN_PIN
  133. #define FAN_PIN 4
  134. #endif
  135. //
  136. // Misc. Functions
  137. //
  138. #define SDSS 31
  139. #define LED_PIN -1
  140. /**
  141. * LCD / Controller
  142. *
  143. * Only the following displays are supported:
  144. * ZONESTAR_LCD
  145. * ANET_FULL_GRAPHICS_LCD(_ALT_WIRING)?
  146. * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  147. */
  148. #if HAS_WIRED_LCD
  149. #define LCD_SDSS 28
  150. #if HAS_ADC_BUTTONS
  151. #define SERVO0_PIN 27 // free for BLTouch/3D-Touch
  152. #define LCD_PINS_RS 28
  153. #define LCD_PINS_ENABLE 29
  154. #define LCD_PINS_D4 10
  155. #define LCD_PINS_D5 11
  156. #define LCD_PINS_D6 16
  157. #define LCD_PINS_D7 17
  158. #define ADC_KEYPAD_PIN 1
  159. #elif IS_RRD_FG_SC
  160. // Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
  161. // display using an adapter board // https://go.aisler.net/benlye/anet-lcd-adapter/pcb
  162. // See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748
  163. #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
  164. #define SERVO0_PIN 30
  165. #define BEEPER_PIN 27
  166. #define LCD_PINS_RS 29
  167. #define LCD_PINS_ENABLE 16
  168. #define LCD_PINS_D4 11
  169. #define BTN_EN1 28
  170. #define BTN_EN2 10
  171. #define BTN_ENC 17
  172. #define BOARD_ST7920_DELAY_1 250
  173. #define BOARD_ST7920_DELAY_2 250
  174. #define BOARD_ST7920_DELAY_3 250
  175. #else
  176. #define SERVO0_PIN 29 // free for BLTouch/3D-Touch
  177. #define BEEPER_PIN 17
  178. #define LCD_PINS_RS 27
  179. #define LCD_PINS_ENABLE 28
  180. #define LCD_PINS_D4 30
  181. #define BTN_EN1 11
  182. #define BTN_EN2 10
  183. #define BTN_ENC 16
  184. #define BOARD_ST7920_DELAY_1 125
  185. #define BOARD_ST7920_DELAY_2 63
  186. #define BOARD_ST7920_DELAY_3 125
  187. #endif
  188. #endif
  189. #else
  190. #define SERVO0_PIN 27
  191. #endif
  192. #ifndef FIL_RUNOUT_PIN
  193. #define FIL_RUNOUT_PIN SERVO0_PIN
  194. #endif
  195. /**
  196. * ====================================================================
  197. * =============== Alternative RepRapDiscount Wiring ==================
  198. * ====================================================================
  199. *
  200. * An alternative wiring scheme for the RepRapDiscount Full Graphics Display is
  201. * published by oderwat on Thingiverse at https://www.thingiverse.com/thing:2103748.
  202. *
  203. * Using that adapter requires changing the pin definition as follows:
  204. * #define SERVO0_PIN 27 // free for BLTouch/3D-Touch
  205. * #define BEEPER_PIN 28
  206. * #define LCD_PINS_RS 30
  207. * #define LCD_PINS_ENABLE 29
  208. * #define LCD_PINS_D4 17
  209. *
  210. * The BLTouch pin becomes LCD:3
  211. */
  212. /**
  213. * ====================================================================
  214. * ===================== LCD PINOUTS ==================================
  215. * ====================================================================
  216. *
  217. * Anet V1.0 controller | ZONESTAR_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring
  218. * physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse
  219. * pin pin functions | | | | .com/thing:2103748
  220. *------------------------------------------------------------------------------------------------------------------------
  221. * ANET-J3.1 8 *** | N/A | J3_TX *** | |
  222. * ANET-J3.2 9 *** | N/A | J3_RX *** | |
  223. * ANET-J3.3 6 MISO | N/A | MISO *** | EXP2.1 MISO | EXP2.1 MISO
  224. * ANET-J3.4 +5V | N/A | +5V | |
  225. * ANET-J3.5 7 SCK | N/A | SCK *** | EXP2.2 SCK | EXP2.2 SCK
  226. * ANET-J3.6 5 MOSI | N/A | MOSI *** | EXP2.6 MOSI | EXP2.6 MOSI
  227. * ANET-J3.7 !RESET | N/A | button | EXP2.8 panel button | EXP2.8 panel button
  228. * ANET-J3.8 GND | N/A | GND | EXP2.9 GND | EXP2.9 GND
  229. * ANET-J3.9 4 Don't use | N/A | N/C | |
  230. * ANET-J3.10 +3.3V | N/A | +3.3V *** | |
  231. * | | | |
  232. * | | | |
  233. * ANET-LCD.1 GND | GND | GND | EXP1.9 GND | EXP1.9 GND
  234. * ANET-LCD.2 +5V | +5V | +5V | EXP1.10 +5V | EXP1.10 +5V
  235. * ANET-LCD.3 27 A4 | N/C * | LCD_PINS_RS | EXP1.4 LCD_PINS_RS | EXP2.4 SDSS or N/C *
  236. * ANET-LCD.4 10 | LCD_PINS_D4 | BTN_EN2 | EXP2.3 BTN_EN2 | EXP2.3 BTN_EN2
  237. * ANET-LCD.5 28 A3 | LCD_PINS_RS | LCD_PINS_ENABLE | EXP1.3 LCD_PINS_ENABLE | EXP1.1 BEEPER_PIN
  238. * ANET-LCD.6 11 | LCD_PINS_D5 | BTN_EN1 | EXP2.5 BTN_EN1 | EXP2.5 BTN_EN1
  239. * ANET-LCD.7 29 A2 | LCD_PINS_ENABLE | N/C * | EXP2.4 SDSS or N/C * | EXP1.3 LCD_PINS_ENABLE
  240. * ANET-LCD.8 16 SCL | LCD_PINS_D6 | BTN_ENC | EXP1.2 BTN_ENC | EXP1.2 BTN_ENC
  241. * ANET-LCD.9 30 A1 | ADC_KEYPAD_PIN ** | LCD_PINS_D4 | EXP1.5 LCD_PINS_D4 | EXP1.4 LCD_PINS_RS
  242. * ANET-LCD.10 17 SDA | LCD_PINS_D7 | BEEPER_PIN | EXP1.1 BEEPER_PIN | EXP1.5 LCD_PINS_D4
  243. *
  244. * N/C * - if not connected to the LCD can be used for BLTouch servo input
  245. * ** - analog pin -WITHOUT a pullup
  246. * *** - only connected to something if the Bluetooth module is populated
  247. */
  248. /**
  249. * REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  250. * physical pin function
  251. * EXP1.1 BEEPER
  252. * EXP1.2 BTN_ENC
  253. * EXP1.3 LCD_PINS_ENABLE
  254. * EXP1.4 LCD_PINS_RS
  255. * EXP1.5 LCD_PINS_D4
  256. * EXP1.6 LCD_PINS_D5 (not used)
  257. * EXP1.7 LCD_PINS_D6 (not used)
  258. * EXP1.8 LCD_PINS_D7 (not used)
  259. * EXP1.9 GND
  260. * EXP1.10 VCC
  261. *
  262. *
  263. * EXP2.1 MISO
  264. * EXP2.2 SCK
  265. * EXP2.3 BTN_EN2
  266. * EXP2.4 SDSS
  267. * EXP2.5 BTN_EN1
  268. * EXP2.6 MOSI
  269. * EXP2.7 SD_DETECT_PIN
  270. * EXP2.8 button
  271. * EXP2.9 GND
  272. * EXP2.10 NC
  273. */