/firmware/src/Motherboard/boards/mb24/Configuration.hh

http://github.com/makerbot/G3Firmware · C++ Header · 181 lines · 59 code · 33 blank · 89 comment · 0 complexity · 8b1c047cdb4e294051cd8c0376e3c371 MD5 · raw file

  1. /*
  2. * Copyright 2010 by Adam Mayer <adam@makerbot.com>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>
  16. */
  17. #ifndef BOARDS_MB24_CONFIGURATION_HH_
  18. #define BOARDS_MB24_CONFIGURATION_HH_
  19. /// This file details the pin assignments and features of the
  20. /// Makerbot Motherboard v2.x
  21. /// Interval for the stepper update in microseconds. This interval is the minimum
  22. /// possible time between steps; in practical terms, your time between steps should
  23. /// be at least eight times this large. Reducing the interval can cause resource
  24. /// starvation; leave this at 64uS or greater unless you know what you're doing.
  25. #define INTERVAL_IN_MICROSECONDS 64
  26. // --- Secure Digital Card configuration ---
  27. // NOTE: If SD support is enabled, it is implicitly assumed that the
  28. // following pins are connected:
  29. // AVR | SD header
  30. //---------|--------------
  31. // MISO | DATA_OUT
  32. // MOSI | DATA_IN
  33. // SCK | CLK
  34. // Define as 1 if and SD card slot is present; 0 if not.
  35. #define HAS_SD 1
  36. // The pin that connects to the write protect line on the SD header.
  37. #define SD_WRITE_PIN Pin(PortD,0)
  38. // The pin that connects to the card detect line on the SD header.
  39. #define SD_DETECT_PIN Pin(PortD,1)
  40. // The pin that connects to the chip select line on the SD header.
  41. #define SD_SELECT_PIN Pin(PortB,0)
  42. // --- Slave UART configuration ---
  43. // The slave UART is presumed to be an RS485 connection through a sn75176 chip.
  44. // Define as 1 if the slave UART is present; 0 if not.
  45. #define HAS_SLAVE_UART 1
  46. // The pin that connects to the driver enable line on the RS485 chip.
  47. #define TX_ENABLE_PIN Pin(PortC,5)
  48. // The pin that connects to the active-low recieve enable line on the RS485 chip.
  49. #define RX_ENABLE_PIN Pin(PortC,7)
  50. // --- Host UART configuration ---
  51. // The host UART is presumed to always be present on the RX/TX lines.
  52. // --- Piezo Buzzer configuration ---
  53. // Define as 1 if the piezo buzzer is present, 0 if not.
  54. #define HAS_BUZZER 1
  55. // The pin that drives the buzzer
  56. #define BUZZER_PIN Pin(PortC,6)
  57. // --- Emergency Stop configuration ---
  58. // Define as 1 if the estop is present, 0 if not.
  59. #define HAS_ESTOP 1
  60. // The pin connected to the emergency stop
  61. #define ESTOP_PIN Pin(PortE,4)
  62. // --- Axis configuration ---
  63. // Define the number of stepper axes supported by the board. The axes are
  64. // denoted by X, Y, Z, A and B.
  65. #define STEPPER_COUNT 5
  66. // --- Stepper and endstop configuration ---
  67. // Pins should be defined for each axis present on the board. They are denoted
  68. // X, Y, Z, A and B respectively.
  69. // This indicates the default interpretation of the endstop values.
  70. // If your endstops are based on the H21LOB, they are inverted;
  71. // if they are based on the H21LOI, they are not.
  72. #define DEFAULT_INVERTED_ENDSTOPS 1
  73. // The X stepper step pin (active on rising edge)
  74. #define X_STEP_PIN Pin(PortA,6)
  75. // The X direction pin (forward on logic high)
  76. #define X_DIR_PIN Pin(PortA,5)
  77. // The X stepper enable pin (active low)
  78. #define X_ENABLE_PIN Pin(PortA,4)
  79. // The X minimum endstop pin (active high)
  80. #define X_MIN_PIN Pin(PortB,6)
  81. // The X maximum endstop pin (active high)
  82. #define X_MAX_PIN Pin(PortB,5)
  83. // The Y stepper step pin (active on rising edge)
  84. #define Y_STEP_PIN Pin(PortA,3)
  85. // The Y direction pin (forward on logic high)
  86. #define Y_DIR_PIN Pin(PortA,2)
  87. // The Y stepper enable pin (active low)
  88. #define Y_ENABLE_PIN Pin(PortA,1)
  89. // The Y minimum endstop pin (active high)
  90. #define Y_MIN_PIN Pin(PortB,4)
  91. // The Y maximum endstop pin (active high)
  92. #define Y_MAX_PIN Pin(PortH,6)
  93. // The Z stepper step pin (active on rising edge)
  94. #define Z_STEP_PIN Pin(PortA,0)
  95. // The Z direction pin (forward on logic high)
  96. #define Z_DIR_PIN Pin(PortH,0)
  97. // The Z stepper enable pin (active low)
  98. #define Z_ENABLE_PIN Pin(PortH,1)
  99. // The Z minimum endstop pin (active high)
  100. #define Z_MIN_PIN Pin(PortH,5)
  101. // The Z maximum endstop pin (active high)
  102. #define Z_MAX_PIN Pin(PortH,4)
  103. // The A stepper step pin (active on rising edge)
  104. #define A_STEP_PIN Pin(PortJ,0)
  105. // The A direction pin (forward on logic high)
  106. #define A_DIR_PIN Pin(PortJ,1)
  107. // The A stepper enable pin (active low)
  108. #define A_ENABLE_PIN Pin(PortE,5)
  109. // The B stepper step pin (active on rising edge)
  110. #define B_STEP_PIN Pin(PortG,5)
  111. // The B direction pin (forward on logic high)
  112. #define B_DIR_PIN Pin(PortE,3)
  113. // The B stepper enable pin (active low)
  114. #define B_ENABLE_PIN Pin(PortH,3)
  115. // --- Debugging configuration ---
  116. // The pin which controls the debug LED (active high)
  117. #define DEBUG_PIN Pin(PortB,7)
  118. // By default, debugging packets should be honored; this is made
  119. // configurable if we're short on cycles or EEPROM.
  120. // Define as 1 if debugging packets are honored; 0 if not.
  121. #define HONOR_DEBUG_PACKETS 1
  122. #define HAS_INTERFACE_BOARD 1
  123. /// Pin mappings for the LCD connection.
  124. #define LCD_RS_PIN Pin(PortC,4)
  125. #define LCD_ENABLE_PIN Pin(PortC,3)
  126. #define LCD_D0_PIN Pin(PortD,7)
  127. #define LCD_D1_PIN Pin(PortG,2)
  128. #define LCD_D2_PIN Pin(PortG,1)
  129. #define LCD_D3_PIN Pin(PortG,0)
  130. /// This is the pin mapping for the interface board. Because of the relatively
  131. /// high cost of using the pins in a direct manner, we will instead read the
  132. /// buttons directly by scanning their ports. If any of these definitions are
  133. /// modified, the #scanButtons() function _must_ be updated to reflect this.
  134. ///
  135. /// TLDR: These are here for decoration only, actual pins defined in #scanButtons()
  136. #define INTERFACE_X+_PIN Pin(PortL,7)
  137. #define INTERFACE_X-_PIN Pin(PortL,6)
  138. #define INTERFACE_Y+_PIN Pin(PortL,5)
  139. #define INTERFACE_Y-_PIN Pin(PortL,4)
  140. #define INTERFACE_Z+_PIN Pin(PortL,3)
  141. #define INTERFACE_Z-_PIN Pin(PortL,2)
  142. #define INTERFACE_ZERO_PIN Pin(PortL,1)
  143. #define INTERFACE_OK_PIN Pin(PortC,2)
  144. #define INTERFACE_CANCEL_PIN Pin(PortC,1)
  145. #define INTERFACE_FOO_PIN Pin(PortC,0)
  146. #define INTERFACE_BAR_PIN Pin(PortL,0)
  147. #define INTERFACE_DEBUG_PIN Pin(PortB,7)
  148. #endif // BOARDS_RRMBV12_CONFIGURATION_HH_