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_MELZI_CREALITY.h 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. * Melzi (Creality) pin assignments
  25. *
  26. * The Creality board needs a bootloader installed before Marlin can be uploaded.
  27. * If you don't have a chip programmer you can use a spare Arduino plus a few
  28. * electronic components to write the bootloader.
  29. *
  30. * See https://www.instructables.com/id/Burn-Arduino-Bootloader-with-Arduino-MEGA/
  31. *
  32. * Schematic: https://bit.ly/2XOnsWb
  33. */
  34. #define BOARD_INFO_NAME "Melzi (Creality)"
  35. // Alter timing for graphical display
  36. #if IS_U8GLIB_ST7920
  37. #define BOARD_ST7920_DELAY_1 125
  38. #define BOARD_ST7920_DELAY_2 125
  39. #define BOARD_ST7920_DELAY_3 125
  40. #endif
  41. #include "pins_MELZI.h"
  42. //
  43. // For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h
  44. //
  45. #undef LCD_SDSS
  46. #undef LED_PIN
  47. #undef LCD_PINS_RS
  48. #undef LCD_PINS_ENABLE
  49. #undef LCD_PINS_D4
  50. #undef LCD_PINS_D5
  51. #undef LCD_PINS_D6
  52. #undef LCD_PINS_D7
  53. #define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi)
  54. #define LCD_PINS_RS 28 // ST9720 CS
  55. #define LCD_PINS_ENABLE 17 // ST9720 DAT
  56. #define LCD_PINS_D4 30 // ST9720 CLK
  57. #if ENABLED(BLTOUCH)
  58. #ifndef SERVO0_PIN
  59. #define SERVO0_PIN 27
  60. #endif
  61. #if SERVO0_PIN == BEEPER_PIN
  62. #undef BEEPER_PIN
  63. #endif
  64. #elif ENABLED(FILAMENT_RUNOUT_SENSOR)
  65. #ifndef FIL_RUNOUT_PIN
  66. #define FIL_RUNOUT_PIN 27
  67. #endif
  68. #if FIL_RUNOUT_PIN == BEEPER_PIN
  69. #undef BEEPER_PIN
  70. #endif
  71. #endif
  72. #if ENABLED(MINIPANEL)
  73. #undef DOGLCD_CS
  74. #define DOGLCD_CS LCD_PINS_RS
  75. #endif
  76. /**
  77. PIN: 0 Port: B0 E0_DIR_PIN protected
  78. PIN: 1 Port: B1 E0_STEP_PIN protected
  79. PIN: 2 Port: B2 Z_DIR_PIN protected
  80. PIN: 3 Port: B3 Z_STEP_PIN protected
  81. PIN: 4 Port: B4 AVR_SS_PIN protected
  82. . FAN_PIN protected
  83. . SD_SS_PIN protected
  84. PIN: 5 Port: B5 AVR_MOSI_PIN Output = 1
  85. . SD_MOSI_PIN Output = 1
  86. PIN: 6 Port: B6 AVR_MISO_PIN Input = 0 TIMER3A PWM: 0 WGM: 1 COM3A: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0
  87. . SD_MISO_PIN Input = 0
  88. PIN: 7 Port: B7 AVR_SCK_PIN Output = 0 TIMER3B PWM: 0 WGM: 1 COM3B: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0
  89. . SD_SCK_PIN Output = 0
  90. PIN: 8 Port: D0 RXD Input = 1
  91. PIN: 9 Port: D1 TXD Input = 0
  92. PIN: 10 Port: D2 BTN_EN2 Input = 1
  93. PIN: 11 Port: D3 BTN_EN1 Input = 1
  94. PIN: 12 Port: D4 HEATER_BED_PIN protected
  95. PIN: 13 Port: D5 HEATER_0_PIN protected
  96. PIN: 14 Port: D6 E0_ENABLE_PIN protected
  97. . X_ENABLE_PIN protected
  98. . Y_ENABLE_PIN protected
  99. PIN: 15 Port: D7 X_STEP_PIN protected
  100. PIN: 16 Port: C0 BTN_ENC Input = 1
  101. . SCL Input = 1
  102. PIN: 17 Port: C1 LCD_PINS_ENABLE Output = 0
  103. . SDA Output = 0
  104. PIN: 18 Port: C2 X_MIN_PIN protected
  105. . X_STOP_PIN protected
  106. PIN: 19 Port: C3 Y_MIN_PIN protected
  107. . Y_STOP_PIN protected
  108. PIN: 20 Port: C4 Z_MIN_PIN protected
  109. . Z_STOP_PIN protected
  110. PIN: 21 Port: C5 X_DIR_PIN protected
  111. PIN: 22 Port: C6 Y_STEP_PIN protected
  112. PIN: 23 Port: C7 Y_DIR_PIN protected
  113. PIN: 24 Port: A7 TEMP_0_PIN protected
  114. PIN: 25 Port: A6 TEMP_BED_PIN protected
  115. PIN: 26 Port: A5 Z_ENABLE_PIN protected
  116. PIN: 27 Port: A4 BEEPER_PIN Output = 0
  117. PIN: 28 Port: A3 LCD_PINS_RS Output = 0
  118. PIN: 29 Port: A2 <unused/unknown> Input = 0
  119. PIN: 30 Port: A1 LCD_PINS_D4 Output = 1
  120. PIN: 31 Port: A0 SDSS Output = 1
  121. */
  122. /**
  123. * EXP1 Connector EXP1 as CR10 STOCKDISPLAY
  124. * ------ ------
  125. * PA4 |10 9 | PC0 BEEPER_PIN |10 9 | BTN_ENC
  126. * PD3 | 8 7 | RESET BTN_EN1 | 8 7 | RESET
  127. * PD2 6 5 | PA1 BTN_EN2 6 5 | LCD_PINS_D4 (ST9720 CLK)
  128. * PA3 | 4 3 | PC1 (ST9720 CS) LCD_PINS_RS | 4 3 | LCD_PINS_ENABLE (ST9720 DAT)
  129. * GND | 2 1 | 5V GND | 2 1 | 5V
  130. * ------ ------
  131. */