|
@@ -0,0 +1,183 @@
|
|
1
|
+/**
|
|
2
|
+ * Arduino Mega with BAM&DICE DUE pin assignments
|
|
3
|
+ *
|
|
4
|
+ * Applies to the following boards:
|
|
5
|
+ *
|
|
6
|
+ * BAM&DICE Due with Arduino Mega
|
|
7
|
+ */
|
|
8
|
+
|
|
9
|
+#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
|
|
10
|
+ #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
|
|
11
|
+#endif
|
|
12
|
+
|
|
13
|
+#define LARGE_FLASH true
|
|
14
|
+
|
|
15
|
+#define X_STEP_PIN 54
|
|
16
|
+#define X_DIR_PIN 55
|
|
17
|
+#define X_ENABLE_PIN 38
|
|
18
|
+#define X_MIN_PIN 3
|
|
19
|
+#define X_MAX_PIN 2
|
|
20
|
+
|
|
21
|
+#define Y_STEP_PIN 60
|
|
22
|
+#define Y_DIR_PIN 61
|
|
23
|
+#define Y_ENABLE_PIN 56
|
|
24
|
+#define Y_MIN_PIN 14
|
|
25
|
+#define Y_MAX_PIN 15
|
|
26
|
+
|
|
27
|
+#define Z_STEP_PIN 46
|
|
28
|
+#define Z_DIR_PIN 48
|
|
29
|
+#define Z_ENABLE_PIN 62
|
|
30
|
+#define Z_MIN_PIN 18
|
|
31
|
+#define Z_MAX_PIN 19
|
|
32
|
+
|
|
33
|
+#define Y2_STEP_PIN 36
|
|
34
|
+#define Y2_DIR_PIN 34
|
|
35
|
+#define Y2_ENABLE_PIN 30
|
|
36
|
+
|
|
37
|
+#define Z2_STEP_PIN 36
|
|
38
|
+#define Z2_DIR_PIN 34
|
|
39
|
+#define Z2_ENABLE_PIN 30
|
|
40
|
+
|
|
41
|
+#define E0_STEP_PIN 26
|
|
42
|
+#define E0_DIR_PIN 28
|
|
43
|
+#define E0_ENABLE_PIN 24
|
|
44
|
+
|
|
45
|
+#define E1_STEP_PIN 36
|
|
46
|
+#define E1_DIR_PIN 34
|
|
47
|
+#define E1_ENABLE_PIN 30
|
|
48
|
+
|
|
49
|
+#define SDPOWER -1
|
|
50
|
+#define SDSS 53
|
|
51
|
+#define LED_PIN 13
|
|
52
|
+
|
|
53
|
+#define FAN_PIN 9 // (Sprinter config)
|
|
54
|
+
|
|
55
|
+#define PS_ON_PIN 12
|
|
56
|
+
|
|
57
|
+#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
|
|
58
|
+ #define KILL_PIN 41
|
|
59
|
+#else
|
|
60
|
+ #define KILL_PIN -1
|
|
61
|
+#endif
|
|
62
|
+
|
|
63
|
+#define HEATER_0_PIN 10
|
|
64
|
+
|
|
65
|
+#define HEATER_1_PIN -1
|
|
66
|
+
|
|
67
|
+#define HEATER_2_PIN -1
|
|
68
|
+
|
|
69
|
+#define TEMP_0_PIN 9 // ANALOG NUMBERING
|
|
70
|
+#define TEMP_1_PIN 11 // ANALOG NUMBERING
|
|
71
|
+#define TEMP_2_PIN -1 // ANALOG NUMBERING
|
|
72
|
+
|
|
73
|
+#define HEATER_BED_PIN 8 // BED
|
|
74
|
+
|
|
75
|
+#define TEMP_BED_PIN 14 // ANALOG NUMBERING
|
|
76
|
+
|
|
77
|
+#ifdef NUM_SERVOS
|
|
78
|
+ #define SERVO0_PIN 11
|
|
79
|
+
|
|
80
|
+ #if NUM_SERVOS > 1
|
|
81
|
+ #define SERVO1_PIN 6
|
|
82
|
+ #endif
|
|
83
|
+
|
|
84
|
+ #if NUM_SERVOS > 2
|
|
85
|
+ #define SERVO2_PIN 5
|
|
86
|
+ #endif
|
|
87
|
+
|
|
88
|
+ #if NUM_SERVOS > 3
|
|
89
|
+ #define SERVO3_PIN 4
|
|
90
|
+ #endif
|
|
91
|
+#endif
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+#ifdef ULTRA_LCD
|
|
95
|
+
|
|
96
|
+ #ifdef NEWPANEL
|
|
97
|
+ #define LCD_PINS_RS 16
|
|
98
|
+ #define LCD_PINS_ENABLE 17
|
|
99
|
+ #define LCD_PINS_D4 23
|
|
100
|
+ #define LCD_PINS_D5 25
|
|
101
|
+ #define LCD_PINS_D6 27
|
|
102
|
+ #define LCD_PINS_D7 29
|
|
103
|
+
|
|
104
|
+ #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
|
|
105
|
+ #define BEEPER 37
|
|
106
|
+
|
|
107
|
+ #define BTN_EN1 31
|
|
108
|
+ #define BTN_EN2 33
|
|
109
|
+ #define BTN_ENC 35
|
|
110
|
+
|
|
111
|
+ #define SDCARDDETECT 49
|
|
112
|
+ #elif defined(LCD_I2C_PANELOLU2)
|
|
113
|
+ #define BTN_EN1 47 // reverse if the encoder turns the wrong way.
|
|
114
|
+ #define BTN_EN2 43
|
|
115
|
+ #define BTN_ENC 32
|
|
116
|
+ #define LCD_SDSS 53
|
|
117
|
+ #define SDCARDDETECT -1
|
|
118
|
+ #define KILL_PIN 41
|
|
119
|
+ #elif defined(LCD_I2C_VIKI)
|
|
120
|
+ #define BTN_EN1 22 // reverse if the encoder turns the wrong way.
|
|
121
|
+ #define BTN_EN2 7
|
|
122
|
+ #define BTN_ENC -1
|
|
123
|
+ #define LCD_SDSS 53
|
|
124
|
+ #define SDCARDDETECT 49
|
|
125
|
+ #else
|
|
126
|
+ // arduino pin which triggers an piezzo beeper
|
|
127
|
+ #define BEEPER 33 // Beeper on AUX-4
|
|
128
|
+
|
|
129
|
+ // buttons are directly attached using AUX-2
|
|
130
|
+ #ifdef REPRAPWORLD_KEYPAD
|
|
131
|
+ #define BTN_EN1 64 // encoder
|
|
132
|
+ #define BTN_EN2 59 // encoder
|
|
133
|
+ #define BTN_ENC 63 // enter button
|
|
134
|
+ #define SHIFT_OUT 40 // shift register
|
|
135
|
+ #define SHIFT_CLK 44 // shift register
|
|
136
|
+ #define SHIFT_LD 42 // shift register
|
|
137
|
+ #else
|
|
138
|
+ #define BTN_EN1 37
|
|
139
|
+ #define BTN_EN2 35
|
|
140
|
+ #define BTN_ENC 31 // the click
|
|
141
|
+ #endif
|
|
142
|
+
|
|
143
|
+ #ifdef G3D_PANEL
|
|
144
|
+ #define SDCARDDETECT 49
|
|
145
|
+ #else
|
|
146
|
+ #define SDCARDDETECT -1 // Ramps does not use this port
|
|
147
|
+ #endif
|
|
148
|
+
|
|
149
|
+ #endif
|
|
150
|
+
|
|
151
|
+ #else // Old-style panel with shift register
|
|
152
|
+ // Arduino pin witch triggers an piezzo beeper
|
|
153
|
+ #define BEEPER 33 // No Beeper added
|
|
154
|
+
|
|
155
|
+ // Buttons are attached to a shift register
|
|
156
|
+ // Not wired yet
|
|
157
|
+ // #define SHIFT_CLK 38
|
|
158
|
+ // #define SHIFT_LD 42
|
|
159
|
+ // #define SHIFT_OUT 40
|
|
160
|
+ // #define SHIFT_EN 17
|
|
161
|
+
|
|
162
|
+ #define LCD_PINS_RS 16
|
|
163
|
+ #define LCD_PINS_ENABLE 17
|
|
164
|
+ #define LCD_PINS_D4 23
|
|
165
|
+ #define LCD_PINS_D5 25
|
|
166
|
+ #define LCD_PINS_D6 27
|
|
167
|
+ #define LCD_PINS_D7 29
|
|
168
|
+ #endif
|
|
169
|
+#endif // ULTRA_LCD
|
|
170
|
+
|
|
171
|
+// SPI for Max6675 Thermocouple
|
|
172
|
+#ifndef SDSUPPORT
|
|
173
|
+ #define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
|
|
174
|
+#else
|
|
175
|
+ #define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
|
|
176
|
+#endif
|
|
177
|
+
|
|
178
|
+#ifndef SDSUPPORT
|
|
179
|
+ // these pins are defined in the SD library if building with SD support
|
|
180
|
+ #define SCK_PIN 52
|
|
181
|
+ #define MISO_PIN 50
|
|
182
|
+ #define MOSI_PIN 51
|
|
183
|
+#endif
|