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_TEENSYLU.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. /**
  23. * rev B 30 DEC 2016
  24. *
  25. * The original version of this file did NOT result in a useful program because:
  26. * 1. The pin numbers assumed that the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line
  27. * in FASTIO.h was commented out. There wasn't an Arduino IDE 1.6.x extension/package
  28. * that supported this pin map so the latest Marlin wouldn't compile.
  29. * 2. The silkscreen for the four end stops don't agree with the schematic. Activating
  30. * the X endstop would tell the software that the Y endstop just went active.
  31. * 3. The thermistor inputs also had heater names assigned to them. The result was
  32. * thermistor inputs that were set to digital outputs.
  33. *
  34. * Rev B corrects the above problems by:
  35. * 1. The "Marlin_AT90USB" extension/package was developed. This extension enables the
  36. * latest Marlin software to compile using Arduino IDE 1.6.x and 1.80.
  37. * 2. The endstop pin numbers in this file were changed to match the silkscreen. This
  38. * makes it a little confusing when trying to correlate the schematic with the pin
  39. * numbers used in this file.
  40. * 3. The offending heater names were deleted.
  41. *
  42. * To create a useable image for Teensylu do the following:
  43. * a) Install the Marlin_AT90USB extension with either of the following methods:
  44. * Automatic - paste this URL into preferences and then use Boards manager
  45. * https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
  46. * Manual:
  47. * 1. Copy the following URL into Go to "https://github.com/Bob-the-Kuhn/Marlin_AT90USB",
  48. * click on the "Clone or Download" button and then click on "Download ZIP" button.
  49. * 2. Unzip the file, find the "Marlin_AT90USB" directory and then copy it to the
  50. * hardware directory in Arduino. The Arduino hardware directory will probably be
  51. * located in a path similar to this: C:\Program Files (x86)\Arduino\hardware
  52. * b) Connect the USBtinyISP to the board.
  53. * c) In the Arduino IDE select the "AT90USB1286_STANDARD" board in the of the "Marlin_AT90USB"
  54. * section and select the "USBtinyISP" programmer.
  55. * d) In the Arduino IDE click on "burn bootloader". Don't worry about the "verify
  56. * failed at 1F000" error message.
  57. * e) The USBtinyISP programmer is no longer needed. Remove it.
  58. * f) In FASTIO.h comment out the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line.
  59. * g) To upload a sketch do the following:
  60. * 1. remove the jumper
  61. * 2. press reset
  62. * 3. click on the "upload" button in the Arduino IDE
  63. * 4. wait until the upload finishes (less than a minute)
  64. * 5. put the jumper back on
  65. * 6. press the reset button
  66. *
  67. *
  68. * NOTE - the "Marlin_AT90USB" pin maps make PWM0A available rather than the usual PWM1C.
  69. * These PWMs share the same physical pin. Marlin uses TIMER1 to generate
  70. * interrupts and sets it up such that PWM1A, PWM1B & PWM1C can't be used.
  71. */
  72. /**
  73. * SILKSCREEN ERROR
  74. *
  75. * The silkscreen for the endstops do NOT match the schematic. The silkscreen SHOULD
  76. * read (from left to right) X-STOP, Y-STOP, Z-STOP & E-STOP. The silkscreen actually
  77. * reads E-STOP, X-STOP, Y-STOP & Z-STOP.
  78. *
  79. * The pin assignments in this file match the silkscreen.
  80. */
  81. #if !defined(__AVR_AT90USB1286__) && !defined(__AVR_AT90USB1286P__)
  82. #error "Oops! Make sure you have 'AT90USB1286_STANDARD' selected from the 'Tools -> Boards' menu."
  83. #endif
  84. #if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
  85. #error "please disable (comment out) the AT90USBxx_TEENSYPP_ASSIGNMENTS flag in FASTIO.h "
  86. #endif
  87. #define BOARD_NAME "Teensylu"
  88. #define USBCON 1286 // Disable MarlinSerial etc.
  89. #define LARGE_FLASH true
  90. //
  91. // Limit Switche definitions that match the SCHEMATIC
  92. //
  93. //#define X_STOP_PIN 13
  94. //#define Y_STOP_PIN 14
  95. //#define Z_STOP_PIN 15
  96. //#define E_STOP_PIN 36
  97. //
  98. // Limit Switch definitions that match the SILKSCREEN
  99. //
  100. #define X_STOP_PIN 14
  101. #define Y_STOP_PIN 15
  102. #define Z_STOP_PIN 36
  103. //#define E_STOP_PIN 13
  104. //
  105. // Steppers
  106. //
  107. #define X_STEP_PIN 0
  108. #define X_DIR_PIN 1
  109. #define X_ENABLE_PIN 39
  110. #define Y_STEP_PIN 2
  111. #define Y_DIR_PIN 3
  112. #define Y_ENABLE_PIN 38
  113. #define Z_STEP_PIN 4
  114. #define Z_DIR_PIN 5
  115. #define Z_ENABLE_PIN 23
  116. #define E0_STEP_PIN 6
  117. #define E0_DIR_PIN 7
  118. #define E0_ENABLE_PIN 19
  119. // Temperature Sensors
  120. #define TEMP_0_PIN 7 // Analog Input (Extruder)
  121. #define TEMP_BED_PIN 6 // Analog Input (Bed)
  122. //
  123. // Heaters / Fans
  124. //
  125. #define HEATER_0_PIN 21 // Extruder
  126. #define HEATER_BED_PIN 20
  127. #define FAN_PIN 22
  128. //
  129. // Misc. Functions
  130. //
  131. #define SDSS 8
  132. #define CASE_LIGHT_PIN 24
  133. //
  134. // LCD / Controller
  135. //
  136. #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
  137. #define BEEPER_PIN -1
  138. #if ENABLED(LCD_I2C_PANELOLU2)
  139. #define BTN_EN1 27
  140. #define BTN_EN2 26
  141. #define BTN_ENC 43
  142. #define SDSS 40 // use SD card on Panelolu2
  143. #endif // LCD_I2C_PANELOLU2
  144. #define SD_DETECT_PIN -1
  145. #endif // ULTRA_LCD && NEWPANEL
  146. //
  147. // M3/M4/M5 - Spindle/Laser Control
  148. //
  149. #define SPINDLE_LASER_PWM_PIN 12 // MUST BE HARDWARE PWM
  150. #define SPINDLE_LASER_ENABLE_PIN 41 // Pin should have a pullup!
  151. #define SPINDLE_DIR_PIN 42