Prusa MINI Firmware overview
pins_RUMBA.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 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 #pragma once
23 
24 /**
25  * RUMBA pin assignments
26  */
27 
28 #ifndef __AVR_ATmega2560__
29  #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
30 #elif HOTENDS > 3 || E_STEPPERS > 3
31  #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue."
32 #endif
33 
34 #ifndef BOARD_INFO_NAME
35  #define BOARD_INFO_NAME "Rumba"
36 #endif
37 #ifndef DEFAULT_MACHINE_NAME
38  #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
39 #endif
40 
41 //
42 // Servos
43 //
44 #define SERVO0_PIN 5
45 
46 //
47 // Limit Switches
48 //
49 #define X_MIN_PIN 37
50 #define X_MAX_PIN 36
51 #define Y_MIN_PIN 35
52 #define Y_MAX_PIN 34
53 #define Z_MIN_PIN 33
54 #define Z_MAX_PIN 32
55 
56 //
57 // Z Probe (when not Z_MIN_PIN)
58 //
59 #ifndef Z_MIN_PROBE_PIN
60  #define Z_MIN_PROBE_PIN 32
61 #endif
62 
63 //
64 // Steppers
65 //
66 #define X_STEP_PIN 17
67 #define X_DIR_PIN 16
68 #define X_ENABLE_PIN 48
69 
70 #define Y_STEP_PIN 54
71 #define Y_DIR_PIN 47
72 #define Y_ENABLE_PIN 55
73 
74 #define Z_STEP_PIN 57
75 #define Z_DIR_PIN 56
76 #define Z_ENABLE_PIN 62
77 
78 #ifndef E0_STEP_PIN
79  #define E0_STEP_PIN 23
80  #define E0_DIR_PIN 22
81  #define E0_ENABLE_PIN 24
82 #endif
83 
84 #ifndef E1_STEP_PIN
85  #define E1_STEP_PIN 26
86  #define E1_DIR_PIN 25
87  #define E1_ENABLE_PIN 27
88 #endif
89 
90 #if E1_STEP_PIN != 29
91  #define E2_STEP_PIN 29
92  #define E2_DIR_PIN 28
93  #define E2_ENABLE_PIN 39
94 #endif
95 
96 //
97 // Temperature Sensors
98 //
99 #ifndef TEMP_0_PIN
100  #if TEMP_SENSOR_0 == -1
101  #define TEMP_0_PIN 6 // Analog Input (connector *K1* on RUMBA thermocouple ADD ON is used)
102  #else
103  #define TEMP_0_PIN 15 // Analog Input (default connector for thermistor *T0* on rumba board is used)
104  #endif
105 #endif
106 
107 #ifndef TEMP_1_PIN
108  #if TEMP_SENSOR_1 == -1
109  #define TEMP_1_PIN 5 // Analog Input (connector *K2* on RUMBA thermocouple ADD ON is used)
110  #else
111  #define TEMP_1_PIN 14 // Analog Input (default connector for thermistor *T1* on rumba board is used)
112  #endif
113 #endif
114 
115 #if TEMP_SENSOR_2 == -1
116  #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)
117 #else
118  #define TEMP_2_PIN 13 // Analog Input (default connector for thermistor *T2* on rumba board is used)
119 #endif
120 
121 // Optional for extruder 4 or chamber:
122 //#define TEMP_X_PIN 12 // Analog Input (default connector for thermistor *T3* on rumba board is used)
123 
124 #ifndef TEMP_CHAMBER_PIN
125  //#define TEMP_CHAMBER_PIN 12 // Analog Input (default connector for thermistor *T3* on rumba board is used)
126 #endif
127 
128 #if TEMP_SENSOR_BED == -1
129  #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)
130 #else
131  #define TEMP_BED_PIN 11 // Analog Input (default connector for thermistor *THB* on rumba board is used)
132 #endif
133 
134 //
135 // Heaters / Fans
136 //
137 #define HEATER_0_PIN 2
138 #define HEATER_1_PIN 3
139 #define HEATER_2_PIN 6
140 #define HEATER_3_PIN 8
141 #define HEATER_BED_PIN 9
142 
143 #ifndef FAN_PIN
144  #define FAN_PIN 7
145 #endif
146 #define FAN1_PIN 8
147 
148 //
149 // Misc. Functions
150 //
151 #define LED_PIN 13
152 #define PS_ON_PIN 45
153 #define KILL_PIN 46
154 #define CASE_LIGHT_PIN 45
155 
156 //
157 // M3/M4/M5 - Spindle/Laser Control
158 //
159 #ifndef SPINDLE_LASER_PWM_PIN
160  #define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM. Pin 4 interrupts OC0* and OC1* always in use?
161 #endif
162 #ifndef SPINDLE_LASER_ENA_PIN
163  #define SPINDLE_LASER_ENA_PIN 14 // Pullup!
164 #endif
165 #ifndef SPINDLE_DIR_PIN
166  #define SPINDLE_DIR_PIN 15
167 #endif
168 
169 //
170 // LCD / Controller
171 //
172 #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
173  #define LCD_PINS_DC 38 // Set as output on init
174  #define LCD_PINS_RS 41 // Pull low for 1s to init
175  // DOGM SPI LCD Support
176  #define DOGLCD_CS 19
177  #define DOGLCD_MOSI 42
178  #define DOGLCD_SCK 18
179  #define DOGLCD_A0 LCD_PINS_DC
180 #elif ENABLED(FYSETC_MINI_12864)
181  #define DOGLCD_CS 42
182  #define DOGLCD_A0 19
183  #define DOGLCD_MOSI 51
184  #define DOGLCD_SCK 52
185 
186  //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
187  // results in LCD soft SPI mode 3, SD soft SPI mode 0
188 
189  #define LCD_RESET_PIN 18 // Must be high or open for LCD to operate normally.
190 
191  #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
192  #ifndef RGB_LED_R_PIN
193  #define RGB_LED_R_PIN 41
194  #endif
195  #ifndef RGB_LED_G_PIN
196  #define RGB_LED_G_PIN 38
197  #endif
198  #ifndef RGB_LED_B_PIN
199  #define RGB_LED_B_PIN 40
200  #endif
201  #elif ENABLED(FYSETC_MINI_12864_2_1)
202  #define NEOPIXEL_PIN 25
203  #endif
204 
205 #else
206  #define LCD_PINS_RS 19
207  #define LCD_PINS_ENABLE 42
208  #define LCD_PINS_D4 18
209  #define LCD_PINS_D5 38
210  #define LCD_PINS_D6 41
211 #endif
212 
213 #define LCD_PINS_D7 40
214 
215 //
216 // Beeper, SD Card, Encoder
217 //
218 #define BEEPER_PIN 44
219 
220 #if ENABLED(SDSUPPORT)
221  #define SDSS 53
222  #define SD_DETECT_PIN 49
223 #endif
224 
225 #if ENABLED(NEWPANEL)
226  #define BTN_EN1 11
227  #define BTN_EN2 12
228  #define BTN_ENC 43
229 #endif