Prusa MINI Firmware overview
pins_RURAMPS4D_13.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  * Ported sys0724 & Vynt
22  */
23 
24 /**
25  * Arduino Mega? or Due with RuRAMPS4DUE pin assignments
26  *
27  * Applies to the following boards:
28  * RURAMPS4DUE (Hotend0, Hotend1, Hotend2, Fan0, Fan1, Bed)
29  *
30  * Differences between
31  * RADDS | RuRAMPS4DUE
32  * |
33  */
34 
35 #ifndef __SAM3X8E__
36  #error "Oops! Select 'Arduino Due' in 'Tools > Board.'"
37 #endif
38 
39 #define BOARD_INFO_NAME "RuRAMPS4Due v1.3"
40 
41 //
42 // Servos
43 //
44 #define SERVO0_PIN 5
45 #define SERVO1_PIN 3
46 
47 //
48 // Limit Switches
49 //
50 #define X_MIN_PIN 45
51 #define X_MAX_PIN 39
52 #define Y_MIN_PIN 46
53 #define Y_MAX_PIN 41
54 #define Z_MIN_PIN 47
55 #define Z_MAX_PIN 43
56 
57 //
58 // Z Probe (when not Z_MIN_PIN)
59 //
60 #ifndef Z_MIN_PROBE_PIN
61  #define Z_MIN_PROBE_PIN 49
62 #endif
63 
64 //
65 // Steppers
66 //
67 #define X_STEP_PIN 37 // Support Extension Board
68 #define X_DIR_PIN 36
69 #define X_ENABLE_PIN 31
70 #ifndef X_CS_PIN
71  #define X_CS_PIN 38
72 #endif
73 
74 #define Y_STEP_PIN 32 // Support Extension Board
75 #define Y_DIR_PIN 35
76 #define Y_ENABLE_PIN 31
77 #ifndef Y_CS_PIN
78  #define Y_CS_PIN 34
79 #endif
80 
81 #define Z_STEP_PIN 30 // Support Extension Board
82 #define Z_DIR_PIN 2
83 #define Z_ENABLE_PIN 31
84 #ifndef Z_CS_PIN
85  #define Z_CS_PIN 10
86 #endif
87 
88 #define E0_STEP_PIN 29
89 #define E0_DIR_PIN 28
90 #define E0_ENABLE_PIN 33
91 #ifndef E0_CS_PIN
92  #define E0_CS_PIN 14
93 #endif
94 
95 #define E1_STEP_PIN 22
96 #define E1_DIR_PIN 24
97 #define E1_ENABLE_PIN 26
98 #ifndef E1_CS_PIN
99  #define E1_CS_PIN 15
100 #endif
101 
102 #define E2_STEP_PIN 25
103 #define E2_DIR_PIN 23
104 #define E2_ENABLE_PIN 27
105 #ifndef E2_CS_PIN
106  #define E2_CS_PIN 61
107 #endif
108 
109 #if HAS_CUSTOM_PROBE_PIN
110  #define Z_MIN_PROBE_PIN 49
111 #endif
112 
113 #if HAS_FILAMENT_SENSOR
114  #ifndef FIL_RUNOUT_PIN
115  #define FIL_RUNOUT_PIN Y_MIN_PIN
116  #endif
117 #endif
118 
119 //
120 // Heaters / Fans
121 //
122 #define HEATER_0_PIN 13
123 #define HEATER_1_PIN 12
124 #define HEATER_2_PIN 11
125 #define HEATER_BED_PIN 7 // BED H1
126 
127 #define FAN_PIN 9
128 #define FAN1_PIN 8
129 #define CONTROLLER_FAN_PIN -1
130 
131 //
132 // Temperature Sensors
133 //
134 #define TEMP_0_PIN 0 // ANALOG A0
135 #define TEMP_1_PIN 1 // ANALOG A1
136 #define TEMP_2_PIN 2 // ANALOG A2
137 #define TEMP_3_PIN 3 // ANALOG A3
138 #define TEMP_BED_PIN 4 // ANALOG A4
139 
140 // The thermocouple uses Analog pins
141 #if ENABLED(VER_WITH_THERMOCOUPLE) // Defined in Configuration.h
142  #define TEMP_4_PIN 5 // A5
143  #define TEMP_5_PIN 6 // A6 (Marlin 2.0 not support)
144 #endif
145 
146 // SPI for Max6675 or Max31855 Thermocouple
147 /*
148 #if DISABLED(SDSUPPORT)
149  #define MAX6675_SS_PIN 53
150 #else
151  #define MAX6675_SS_PIN 49
152 #endif
153 */
154 
155 //
156 // Misc. Functions
157 //
158 #define SDSS 4 // 4,10,52 if using HW SPI.
159 #define LED_PIN -1 // 13 - HEATER_0_PIN
160 #define PS_ON_PIN -1 // 65
161 
162 // MKS TFT / Nextion Use internal USART-1
163 #define TFT_LCD_MODULE_COM 1
164 #define TFT_LCD_MODULE_BAUDRATE 115200
165 
166 // ESP WiFi Use internal USART-2
167 #define ESP_WIFI_MODULE_COM 2
168 #define ESP_WIFI_MODULE_BAUDRATE 115200
169 #define ESP_WIFI_MODULE_RESET_PIN -1
170 #define PIGGY_GPIO_PIN -1
171 
172 //
173 // EEPROM
174 //
175 #define E2END 0x7FFF // 32Kb (24lc256)
176 #define I2C_EEPROM // EEPROM on I2C-0
177 //#define EEPROM_SD // EEPROM on SDCARD
178 //#define SPI_EEPROM // EEPROM on SPI-0
179 //#define SPI_CHAN_EEPROM1 ?
180 //#define SPI_EEPROM1_CS ?
181 // 2K EEPROM
182 //#define SPI_EEPROM2_CS ?
183 // 32Mb FLASH
184 //#define SPI_FLASH_CS ?
185 
186 //
187 // LCD / Controller
188 //
189 #if HAS_SPI_LCD
190 
191  #if ANY(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER, REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
192  #define BEEPER_PIN 62
193  #define LCD_PINS_D4 48
194  #define LCD_PINS_D5 50
195  #define LCD_PINS_D6 52
196  #define LCD_PINS_D7 53
197  #define SD_DETECT_PIN 51
198  #endif
199 
200  #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
201 
202  #define LCD_PINS_RS 63
203  #define LCD_PINS_ENABLE 64
204 
205  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
206 
207  #define LCD_PINS_RS 52
208  #define LCD_PINS_ENABLE 53
209 
210  #elif HAS_SSD1306_OLED_I2C
211 
212  #define BEEPER_PIN 62
213  #define LCD_SDSS 10
214  #define SD_DETECT_PIN 51
215 
216  #elif ENABLED(FYSETC_MINI_12864)
217 
218  #define BEEPER_PIN 62
219  #define DOGLCD_CS 64
220  #define DOGLCD_A0 63
221 
222  //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
223  // results in LCD soft SPI mode 3, SD soft SPI mode 0
224 
225  #define LCD_RESET_PIN 48 // Must be high or open for LCD to operate normally.
226 
227  #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
228  #ifndef RGB_LED_R_PIN
229  #define RGB_LED_R_PIN 50 // D5
230  #endif
231  #ifndef RGB_LED_G_PIN
232  #define RGB_LED_G_PIN 52 // D6
233  #endif
234  #ifndef RGB_LED_B_PIN
235  #define RGB_LED_B_PIN 53 // D7
236  #endif
237  #elif ENABLED(FYSETC_MINI_12864_2_1)
238  #define NEOPIXEL_PIN 50 // D5
239  #endif
240 
241  #elif ENABLED(MKS_MINI_12864)
242 
243  #define ORIG_BEEPER_PIN 62
244 
245  #define DOGLCD_A0 52
246  #define DOGLCD_CS 50
247 
248  #define SD_DETECT_PIN 51
249 
250  #endif
251 
252  #if ENABLED(NEWPANEL)
253  #define BTN_EN1 44
254  #define BTN_EN2 42
255  #define BTN_ENC 40
256  #endif
257 
258 #endif // HAS_SPI_LCD