Prusa MINI Firmware overview
pins_RADDS.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  * RADDS
26  */
27 
28 #ifndef __SAM3X8E__
29  #error "Oops! Select 'Arduino Due' in 'Tools > Board.'"
30 #endif
31 
32 #define BOARD_INFO_NAME "RADDS"
33 
34 //
35 // Servos
36 //
37 #define SERVO0_PIN 5
38 #define SERVO1_PIN 6
39 #define SERVO2_PIN 39
40 #define SERVO3_PIN 40
41 
42 //
43 // Limit Switches
44 //
45 #define X_MIN_PIN 28
46 #define X_MAX_PIN 34
47 #define Y_MIN_PIN 30
48 #define Y_MAX_PIN 36
49 #define Z_MIN_PIN 32
50 #define Z_MAX_PIN 38
51 
52 //
53 // Z Probe (when not Z_MIN_PIN)
54 //
55 #ifndef Z_MIN_PROBE_PIN
56  #define Z_MIN_PROBE_PIN 38
57 #endif
58 
59 //
60 // Steppers
61 //
62 #define X_STEP_PIN 24
63 #define X_DIR_PIN 23
64 #define X_ENABLE_PIN 26
65 #ifndef X_CS_PIN
66  #define X_CS_PIN 25
67 #endif
68 
69 #define Y_STEP_PIN 17
70 #define Y_DIR_PIN 16
71 #define Y_ENABLE_PIN 22
72 #ifndef Y_CS_PIN
73  #define Y_CS_PIN 27
74 #endif
75 
76 #define Z_STEP_PIN 2
77 #define Z_DIR_PIN 3
78 #define Z_ENABLE_PIN 15
79 #ifndef Z_CS_PIN
80  #define Z_CS_PIN 29
81 #endif
82 
83 #define E0_STEP_PIN 61
84 #define E0_DIR_PIN 60
85 #define E0_ENABLE_PIN 62
86 #ifndef E0_CS_PIN
87  #define E0_CS_PIN 31
88 #endif
89 
90 #define E1_STEP_PIN 64
91 #define E1_DIR_PIN 63
92 #define E1_ENABLE_PIN 65
93 #ifndef E1_CS_PIN
94  #define E1_CS_PIN 33
95 #endif
96 
97 #define E2_STEP_PIN 51
98 #define E2_DIR_PIN 53
99 #define E2_ENABLE_PIN 49
100 #ifndef E2_CS_PIN
101  #define E2_CS_PIN 35
102 #endif
103 
104 /**
105  * RADDS Extension Board V2 / V3
106  * http://doku.radds.org/dokumentation/extension-board
107  */
108 //#define RADDS_EXTENSION 2
109 #if RADDS_EXTENSION >= 2
110  #define E3_DIR_PIN 33
111  #define E3_STEP_PIN 35
112  #define E3_ENABLE_PIN 37
113  #ifndef E3_CS_PIN
114  #define E3_CS_PIN 6
115  #endif
116 
117  #if RADDS_EXTENSION == 3
118 
119  #define E4_DIR_PIN 27
120  #define E4_STEP_PIN 29
121  #define E4_ENABLE_PIN 31
122  #ifndef E4_CS_PIN
123  #define E4_CS_PIN 39
124  #endif
125 
126  #define E5_DIR_PIN 66
127  #define E5_STEP_PIN 67
128  #define E5_ENABLE_PIN 68
129  #ifndef E5_CS_PIN
130  #define E5_CS_PIN 6
131  #endif
132 
133  #define RADDS_EXT_MSI_PIN 69
134 
135  #define BOARD_INIT() OUT_WRITE(RADDS_EXT_VDD_PIN, HIGH)
136 
137  #else
138 
139  #define E4_DIR_PIN 27
140  #define E4_STEP_PIN 29
141  #define E4_ENABLE_PIN 31
142  #ifndef E4_CS_PIN
143  #define E4_CS_PIN 39
144  #endif
145 
146  // E3 and E4 share the same MSx pins
147  #define E3_MS1_PIN 67
148  #define E4_MS1_PIN 67
149  #define E3_MS2_PIN 68
150  #define E4_MS2_PIN 68
151  #define E3_MS3_PIN 69
152  #define E4_MS3_PIN 69
153 
154  #define RADDS_EXT_VDD2_PIN 66
155 
156  #define BOARD_INIT() do{ OUT_WRITE(RADDS_EXT_VDD_PIN, HIGH); OUT_WRITE(RADDS_EXT_VDD2_PIN, HIGH); }while(0)
157 
158  #endif
159 
160  #define RADDS_EXT_VDD_PIN 25
161 
162 #endif
163 
164 //
165 // Temperature Sensors
166 //
167 #define TEMP_0_PIN 0 // Analog Input
168 #define TEMP_1_PIN 1 // Analog Input
169 #define TEMP_2_PIN 2 // Analog Input
170 #define TEMP_3_PIN 3 // Analog Input
171 #define TEMP_4_PIN 5 // dummy so will compile when PINS_DEBUGGING is enabled
172 #define TEMP_BED_PIN 4 // Analog Input
173 
174 // SPI for Max6675 or Max31855 Thermocouple
175 #if DISABLED(SDSUPPORT)
176  #define MAX6675_SS_PIN 53
177 #else
178  #define MAX6675_SS_PIN 49
179 #endif
180 
181 //
182 // Heaters / Fans
183 //
184 #define HEATER_0_PIN 13
185 #define HEATER_1_PIN 12
186 #define HEATER_2_PIN 11
187 #define HEATER_BED_PIN 7 // BED
188 
189 #ifndef FAN_PIN
190  #define FAN_PIN 9
191 #endif
192 #define FAN1_PIN 8
193 
194 //
195 // Misc. Functions
196 //
197 #define SD_DETECT_PIN 14
198 #define PS_ON_PIN 40 // SERVO3_PIN
199 
200 #ifndef FIL_RUNOUT_PIN
201  #define FIL_RUNOUT_PIN 39 // SERVO2_PIN
202 #endif
203 
204 #define I2C_EEPROM
205 #define E2END 0x1FFF // 8KB
206 
207 //
208 // LCD / Controller
209 //
210 #if HAS_SPI_LCD
211 
212  #if ENABLED(RADDS_DISPLAY)
213 
214  #define LCD_PINS_RS 42
215  #define LCD_PINS_ENABLE 43
216  #define LCD_PINS_D4 44
217  #define LCD_PINS_D5 45
218  #define LCD_PINS_D6 46
219  #define LCD_PINS_D7 47
220 
221  #define BEEPER_PIN 41
222 
223  #define BTN_EN1 50
224  #define BTN_EN2 52
225  #define BTN_ENC 48
226 
227  #define BTN_BACK 71
228 
229  #define SDSS 10
230  #define SD_DETECT_PIN 14
231 
232  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
233 
234  // The REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER requires
235  // an adapter such as https://www.thingiverse.com/thing:1740725
236 
237  #define LCD_PINS_RS 42
238  #define LCD_PINS_ENABLE 43
239  #define LCD_PINS_D4 44
240 
241  #define BEEPER_PIN 41
242 
243  #define BTN_EN1 50
244  #define BTN_EN2 52
245  #define BTN_ENC 48
246 
247  #define SDSS 10
248  #define SD_DETECT_PIN 14
249 
250  #elif HAS_SSD1306_OLED_I2C
251 
252  #define BTN_EN1 50
253  #define BTN_EN2 52
254  #define BTN_ENC 48
255  #define BEEPER_PIN 41
256  #define LCD_SDSS 10
257  #define SD_DETECT_PIN 14
258 
259  #elif ENABLED(SPARK_FULL_GRAPHICS)
260 
261  #define LCD_PINS_D4 29
262  #define LCD_PINS_ENABLE 27
263  #define LCD_PINS_RS 25
264 
265  #define BTN_EN1 35
266  #define BTN_EN2 33
267  #define BTN_ENC 37
268 
269  #endif // SPARK_FULL_GRAPHICS
270 
271 #endif // HAS_SPI_LCD
272 
273 #ifndef SDSS
274  #define SDSS 4
275 #endif