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_LERDGE_S.h 8.2KB

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_STM32DUINO
  24. #include "env_validate.h"
  25. #if HOTENDS > 2 || E_STEPPERS > 2
  26. #error "LERDGE S supports up to 2 hotends / E steppers."
  27. #endif
  28. #define BOARD_INFO_NAME "Lerdge S"
  29. #define DEFAULT_MACHINE_NAME "LERDGE"
  30. #define STEP_TIMER 4
  31. #define TEMP_TIMER 2
  32. #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support
  33. //
  34. // Servos
  35. //
  36. #define SERVO0_PIN PD12
  37. //#define SERVO1_PIN -1
  38. //
  39. // Limit Switches
  40. //
  41. #define X_MIN_PIN PG9
  42. #define Y_MIN_PIN PG10
  43. #define Z_MIN_PIN PG11
  44. #define X_MAX_PIN PG12
  45. #define Y_MAX_PIN PG13
  46. #define Z_MAX_PIN PG14
  47. //
  48. // Filament runout
  49. //
  50. #define FIL_RUNOUT_PIN PC5
  51. //
  52. // Z Probe (when not Z_MIN_PIN)
  53. //
  54. #ifndef Z_MIN_PROBE_PIN
  55. #define Z_MIN_PROBE_PIN PG8
  56. #endif
  57. //
  58. // Steppers
  59. //
  60. #define X_STEP_PIN PF7
  61. #define X_DIR_PIN PF8
  62. #define X_ENABLE_PIN PF6
  63. #define Y_STEP_PIN PF10
  64. #define Y_DIR_PIN PF11
  65. #define Y_ENABLE_PIN PF9
  66. #define Z_STEP_PIN PF13
  67. #define Z_DIR_PIN PF14
  68. #define Z_ENABLE_PIN PF12
  69. #define E0_STEP_PIN PG0
  70. #define E0_DIR_PIN PG1
  71. #define E0_ENABLE_PIN PF15
  72. #define E1_STEP_PIN PG3
  73. #define E1_DIR_PIN PG4
  74. #define E1_ENABLE_PIN PG2
  75. //
  76. // Temperature Sensors
  77. //
  78. #define TEMP_0_PIN PC0 // See below for activation of thermistor readings
  79. #define TEMP_1_PIN PC1 // See below for activation of thermistor readings
  80. #define TEMP_BED_PIN PC3
  81. // Lergde-S can choose thermocouple/thermistor mode in software.
  82. // For use with thermistors, these pins must be OUT/LOW.
  83. // This is done automatically.
  84. #define TEMP_0_TR_ENABLE_PIN PF3
  85. #define TEMP_1_TR_ENABLE_PIN PF4
  86. // MAX6675 Cold-Junction-Compensated K-Thermocouple to Digital Converter (0°C to +1024°C)
  87. // https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
  88. #define TEMP_0_CS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong
  89. #define TEMP_0_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested
  90. #define TEMP_0_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested
  91. // Expansion board with second max6675
  92. // Warning: Some boards leave the slot unpopulated.
  93. //#define TEMP_1_CS_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested
  94. //#define TEMP_1_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested
  95. //#define TEMP_1_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested
  96. //
  97. // Heaters / Fans
  98. //
  99. #define HEATER_0_PIN PA0
  100. #define HEATER_1_PIN PA1
  101. #define HEATER_BED_PIN PA3
  102. #define FAN_PIN PA15 // heater 0 fan 1
  103. #define FAN1_PIN PB10 // heater 1 fan 2
  104. #define FAN2_PIN PF5 // heater 0 fan 2 and heater 1 fan 1 (two sockets, switched together)
  105. #ifndef E0_AUTO_FAN_PIN
  106. #define E0_AUTO_FAN_PIN PF5
  107. #endif
  108. //
  109. // Průša i3 MK2 Multi Material Multiplexer Support
  110. //
  111. #if HAS_PRUSA_MMU1
  112. //#define E_MUX0_PIN -1
  113. //#define E_MUX1_PIN -1
  114. #endif
  115. //
  116. // LED / Lighting
  117. //
  118. //Lerdge-S board has two LED connectors (this is the one on the mainboard)
  119. #define CASE_LIGHT_PIN PC7
  120. //on the dual extrusion addon board is a RGB connector
  121. #define RGB_LED_R_PIN PC7 // Shared with the mainboard LED light connector (CASE_LIGHT_PIN)
  122. #define RGB_LED_G_PIN PB0
  123. #define RGB_LED_B_PIN PB1
  124. //
  125. // Misc. Functions
  126. //
  127. #define LED_PIN PC6 // Mainboard soldered green LED
  128. #define PS_ON_PIN PB2 // Board has a power module connector
  129. #define KILL_PIN -1 // There is no reset button on the LCD
  130. #define POWER_LOSS_PIN -1 // PB2 could be used for this as well
  131. //
  132. // SD support
  133. //
  134. #define SDIO_SUPPORT
  135. #define SDIO_CLOCK 4800000
  136. #define SD_DETECT_PIN PG15
  137. #if DISABLED(SDIO_SUPPORT)
  138. #define SOFTWARE_SPI
  139. #define SD_SCK_PIN PC12
  140. #define SD_MISO_PIN PC8
  141. #define SD_MOSI_PIN PD2
  142. #define SD_SS_PIN PC11
  143. #define SDSS PC11
  144. #endif
  145. //
  146. // Persistent Storage
  147. // If no option is selected below the SD Card will be used
  148. // Prefer the I2C option (F-RAM) to store Marlin settings, SPI option is not working yet
  149. //#define SPI_EEPROM
  150. //#define I2C_EEPROM
  151. #if ENABLED(SPI_EEPROM) // SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf
  152. #define SPI_CHAN_EEPROM1 1
  153. #define SPI_EEPROM1_CS_PIN PB12 // datasheet: /CS pin, found with multimeter, not tested
  154. #define EEPROM_SCK_PIN PB13 // datasheet: CLK pin, found with multimeter, not tested
  155. #define EEPROM_MISO_PIN PB14 // datasheet: DO pin, found with multimeter, not tested
  156. #define EEPROM_MOSI_PIN PB15 // datasheet: DI pin, found with multimeter, not tested
  157. #define EEPROM_PAGE_SIZE 0x1000U // 4K (from datasheet)
  158. #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64K for now...
  159. #elif ENABLED(I2C_EEPROM) // FM24CL64BG (CYP1813) 64Kbit F-RAM
  160. #define SOFT_I2C_EEPROM // Force the use of Software I2C
  161. #define I2C_SDA_PIN PG13
  162. #define I2C_SCL_PIN PG14 // To be confirmed on the Lerdge S, but probably same as the K
  163. #define MARLIN_EEPROM_SIZE 0x2000U // 8K
  164. #else
  165. #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2K, require this amount of RAM
  166. #endif
  167. //
  168. // TFT with FSMC interface
  169. //
  170. #if HAS_FSMC_TFT
  171. #ifndef TFT_DRIVER
  172. #define TFT_DRIVER ST7796
  173. #endif
  174. #define ST7796S_INVERTED
  175. #define TFT_RESET_PIN PD6
  176. #define TFT_BACKLIGHT_PIN PD3
  177. #define FSMC_CS_PIN PD7
  178. #define FSMC_RS_PIN PD11
  179. #define TFT_CS_PIN FSMC_CS_PIN
  180. #define TFT_RS_PIN FSMC_RS_PIN
  181. #define TOUCH_CS_PIN PB6
  182. #define TOUCH_SCK_PIN PB3
  183. #define TOUCH_MOSI_PIN PB5
  184. #define TOUCH_MISO_PIN PB4
  185. #endif
  186. #if IS_NEWPANEL
  187. #define BEEPER_PIN PD13
  188. #define BTN_EN1 PC15
  189. #define BTN_EN2 PC14
  190. #define BTN_ENC PC13
  191. #ifndef ENCODER_STEPS_PER_MENU_ITEM
  192. #define ENCODER_STEPS_PER_MENU_ITEM 2
  193. #endif
  194. #endif