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_FLY_MINI.h 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. #include "env_validate.h"
  24. #define BOARD_INFO_NAME "FLY_MINI"
  25. #define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-MINI"
  26. #define DISABLE_JTAG
  27. //
  28. // Flash EEPROM Emulation
  29. //
  30. #if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  31. #define FLASH_EEPROM_EMULATION
  32. #define EEPROM_PAGE_SIZE 0x800 // 2K
  33. #define EEPROM_START_ADDRESS (0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE) // 256K firmware space
  34. #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
  35. #endif
  36. //
  37. // Servos
  38. //
  39. #define SERVO0_PIN PA8
  40. //
  41. // Limit Switches
  42. //
  43. #define X_MIN_PIN PC12
  44. #define X_MAX_PIN PC11
  45. #define Y_MIN_PIN PC10
  46. #define Y_MAX_PIN PA15
  47. #define Z_MIN_PIN PA14
  48. #define Z_MAX_PIN PA13
  49. //
  50. // Steppers
  51. //
  52. #define X_STEP_PIN PB1
  53. #define X_DIR_PIN PB2
  54. #define X_ENABLE_PIN PB10
  55. #ifndef X_CS_PIN
  56. #define X_CS_PIN PB0
  57. #endif
  58. #define Y_STEP_PIN PA2
  59. #define Y_DIR_PIN PC4
  60. #define Y_ENABLE_PIN PC5
  61. #ifndef Y_CS_PIN
  62. #define Y_CS_PIN PA7
  63. #endif
  64. #define Z_STEP_PIN PA3
  65. #define Z_DIR_PIN PA5
  66. #define Z_ENABLE_PIN PA6
  67. #ifndef Z_CS_PIN
  68. #define Z_CS_PIN PA4
  69. #endif
  70. #define E0_STEP_PIN PA1
  71. #define E0_DIR_PIN PC3
  72. #define E0_ENABLE_PIN PA0
  73. #ifndef E0_CS_PIN
  74. #define E0_CS_PIN PC2
  75. #endif
  76. #if ENABLED(TMC_USE_SW_SPI)
  77. #ifndef TMC_SW_MOSI
  78. #define TMC_SW_MOSI EXP2_06_PIN
  79. #endif
  80. #ifndef TMC_SW_MISO
  81. #define TMC_SW_MISO EXP2_01_PIN
  82. #endif
  83. #ifndef TMC_SW_SCK
  84. #define TMC_SW_SCK EXP2_02_PIN
  85. #endif
  86. #endif
  87. #if HAS_TMC_UART
  88. #define X_SERIAL_TX_PIN PB0
  89. #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
  90. #define Y_SERIAL_TX_PIN PA7
  91. #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
  92. #define Z_SERIAL_TX_PIN PA4
  93. #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
  94. #define E0_SERIAL_TX_PIN PC2
  95. #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
  96. #endif
  97. //
  98. // Heaters / Fans
  99. //
  100. #define HEATER_0_PIN PC6
  101. #define HEATER_BED_PIN PC7
  102. #ifndef FAN_PIN
  103. #define FAN_PIN PC8
  104. #endif
  105. #define FAN1_PIN PC9
  106. //
  107. // Temperature Sensors
  108. //
  109. #define TEMP_BED_PIN PC0 // Analog Input
  110. #define TEMP_0_PIN PC1 // Analog Input
  111. /** ------ ------
  112. * (BEEPER) PC14 | 1 2 | PC13 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK)
  113. * (LCD_EN) PB9 | 3 4 | PB8 (LCD_RS) (BTN_EN1) PB3 | 3 4 | PB12 (SD_CS2)
  114. * (LCD_D4) PB7 5 6 | PB6 (LCD_D5) (BTN_EN2) PD2 5 6 | PB15 (SD_MOSI)
  115. * (LCD_D6) PB5 | 7 8 | PB4 (LCD_D7) (SD_DETECT) PB11 | 7 8 | RESET
  116. * GND | 9 10 | 5V GND | 9 10 | --
  117. * ------ ------
  118. * EXP1 EXP2
  119. */
  120. #define EXP1_01_PIN PC14
  121. #define EXP1_02_PIN PC13
  122. #define EXP1_03_PIN PB9
  123. #define EXP1_04_PIN PB8
  124. #define EXP1_05_PIN PB7
  125. #define EXP1_06_PIN PB6
  126. #define EXP1_07_PIN PB5
  127. #define EXP1_08_PIN PB4
  128. #define EXP2_01_PIN PB14
  129. #define EXP2_02_PIN PB13
  130. #define EXP2_03_PIN PB3
  131. #define EXP2_04_PIN PB12
  132. #define EXP2_05_PIN PD2
  133. #define EXP2_06_PIN PB15
  134. #define EXP2_07_PIN PB11
  135. #define EXP2_08_PIN -1 // RESET
  136. //
  137. // LCD / Controller
  138. //
  139. #if HAS_WIRED_LCD
  140. #define SPI_DEVICE 2
  141. #define SD_SS_PIN EXP2_04_PIN
  142. #define SD_SCK_PIN EXP2_02_PIN
  143. #define SD_MISO_PIN EXP2_01_PIN
  144. #define SD_MOSI_PIN EXP2_06_PIN
  145. #define SDSS SD_SS_PIN
  146. #define SD_DETECT_PIN EXP2_07_PIN
  147. #define BEEPER_PIN EXP1_01_PIN
  148. #define LCD_PINS_RS EXP1_04_PIN
  149. #define LCD_PINS_ENABLE EXP1_03_PIN
  150. #define LCD_PINS_D4 EXP1_05_PIN
  151. #define LCD_PINS_D5 EXP1_06_PIN
  152. #define LCD_PINS_D6 EXP1_07_PIN
  153. #define LCD_PINS_D7 EXP1_08_PIN
  154. #define BTN_EN1 EXP2_05_PIN
  155. #define BTN_EN2 EXP2_03_PIN
  156. #define BTN_ENC EXP1_02_PIN
  157. #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  158. #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
  159. #endif
  160. // Alter timing for graphical display
  161. #if IS_U8GLIB_ST7920
  162. #define BOARD_ST7920_DELAY_1 96
  163. #define BOARD_ST7920_DELAY_2 48
  164. #define BOARD_ST7920_DELAY_3 715
  165. #endif
  166. #endif // HAS_WIRED_LCD