PageRenderTime 36ms CodeModel.GetById 26ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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