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.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #pragma once
  20. #if !defined(STM32F4) && !defined(STM32F4xx)
  21. #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
  22. #elif HOTENDS > 2 || E_STEPPERS > 2
  23. #error "LERDGE S supports up to 2 hotends / E-steppers."
  24. #endif
  25. #define BOARD_INFO_NAME "Lerdge S"
  26. #define DEFAULT_MACHINE_NAME "LERDGE"
  27. #define STEP_TIMER 4
  28. #define TEMP_TIMER 2
  29. //#define I2C_EEPROM
  30. //
  31. // Servos
  32. //
  33. #define SERVO0_PIN PD12 //confirmed
  34. //#define SERVO1_PIN -1
  35. //
  36. // Limit Switches
  37. //
  38. #define X_MIN_PIN PG9 //confirmed
  39. #define Y_MIN_PIN PG10 //confirmed
  40. #define Z_MIN_PIN PG11 //confirmed
  41. #define X_MAX_PIN PG12 //confirmed
  42. #define Y_MAX_PIN PG13 //confirmed
  43. #define Z_MAX_PIN PG14 //confirmed
  44. //
  45. // Filament runout
  46. //
  47. #define FIL_RUNOUT_PIN PC5 //confirmed
  48. //
  49. // Z Probe (when not Z_MIN_PIN)
  50. //
  51. #ifndef Z_MIN_PROBE_PIN
  52. #define Z_MIN_PROBE_PIN PG8 //confirmed
  53. #endif
  54. //
  55. // Steppers
  56. //
  57. #define X_STEP_PIN PF7 //confirmed
  58. #define X_DIR_PIN PF8 //confirmed
  59. #define X_ENABLE_PIN PF6 //confirmed
  60. #define Y_STEP_PIN PF10 //confirmed
  61. #define Y_DIR_PIN PF11 //confirmed
  62. #define Y_ENABLE_PIN PF9 //confirmed
  63. #define Z_STEP_PIN PF13 //confirmed
  64. #define Z_DIR_PIN PF14 //confirmed
  65. #define Z_ENABLE_PIN PF12 //confirmed
  66. #define E0_STEP_PIN PG0 //confirmed
  67. #define E0_DIR_PIN PG1 //confirmed
  68. #define E0_ENABLE_PIN PF15 //confirmed
  69. #define E1_STEP_PIN PG3 //confirmed
  70. #define E1_DIR_PIN PG4 //confirmed
  71. #define E1_ENABLE_PIN PG2 //confirmed
  72. //
  73. // Temperature Sensors
  74. //
  75. #define TEMP_0_PIN PC0 // See below for activation of thermistor readings
  76. #define TEMP_1_PIN PC1 // See below for activation of thermistor readings
  77. #define TEMP_BED_PIN PC3 //confirmed
  78. // Lergde-S can choose thermocouple/thermistor mode in software.
  79. // For use with thermistors, these pins must be OUT/LOW.
  80. // This is done automatically.
  81. #define TEMP_0_TR_ENABLE_PIN PF3
  82. #define TEMP_1_TR_ENABLE_PIN PF4
  83. // MAX6675 Cold-Junction-Compensated K-Thermocouple to Digital Converter (0°C to +1024°C)
  84. // https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
  85. #define MAX6675_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested
  86. #define MAX6675_DO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested
  87. #define MAX6675_SS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong
  88. // Expansion board with second max6675
  89. // Warning: Some boards leave the slot unpopulated.
  90. //#define MAX6675_SCK2_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested
  91. //#define MAX6675_DO2_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested
  92. //#define MAX6675_SS2_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested
  93. //
  94. // Heaters / Fans
  95. //
  96. #define HEATER_0_PIN PA0 //confirmed
  97. #define HEATER_1_PIN PA1 //confirmed
  98. #define HEATER_BED_PIN PA3 //confirmed
  99. #define FAN_PIN PA15 // heater 0 fan 1 //confirmed
  100. #define FAN1_PIN PB10 // heater 1 fan 2 //confirmed
  101. #define FAN2_PIN PF5 // heater 0 fan 2 and heater 1 fan 1 (two sockets, switched together) //confirmed
  102. #ifndef E0_AUTO_FAN_PIN
  103. #define E0_AUTO_FAN_PIN PF5
  104. #endif
  105. //
  106. // Prusa i3 MK2 Multi Material Multiplexer Support
  107. //
  108. //#define E_MUX0_PIN -1
  109. //#define E_MUX1_PIN -1
  110. //
  111. // LED / Lighting
  112. //
  113. //Lerdge-S board has two LED connectors (this is the one on the mainboard)
  114. #define CASE_LIGHT_PIN PC7 //confirmed
  115. //on the dual extrusion addon board is a RGB connector
  116. #define RGB_LED_R_PIN PC7 // Shared with the mainboard LED light connector (CASE_LIGHT_PIN), confirmed
  117. #define RGB_LED_G_PIN PB0 //confirmed
  118. #define RGB_LED_B_PIN PB1 //confirmed
  119. //
  120. // Misc. Functions
  121. //
  122. #define SDSS PC11 // SD is working using SDIO, not sure if this definition is needed?
  123. #define LED_PIN PC6 // Mainboard soldered green LED, confirmed
  124. #define PS_ON_PIN PB2 // Board has a power module connector, confirmed
  125. #define KILL_PIN -1 // There is no reset button on the LCD
  126. #define POWER_LOSS_PIN -1 // PB2 could be used for this as well
  127. //
  128. // SD support
  129. //
  130. #define SDIO_SUPPORT
  131. #define SCK_PIN PC12 //confirmed working
  132. #define MISO_PIN PC8 //confirmed working
  133. #define MOSI_PIN PD2 //confirmed working
  134. #define SS_PIN PC11 //confirmed working
  135. #define SD_DETECT_PIN PG15 //confirmed
  136. //
  137. // Persistent Storage
  138. // If no option is selected below the SD Card will be used
  139. // (this section modelled after pins_LONGER3D_LK.h)
  140. // Warning: Not tested yet! Pins traced with multimeter, mistakes are possible
  141. //#define SPI_EEPROM
  142. #if ENABLED(SPI_EEPROM)
  143. // Lerdge has an SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf
  144. #define SPI_CHAN_EEPROM1 1
  145. #define SPI_EEPROM1_CS PB12 // datasheet: /CS pin, found with multimeter, not tested
  146. #define EEPROM_SCK PB13 // datasheet: CLK pin, found with multimeter, not tested
  147. #define EEPROM_MISO PB14 // datasheet: DO pin, found with multimeter, not tested
  148. #define EEPROM_MOSI PB15 // datasheet: DI pin, found with multimeter, not tested
  149. #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
  150. #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now...
  151. #else
  152. #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM
  153. #endif
  154. //
  155. // LCD / Controller
  156. //
  157. // The LCD is initialized in FSMC mode
  158. #define BEEPER_PIN PD13 //confirmed
  159. #define BTN_EN1 PC14 //confirmed
  160. #define BTN_EN2 PC15 //confirmed
  161. #define BTN_ENC PC13 //confirmed
  162. #define TFT_RESET_PIN PD6 //confirmed
  163. #define TFT_BACKLIGHT_PIN PD3 //confirmed
  164. #define TFT_CS_PIN PD7 // TFT works
  165. #define TFT_RS_PIN PD11 // TFT works
  166. // There is touch, but calibration is off
  167. #define TOUCH_CS_PIN PB6
  168. #define TOUCH_SCK_PIN PB3
  169. #define TOUCH_MOSI_PIN PB5
  170. #define TOUCH_MISO_PIN PB4