Subversion Repositories Tronxy-X3A-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
 * IMPORTANT NOTE:
25
 * Rambo users should be sure to compile Marlin using either the RAMBo
26
 * board type if using the Arduino IDE - available via the link below - or
27
 * the 'rambo' environment if using platformio, by specifying '-e rambo' on
28
 * the command line or by changing the value of the 'env_default' variable to
29
 * 'rambo' in the supplied platformio.ini.
30
 *
31
 * If you don't compile using the proper board type, the RAMBo's extended
32
 * pins will likely be unavailable and accessories/addons may not work.
33
 *
34
 * Instructions for installing the Arduino RAMBo board type for the
35
 * Arduino IDE are available at:
36
 * http://reprap.org/wiki/Rambo_firmware
37
 */
38
 
39
/**
40
 * Rambo pin assignments
41
 */
42
 
43
#ifndef __AVR_ATmega2560__
44
  #error "Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
45
#endif
46
 
47
#define BOARD_NAME "Rambo"
48
 
49
//
50
// Servos
51
//
52
#define SERVO0_PIN         22   // Motor header MX1
53
#define SERVO1_PIN         23   // Motor header MX2
54
#define SERVO2_PIN         24   // Motor header MX3
55
#define SERVO3_PIN          5   // PWM header pin 5
56
 
57
//
58
// Limit Switches
59
//
60
#define X_MIN_PIN          12
61
#define X_MAX_PIN          24
62
#define Y_MIN_PIN          11
63
#define Y_MAX_PIN          23
64
#define Z_MIN_PIN          10
65
#define Z_MAX_PIN          30
66
 
67
//
68
// Z Probe (when not Z_MIN_PIN)
69
//
70
#ifndef Z_MIN_PROBE_PIN
71
  #define Z_MIN_PROBE_PIN  30
72
#endif
73
 
74
//
75
// Steppers
76
//
77
#define X_STEP_PIN         37
78
#define X_DIR_PIN          48
79
#define X_ENABLE_PIN       29
80
 
81
#define Y_STEP_PIN         36
82
#define Y_DIR_PIN          49
83
#define Y_ENABLE_PIN       28
84
 
85
#define Z_STEP_PIN         35
86
#define Z_DIR_PIN          47
87
#define Z_ENABLE_PIN       27
88
 
89
#define E0_STEP_PIN        34
90
#define E0_DIR_PIN         43
91
#define E0_ENABLE_PIN      26
92
 
93
#define E1_STEP_PIN        33
94
#define E1_DIR_PIN         42
95
#define E1_ENABLE_PIN      25
96
 
97
// Microstepping pins - Mapping not from fastio.h (?)
98
#define X_MS1_PIN          40
99
#define X_MS2_PIN          41
100
#define Y_MS1_PIN          69
101
#define Y_MS2_PIN          39
102
#define Z_MS1_PIN          68
103
#define Z_MS2_PIN          67
104
#define E0_MS1_PIN         65
105
#define E0_MS2_PIN         66
106
#define E1_MS1_PIN         63
107
#define E1_MS2_PIN         64
108
 
109
#define DIGIPOTSS_PIN      38
110
#define DIGIPOT_CHANNELS  { 4,5,3,0,1 }   // X Y Z E0 E1 digipot channels to stepper driver mapping
111
#ifndef DIGIPOT_MOTOR_CURRENT
112
  #define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 }   // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
113
#endif
114
 
115
//
116
// Temperature Sensors
117
//
118
#define TEMP_0_PIN          0   // Analog Input
119
#define TEMP_1_PIN          1   // Analog Input
120
#define TEMP_BED_PIN        2   // Analog Input
121
 
122
//
123
// Heaters / Fans
124
//
125
#define HEATER_0_PIN        9
126
#define HEATER_1_PIN        7
127
#define HEATER_2_PIN        6
128
#define HEATER_BED_PIN      3
129
 
130
#ifndef FAN_PIN
131
  #define FAN_PIN           8
132
#endif
133
#define FAN1_PIN            6
134
#define FAN2_PIN            2
135
 
136
//
137
// Misc. Functions
138
//
139
#define SDSS               53
140
#define LED_PIN            13
141
#define PS_ON_PIN           4
142
#define CASE_LIGHT_PIN     46
143
 
144
#ifndef FILWIDTH_PIN
145
  #define FILWIDTH_PIN      3   // Analog Input
146
#endif
147
 
148
//
149
// M3/M4/M5 - Spindle/Laser Control
150
//
151
#define SPINDLE_LASER_PWM_PIN    45   // MUST BE HARDWARE PWM
152
#define SPINDLE_LASER_ENABLE_PIN 31   // Pin should have a pullup!
153
#define SPINDLE_DIR_PIN          32
154
 
155
//
156
// Průša i3 MK2 Multiplexer Support
157
//
158
#define E_MUX0_PIN         17
159
#define E_MUX1_PIN         16
160
#define E_MUX2_PIN         84   // 84 in MK2 Firmware
161
 
162
//
163
// LCD / Controller
164
//
165
#if ENABLED(ULTRA_LCD)
166
 
167
  #define KILL_PIN         80
168
 
169
  #if ENABLED(NEWPANEL)
170
 
171
    #define LCD_PINS_RS     70
172
    #define LCD_PINS_ENABLE 71
173
    #define LCD_PINS_D4     72
174
    #define LCD_PINS_D5     73
175
    #define LCD_PINS_D6     74
176
    #define LCD_PINS_D7     75
177
 
178
    #if ENABLED(VIKI2) || ENABLED(miniVIKI)
179
      #define BEEPER_PIN   44
180
      // NB: Panucatt's Viki 2.0 wiring diagram (v1.2) indicates that the
181
      //     beeper/buzzer is connected to pin 33; however, the pin used in the
182
      //     diagram is actually pin 44, so this is correct.
183
 
184
      #define DOGLCD_A0    70
185
      #define DOGLCD_CS    71
186
      #define LCD_SCREEN_ROT_180
187
 
188
      #define BTN_EN1      85
189
      #define BTN_EN2      84
190
      #define BTN_ENC      83
191
 
192
      #define SD_DETECT_PIN -1   // Pin 72 if using easy adapter board
193
 
194
      #define STAT_LED_RED_PIN 22
195
      #define STAT_LED_BLUE_PIN 32
196
 
197
    #else // !VIKI2 && !miniVIKI
198
 
199
      #define BEEPER_PIN   79   // AUX-4
200
 
201
      // AUX-2
202
      #define BTN_EN1      76
203
      #define BTN_EN2      77
204
      #define BTN_ENC      78
205
 
206
      #define SD_DETECT_PIN 81
207
 
208
    #endif // !VIKI2 && !miniVIKI
209
 
210
  #else // !NEWPANEL - old style panel with shift register
211
 
212
    // No Beeper added
213
    #define BEEPER_PIN     33
214
 
215
    // buttons are attached to a shift register
216
    // Not wired yet
217
    //#define SHIFT_CLK 38
218
    //#define SHIFT_LD 42
219
    //#define SHIFT_OUT 40
220
    //#define SHIFT_EN 17
221
 
222
    #define LCD_PINS_RS     75
223
    #define LCD_PINS_ENABLE 17
224
    #define LCD_PINS_D4     23
225
    #define LCD_PINS_D5     25
226
    #define LCD_PINS_D6     27
227
    #define LCD_PINS_D7     29
228
 
229
  #endif // !NEWPANEL
230
 
231
#endif // ULTRA_LCD