1 |
ron |
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 |
/**
|
|
|
24 |
* AZTEEG_X3_PRO (Arduino Mega) pin assignments
|
|
|
25 |
*/
|
|
|
26 |
|
|
|
27 |
#ifndef __AVR_ATmega2560__
|
|
|
28 |
#error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
|
|
|
29 |
#endif
|
|
|
30 |
|
|
|
31 |
#if HOTENDS > 5 || E_STEPPERS > 5
|
|
|
32 |
#error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue."
|
|
|
33 |
#endif
|
|
|
34 |
|
|
|
35 |
#define BOARD_NAME "Azteeg X3 Pro"
|
|
|
36 |
|
|
|
37 |
//
|
|
|
38 |
// RAMPS pins overrides
|
|
|
39 |
//
|
|
|
40 |
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT)
|
|
|
41 |
#define CASE_LIGHT_PIN 44
|
|
|
42 |
#endif
|
|
|
43 |
|
|
|
44 |
#ifndef FAN_PIN
|
|
|
45 |
#define FAN_PIN 6
|
|
|
46 |
#endif
|
|
|
47 |
|
|
|
48 |
#include "pins_RAMPS.h"
|
|
|
49 |
|
|
|
50 |
// DIGIPOT slave addresses
|
|
|
51 |
#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT 0x2C (0x58 <- 0x2C << 1)
|
|
|
52 |
#define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT 0x2E (0x5C <- 0x2E << 1)
|
|
|
53 |
|
|
|
54 |
//
|
|
|
55 |
// Servos
|
|
|
56 |
//
|
|
|
57 |
// Tested this pin with bed leveling on a Delta with 1 servo.
|
|
|
58 |
// Physical wire attachment on EXT1: GND, 5V, D47.
|
|
|
59 |
//
|
|
|
60 |
#undef SERVO0_PIN
|
|
|
61 |
#define SERVO0_PIN 47
|
|
|
62 |
|
|
|
63 |
//
|
|
|
64 |
// Limit Switches
|
|
|
65 |
//
|
|
|
66 |
// Swap the MIN and MAX endstop pins because the X3 Pro comes with only
|
|
|
67 |
// MIN endstop pin headers soldered onto the board.
|
|
|
68 |
//
|
|
|
69 |
#if ENABLED(DELTA)
|
|
|
70 |
#undef X_MIN_PIN
|
|
|
71 |
#undef X_MAX_PIN
|
|
|
72 |
#undef Y_MIN_PIN
|
|
|
73 |
#undef Y_MAX_PIN
|
|
|
74 |
#undef Z_MIN_PIN
|
|
|
75 |
#undef Z_MAX_PIN
|
|
|
76 |
|
|
|
77 |
#define X_MIN_PIN 2
|
|
|
78 |
#define X_MAX_PIN 3
|
|
|
79 |
#define Y_MIN_PIN 15
|
|
|
80 |
#define Y_MAX_PIN 14
|
|
|
81 |
#define Z_MIN_PIN 19
|
|
|
82 |
#define Z_MAX_PIN 18
|
|
|
83 |
#endif
|
|
|
84 |
|
|
|
85 |
//
|
|
|
86 |
// Z Probe (when not Z_MIN_PIN)
|
|
|
87 |
//
|
|
|
88 |
#ifndef Z_MIN_PROBE_PIN
|
|
|
89 |
#define Z_MIN_PROBE_PIN 18
|
|
|
90 |
#endif
|
|
|
91 |
|
|
|
92 |
//
|
|
|
93 |
// Steppers
|
|
|
94 |
//
|
|
|
95 |
#define E2_STEP_PIN 23
|
|
|
96 |
#define E2_DIR_PIN 25
|
|
|
97 |
#define E2_ENABLE_PIN 40
|
|
|
98 |
|
|
|
99 |
#define E3_STEP_PIN 27
|
|
|
100 |
#define E3_DIR_PIN 29
|
|
|
101 |
#define E3_ENABLE_PIN 41
|
|
|
102 |
|
|
|
103 |
#define E4_STEP_PIN 43
|
|
|
104 |
#define E4_DIR_PIN 37
|
|
|
105 |
#define E4_ENABLE_PIN 42
|
|
|
106 |
|
|
|
107 |
//
|
|
|
108 |
// Temperature Sensors
|
|
|
109 |
//
|
|
|
110 |
#define TEMP_2_PIN 12 // Analog Input
|
|
|
111 |
#define TEMP_3_PIN 11 // Analog Input
|
|
|
112 |
#define TEMP_4_PIN 10 // Analog Input
|
|
|
113 |
#define TC1 4 // Analog Input (Thermo couple on Azteeg X3Pro)
|
|
|
114 |
#define TC2 5 // Analog Input (Thermo couple on Azteeg X3Pro)
|
|
|
115 |
|
|
|
116 |
//
|
|
|
117 |
// Heaters / Fans
|
|
|
118 |
//
|
|
|
119 |
#define HEATER_2_PIN 16
|
|
|
120 |
#define HEATER_3_PIN 17
|
|
|
121 |
#define HEATER_4_PIN 4
|
|
|
122 |
#define HEATER_5_PIN 5
|
|
|
123 |
#define HEATER_6_PIN 6
|
|
|
124 |
#define HEATER_7_PIN 11
|
|
|
125 |
|
|
|
126 |
#ifndef CONTROLLER_FAN_PIN
|
|
|
127 |
#define CONTROLLER_FAN_PIN 4 // Pin used for the fan to cool motherboard (-1 to disable)
|
|
|
128 |
#endif
|
|
|
129 |
|
|
|
130 |
// Fans/Water Pump to cool the hotend cool side.
|
|
|
131 |
#define ORIG_E0_AUTO_FAN_PIN 5
|
|
|
132 |
#define ORIG_E1_AUTO_FAN_PIN 5
|
|
|
133 |
#define ORIG_E2_AUTO_FAN_PIN 5
|
|
|
134 |
#define ORIG_E3_AUTO_FAN_PIN 5
|
|
|
135 |
|
|
|
136 |
//
|
|
|
137 |
// LCD / Controller
|
|
|
138 |
//
|
|
|
139 |
#undef BEEPER_PIN
|
|
|
140 |
#define BEEPER_PIN 33
|
|
|
141 |
|
|
|
142 |
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
|
|
143 |
#undef SD_DETECT_PIN
|
|
|
144 |
#define SD_DETECT_PIN 49 // For easy adapter board
|
|
|
145 |
#undef BEEPER_PIN
|
|
|
146 |
#define BEEPER_PIN 12 // 33 isn't physically available to the LCD display
|
|
|
147 |
#else
|
|
|
148 |
#define STAT_LED_RED_PIN 32
|
|
|
149 |
#define STAT_LED_BLUE_PIN 35
|
|
|
150 |
#endif
|
|
|
151 |
|
|
|
152 |
//
|
|
|
153 |
// Misc. Functions
|
|
|
154 |
//
|
|
|
155 |
#if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN
|
|
|
156 |
#undef DOGLCD_A0 // Steal pin 44 for the case light; if you have a Viki2 and have connected it
|
|
|
157 |
#define DOGLCD_A0 57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments
|
|
|
158 |
// as the wiring diagram uses pin 44 for DOGLCD_A0
|
|
|
159 |
#endif
|
|
|
160 |
|
|
|
161 |
//
|
|
|
162 |
// M3/M4/M5 - Spindle/Laser Control
|
|
|
163 |
//
|
|
|
164 |
#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are no good with the AzteegX3pro board
|
|
|
165 |
#undef SPINDLE_LASER_ENABLE_PIN
|
|
|
166 |
#undef SPINDLE_DIR_PIN
|
|
|
167 |
|
|
|
168 |
#if ENABLED(SPINDLE_LASER_ENABLE) // EXP2 header
|
|
|
169 |
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
|
|
170 |
#undef BTN_EN2
|
|
|
171 |
#define BTN_EN2 31 // need 7 for the spindle speed PWM
|
|
|
172 |
#endif
|
|
|
173 |
#define SPINDLE_LASER_PWM_PIN 7 // must have a hardware PWM
|
|
|
174 |
#define SPINDLE_LASER_ENABLE_PIN 20 // Pin should have a pullup!
|
|
|
175 |
#define SPINDLE_DIR_PIN 21
|
|
|
176 |
#endif
|
|
|
177 |
|