Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

config_pins.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. #ifndef _CONFIG_PINS_H_
  2. #define _CONFIG_PINS_H_
  3. // from https://reprap.org/wiki/RAMPS_1.4
  4. // For RAMPS 1.4
  5. #define X_STEP_PIN 54
  6. #define X_DIR_PIN 55
  7. #define X_ENABLE_PIN 38
  8. #define X_MIN_PIN 3
  9. #define X_MAX_PIN -1 // 2
  10. #define Y_STEP_PIN 60
  11. #define Y_DIR_PIN 61
  12. #define Y_ENABLE_PIN 56
  13. #define Y_MIN_PIN 14
  14. #define Y_MAX_PIN -1 // 15
  15. #define Z_STEP_PIN 46
  16. #define Z_DIR_PIN 48
  17. #define Z_ENABLE_PIN 62
  18. #define Z_MIN_PIN -1 // 18
  19. #define Z_MAX_PIN 19
  20. //extruder 1
  21. #define E0_STEP_PIN 26
  22. #define E0_DIR_PIN 28
  23. #define E0_ENABLE_PIN 24
  24. // use the remaining z endstop pin for e axis
  25. #define E_MIN_PIN 18
  26. #define E_MAX_PIN -1
  27. //extruder 2
  28. #define E1_STEP_PIN 36
  29. #define E1_DIR_PIN 34
  30. #define E1_ENABLE_PIN 30
  31. //ChipSelect, Hardware SS Pin on Mega, 10 for Arduino Boards, always kept as output
  32. #define SDCS_PIN 53
  33. #define LED_PIN 13
  34. #define FAN_PIN 8
  35. #define PS_ON_PIN 12 //ATX , awake=LOW, SLEEP=High
  36. #define HEATER_0_PIN 10 // Extruder Heater
  37. #define HEATER_1_PIN 9
  38. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  39. #define TEMP_1_PIN 14 // ANALOG NUMBERING
  40. #ifdef USE_20X4_TEXT_LCD
  41. // from https://reprap.org/wiki/RepRapDiscount_Smart_Controller
  42. //STOP / KILL button
  43. #define KILL_PIN 41 //[RAMPS14-SMART-ADAPTER]
  44. //lcd pins
  45. #define LCD_PINS_RS 16 //[RAMPS14-SMART-ADAPTER]
  46. #define LCD_PINS_ENABLE 17 //[RAMPS14-SMART-ADAPTER]
  47. #define LCD_PINS_D4 23 //[RAMPS14-SMART-ADAPTER]
  48. #define LCD_PINS_D5 25 //[RAMPS14-SMART-ADAPTER]
  49. #define LCD_PINS_D6 27 //[RAMPS14-SMART-ADAPTER]
  50. #define LCD_PINS_D7 29 //[RAMPS14-SMART-ADAPTER]
  51. //encoder pins
  52. #define BTN_EN1 31 //[RAMPS14-SMART-ADAPTER]
  53. #define BTN_EN2 33 //[RAMPS14-SMART-ADAPTER]
  54. #define BTN_ENC 35 //[RAMPS14-SMART-ADAPTER]
  55. //beeper
  56. #define BEEPER 37 //[RAMPS14-SMART-ADAPTER] / 37 = enabled; -1 = dissabled / (if you don't like the beep sound ;-)
  57. //SD card detect pin
  58. #define SDCARDDETECT 49 //[RAMPS14-SMART-ADAPTER]
  59. #endif // USE_20X4_TEXT_LCD
  60. #ifdef USE_FULL_GRAPHIC_LCD
  61. // based on https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
  62. // STOP / KILL button
  63. #define KILL_PIN 41
  64. // lcd pins
  65. #define LCD_PINS_CS 16
  66. #define LCD_PINS_MOSI 17
  67. #define LCD_PINS_SCK 23
  68. // encoder pins
  69. #define BTN_EN1 31
  70. #define BTN_EN2 33
  71. #define BTN_ENC 35
  72. // beeper
  73. #define BEEPER 37
  74. #endif // USE_FULL_GRAPHIC_LCD
  75. #endif // _CONFIG_PINS_H_
  76. #if ((X_MIN_PIN != -1) && (X_MAX_PIN != -1)) || ((X_MIN_PIN == -1) && (X_MAX_PIN == -1))
  77. #error define one of X_MIN_PIN or X_MAX_PIN
  78. #endif
  79. #if ((Y_MIN_PIN != -1) && (Y_MAX_PIN != -1)) || ((Y_MIN_PIN == -1) && (Y_MAX_PIN == -1))
  80. #error define one of Y_MIN_PIN or Y_MAX_PIN
  81. #endif
  82. #if ((Z_MIN_PIN != -1) && (Z_MAX_PIN != -1)) || ((Z_MIN_PIN == -1) && (Z_MAX_PIN == -1))
  83. #error define one of Z_MIN_PIN or Z_MAX_PIN
  84. #endif
  85. #if ((E_MIN_PIN != -1) && (E_MAX_PIN != -1)) || ((E_MIN_PIN == -1) && (E_MAX_PIN == -1))
  86. #error define one of E_MIN_PIN or E_MAX_PIN
  87. #endif
  88. #if (X_MIN_PIN == -1)
  89. #define X_HOMING_DIR 1
  90. #define X_ENDSTOP_PIN X_MAX_PIN
  91. #else
  92. #define X_HOMING_DIR -1
  93. #define X_ENDSTOP_PIN X_MIN_PIN
  94. #endif
  95. #if (Y_MIN_PIN == -1)
  96. #define Y_HOMING_DIR 1
  97. #define Y_ENDSTOP_PIN Y_MAX_PIN
  98. #else
  99. #define Y_HOMING_DIR -1
  100. #define Y_ENDSTOP_PIN Y_MIN_PIN
  101. #endif
  102. #if (Z_MIN_PIN == -1)
  103. #define Z_HOMING_DIR 1
  104. #define Z_ENDSTOP_PIN Z_MAX_PIN
  105. #else
  106. #define Z_HOMING_DIR -1
  107. #define Z_ENDSTOP_PIN Z_MIN_PIN
  108. #endif
  109. #if (E_MIN_PIN == -1)
  110. #define E_HOMING_DIR 1
  111. #define E_ENDSTOP_PIN E_MAX_PIN
  112. #else
  113. #define E_HOMING_DIR -1
  114. #define E_ENDSTOP_PIN E_MIN_PIN
  115. #endif
  116. #ifdef KILL_PIN
  117. #if (KILL_PIN == -1)
  118. #undef KILL_PIN
  119. #endif
  120. #endif // KILL_PIN