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
 * RUMBA pin assignments
25
 */
26
 
27
#ifndef __AVR_ATmega2560__
28
  #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
#endif
30
 
31
#if HOTENDS > 3 || E_STEPPERS > 3
32
  #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue."
33
#endif
34
 
35
#define DEFAULT_MACHINE_NAME "Rumba"
36
#define BOARD_NAME           "Rumba"
37
 
38
//
39
// Servos
40
//
41
#define SERVO0_PIN         5
42
 
43
//
44
// Limit Switches
45
//
46
#define X_MIN_PIN          37
47
#define X_MAX_PIN          36
48
#define Y_MIN_PIN          35
49
#define Y_MAX_PIN          34
50
#define Z_MIN_PIN          33
51
#define Z_MAX_PIN          32
52
 
53
//
54
// Z Probe (when not Z_MIN_PIN)
55
//
56
#ifndef Z_MIN_PROBE_PIN
57
  #define Z_MIN_PROBE_PIN  32
58
#endif
59
 
60
//
61
// Steppers
62
//
63
#define X_STEP_PIN         17
64
#define X_DIR_PIN          16
65
#define X_ENABLE_PIN       48
66
 
67
#define Y_STEP_PIN         54
68
#define Y_DIR_PIN          47
69
#define Y_ENABLE_PIN       55
70
 
71
#define Z_STEP_PIN         57
72
#define Z_DIR_PIN          56
73
#define Z_ENABLE_PIN       62
74
 
75
#define E0_STEP_PIN        23
76
#define E0_DIR_PIN         22
77
#define E0_ENABLE_PIN      24
78
 
79
#define E1_STEP_PIN        26
80
#define E1_DIR_PIN         25
81
#define E1_ENABLE_PIN      27
82
 
83
#define E2_STEP_PIN        29
84
#define E2_DIR_PIN         28
85
#define E2_ENABLE_PIN      39
86
 
87
//
88
// Temperature Sensors
89
//
90
#if TEMP_SENSOR_0 == -1
91
  #define TEMP_0_PIN        6   // Analog Input (connector *K1* on RUMBA thermocouple ADD ON is used)
92
#else
93
  #define TEMP_0_PIN       15   // Analog Input (default connector for thermistor *T0* on rumba board is used)
94
#endif
95
 
96
#if TEMP_SENSOR_1 == -1
97
  #define TEMP_1_PIN        5   // Analog Input (connector *K2* on RUMBA thermocouple ADD ON is used)
98
#else
99
  #define TEMP_1_PIN       14   // Analog Input (default connector for thermistor *T1* on rumba board is used)
100
#endif
101
 
102
#if TEMP_SENSOR_2 == -1
103
  #define TEMP_2_PIN        7   // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can't be used when TEMP_SENSOR_BED is defined as thermocouple)
104
#else
105
  #define TEMP_2_PIN       13   // Analog Input (default connector for thermistor *T2* on rumba board is used)
106
#endif
107
 
108
// optional for extruder 4 or chamber:
109
//#define TEMP_X_PIN         12   // Analog Input (default connector for thermistor *T3* on rumba board is used)
110
//#define TEMP_CHAMBER_PIN   12   // Analog Input (default connector for thermistor *T3* on rumba board is used)
111
 
112
#if TEMP_SENSOR_BED == -1
113
  #define TEMP_BED_PIN      7   // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can't be used when TEMP_SENSOR_2 is defined as thermocouple)
114
#else
115
  #define TEMP_BED_PIN     11   // Analog Input (default connector for thermistor *THB* on rumba board is used)
116
#endif
117
 
118
//
119
// Heaters / Fans
120
//
121
#define HEATER_0_PIN        2
122
#define HEATER_1_PIN        3
123
#define HEATER_2_PIN        6
124
#define HEATER_3_PIN        8
125
#define HEATER_BED_PIN      9
126
 
127
#ifndef FAN_PIN
128
  #define FAN_PIN           7
129
#endif
130
#define FAN1_PIN            8
131
 
132
//
133
// Misc. Functions
134
//
135
#define SDSS               53
136
#define LED_PIN            13
137
#define PS_ON_PIN          45
138
#define KILL_PIN           46
139
#define CASE_LIGHT_PIN     45
140
 
141
//
142
// M3/M4/M5 - Spindle/Laser Control
143
//
144
#ifndef SPINDLE_LASER_PWM_PIN
145
  #define SPINDLE_LASER_PWM_PIN     4   // MUST BE HARDWARE PWM. Pin 4 interrupts OC0* and OC1* always in use?
146
#endif
147
#ifndef SPINDLE_LASER_ENABLE_PIN
148
  #define SPINDLE_LASER_ENABLE_PIN 14   // Pin should have a pullup!
149
#endif
150
#ifndef SPINDLE_DIR_PIN
151
  #define SPINDLE_DIR_PIN          15
152
#endif
153
 
154
//
155
// LCD / Controller
156
//
157
#define SD_DETECT_PIN      49
158
#define BEEPER_PIN         44
159
#define LCD_PINS_D7        40
160
#define BTN_EN1            11
161
#define BTN_EN2            12
162
#define BTN_ENC            43
163
 
164
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
165
  #define LCD_PINS_DC      38 // Set as output on init
166
  #define LCD_PINS_RS      41 // Pull low for 1s to init
167
  // DOGM SPI LCD Support
168
  #define DOGLCD_CS        19
169
  #define DOGLCD_MOSI      42
170
  #define DOGLCD_SCK       18
171
  #define DOGLCD_A0        LCD_PINS_DC
172
#else
173
  #define LCD_PINS_RS      19
174
  #define LCD_PINS_ENABLE  42
175
  #define LCD_PINS_D4      18
176
  #define LCD_PINS_D5      38
177
  #define LCD_PINS_D6      41
178
#endif