| 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 |
* Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
|
|
|
25 |
*
|
|
|
26 |
* Applies to the following boards:
|
|
|
27 |
*
|
|
|
28 |
* RAMPS_14_EFB (Hotend, Fan, Bed)
|
|
|
29 |
* RAMPS_14_EEB (Hotend0, Hotend1, Bed)
|
|
|
30 |
* RAMPS_14_EFF (Hotend, Fan0, Fan1)
|
|
|
31 |
* RAMPS_14_EEF (Hotend0, Hotend1, Fan)
|
|
|
32 |
* RAMPS_14_SF (Spindle, Controller Fan)
|
|
|
33 |
*
|
|
|
34 |
* RAMPS_13_EFB (Hotend, Fan, Bed)
|
|
|
35 |
* RAMPS_13_EEB (Hotend0, Hotend1, Bed)
|
|
|
36 |
* RAMPS_13_EFF (Hotend, Fan0, Fan1)
|
|
|
37 |
* RAMPS_13_EEF (Hotend0, Hotend1, Fan)
|
|
|
38 |
* RAMPS_13_SF (Spindle, Controller Fan)
|
|
|
39 |
*
|
|
|
40 |
* Other pins_MYBOARD.h files may override these defaults
|
|
|
41 |
*
|
|
|
42 |
* Differences between
|
|
|
43 |
* RAMPS_13 | RAMPS_14
|
|
|
44 |
* 7 | 11
|
|
|
45 |
*/
|
|
|
46 |
|
|
|
47 |
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
|
|
|
48 |
#error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
|
|
|
49 |
#endif
|
|
|
50 |
|
|
|
51 |
#ifndef BOARD_NAME
|
|
|
52 |
#define BOARD_NAME "RAMPS 1.4"
|
|
|
53 |
#endif
|
|
|
54 |
|
|
|
55 |
//
|
|
|
56 |
// Servos
|
|
|
57 |
//
|
|
|
58 |
#ifdef IS_RAMPS_13
|
|
|
59 |
#define SERVO0_PIN 7 // RAMPS_13
|
|
|
60 |
#else
|
|
|
61 |
#define SERVO0_PIN 11
|
|
|
62 |
#endif
|
|
|
63 |
#ifndef SERVO1_PIN
|
|
|
64 |
#define SERVO1_PIN 6
|
|
|
65 |
#endif
|
|
|
66 |
#ifndef SERVO2_PIN
|
|
|
67 |
#define SERVO2_PIN 5
|
|
|
68 |
#endif
|
|
|
69 |
#ifndef SERVO3_PIN
|
|
|
70 |
#define SERVO3_PIN 4
|
|
|
71 |
#endif
|
|
|
72 |
|
|
|
73 |
//
|
|
|
74 |
// Limit Switches
|
|
|
75 |
//
|
|
|
76 |
#define X_MIN_PIN 3
|
|
|
77 |
#ifndef X_MAX_PIN
|
|
|
78 |
#define X_MAX_PIN 2
|
|
|
79 |
#endif
|
|
|
80 |
#define Y_MIN_PIN 14
|
|
|
81 |
#define Y_MAX_PIN 15
|
|
|
82 |
#define Z_MIN_PIN 18
|
|
|
83 |
#define Z_MAX_PIN 19
|
|
|
84 |
|
|
|
85 |
//
|
|
|
86 |
// Z Probe (when not Z_MIN_PIN)
|
|
|
87 |
//
|
|
|
88 |
#ifndef Z_MIN_PROBE_PIN
|
|
|
89 |
#define Z_MIN_PROBE_PIN 32
|
|
|
90 |
#endif
|
|
|
91 |
|
|
|
92 |
//
|
|
|
93 |
// Steppers
|
|
|
94 |
//
|
|
|
95 |
#define X_STEP_PIN 54
|
|
|
96 |
#define X_DIR_PIN 55
|
|
|
97 |
#define X_ENABLE_PIN 38
|
|
|
98 |
#ifndef X_CS_PIN
|
|
|
99 |
#define X_CS_PIN 53
|
|
|
100 |
#endif
|
|
|
101 |
|
|
|
102 |
#define Y_STEP_PIN 60
|
|
|
103 |
#define Y_DIR_PIN 61
|
|
|
104 |
#define Y_ENABLE_PIN 56
|
|
|
105 |
#ifndef Y_CS_PIN
|
|
|
106 |
#define Y_CS_PIN 49
|
|
|
107 |
#endif
|
|
|
108 |
|
|
|
109 |
#define Z_STEP_PIN 46
|
|
|
110 |
#define Z_DIR_PIN 48
|
|
|
111 |
#define Z_ENABLE_PIN 62
|
|
|
112 |
#ifndef Z_CS_PIN
|
|
|
113 |
#define Z_CS_PIN 40
|
|
|
114 |
#endif
|
|
|
115 |
|
|
|
116 |
#define E0_STEP_PIN 26
|
|
|
117 |
#define E0_DIR_PIN 28
|
|
|
118 |
#define E0_ENABLE_PIN 24
|
|
|
119 |
#ifndef E0_CS_PIN
|
|
|
120 |
#define E0_CS_PIN 42
|
|
|
121 |
#endif
|
|
|
122 |
|
|
|
123 |
#define E1_STEP_PIN 36
|
|
|
124 |
#define E1_DIR_PIN 34
|
|
|
125 |
#define E1_ENABLE_PIN 30
|
|
|
126 |
#ifndef E1_CS_PIN
|
|
|
127 |
#define E1_CS_PIN 44
|
|
|
128 |
#endif
|
|
|
129 |
|
|
|
130 |
/**
|
|
|
131 |
* Default pins for TMC software SPI
|
|
|
132 |
*/
|
|
|
133 |
#if ENABLED(TMC_USE_SW_SPI)
|
|
|
134 |
#ifndef TMC_SW_MOSI
|
|
|
135 |
#define TMC_SW_MOSI 66
|
|
|
136 |
#endif
|
|
|
137 |
#ifndef TMC_SW_MISO
|
|
|
138 |
#define TMC_SW_MISO 44
|
|
|
139 |
#endif
|
|
|
140 |
#ifndef TMC_SW_SCK
|
|
|
141 |
#define TMC_SW_SCK 64
|
|
|
142 |
#endif
|
|
|
143 |
#endif
|
|
|
144 |
|
|
|
145 |
#if HAS_DRIVER(TMC2208)
|
|
|
146 |
/**
|
|
|
147 |
* TMC2208 stepper drivers
|
|
|
148 |
*
|
|
|
149 |
* Hardware serial communication ports.
|
|
|
150 |
* If undefined software serial is used according to the pins below
|
|
|
151 |
*/
|
|
|
152 |
//#define X_HARDWARE_SERIAL Serial1
|
|
|
153 |
//#define X2_HARDWARE_SERIAL Serial1
|
|
|
154 |
//#define Y_HARDWARE_SERIAL Serial1
|
|
|
155 |
//#define Y2_HARDWARE_SERIAL Serial1
|
|
|
156 |
//#define Z_HARDWARE_SERIAL Serial1
|
|
|
157 |
//#define Z2_HARDWARE_SERIAL Serial1
|
|
|
158 |
//#define E0_HARDWARE_SERIAL Serial1
|
|
|
159 |
//#define E1_HARDWARE_SERIAL Serial1
|
|
|
160 |
//#define E2_HARDWARE_SERIAL Serial1
|
|
|
161 |
//#define E3_HARDWARE_SERIAL Serial1
|
|
|
162 |
//#define E4_HARDWARE_SERIAL Serial1
|
|
|
163 |
|
|
|
164 |
/**
|
|
|
165 |
* Software serial
|
|
|
166 |
*/
|
|
|
167 |
|
|
|
168 |
#ifndef X_SERIAL_TX_PIN
|
|
|
169 |
#define X_SERIAL_TX_PIN 40
|
|
|
170 |
#endif
|
|
|
171 |
#ifndef X_SERIAL_RX_PIN
|
|
|
172 |
#define X_SERIAL_RX_PIN 63
|
|
|
173 |
#endif
|
|
|
174 |
#ifndef X2_SERIAL_TX_PIN
|
|
|
175 |
#define X2_SERIAL_TX_PIN -1
|
|
|
176 |
#endif
|
|
|
177 |
#ifndef X2_SERIAL_RX_PIN
|
|
|
178 |
#define X2_SERIAL_RX_PIN -1
|
|
|
179 |
#endif
|
|
|
180 |
|
|
|
181 |
#ifndef Y_SERIAL_TX_PIN
|
|
|
182 |
#define Y_SERIAL_TX_PIN 59
|
|
|
183 |
#endif
|
|
|
184 |
#ifndef Y_SERIAL_RX_PIN
|
|
|
185 |
#define Y_SERIAL_RX_PIN 64
|
|
|
186 |
#endif
|
|
|
187 |
#ifndef Y2_SERIAL_TX_PIN
|
|
|
188 |
#define Y2_SERIAL_TX_PIN -1
|
|
|
189 |
#endif
|
|
|
190 |
#ifndef Y2_SERIAL_RX_PIN
|
|
|
191 |
#define Y2_SERIAL_RX_PIN -1
|
|
|
192 |
#endif
|
|
|
193 |
|
|
|
194 |
#ifndef Z_SERIAL_TX_PIN
|
|
|
195 |
#define Z_SERIAL_TX_PIN 42
|
|
|
196 |
#endif
|
|
|
197 |
#ifndef Z_SERIAL_RX_PIN
|
|
|
198 |
#define Z_SERIAL_RX_PIN 65
|
|
|
199 |
#endif
|
|
|
200 |
#ifndef Z2_SERIAL_TX_PIN
|
|
|
201 |
#define Z2_SERIAL_TX_PIN -1
|
|
|
202 |
#endif
|
|
|
203 |
#ifndef Z2_SERIAL_RX_PIN
|
|
|
204 |
#define Z2_SERIAL_RX_PIN -1
|
|
|
205 |
#endif
|
|
|
206 |
|
|
|
207 |
#ifndef E0_SERIAL_TX_PIN
|
|
|
208 |
#define E0_SERIAL_TX_PIN 44
|
|
|
209 |
#endif
|
|
|
210 |
#ifndef E0_SERIAL_RX_PIN
|
|
|
211 |
#define E0_SERIAL_RX_PIN 66
|
|
|
212 |
#endif
|
|
|
213 |
#ifndef E1_SERIAL_TX_PIN
|
|
|
214 |
#define E1_SERIAL_TX_PIN -1
|
|
|
215 |
#endif
|
|
|
216 |
#ifndef E1_SERIAL_RX_PIN
|
|
|
217 |
#define E1_SERIAL_RX_PIN -1
|
|
|
218 |
#endif
|
|
|
219 |
#ifndef E2_SERIAL_TX_PIN
|
|
|
220 |
#define E2_SERIAL_TX_PIN -1
|
|
|
221 |
#endif
|
|
|
222 |
#ifndef E2_SERIAL_RX_PIN
|
|
|
223 |
#define E2_SERIAL_RX_PIN -1
|
|
|
224 |
#endif
|
|
|
225 |
#ifndef E3_SERIAL_TX_PIN
|
|
|
226 |
#define E3_SERIAL_TX_PIN -1
|
|
|
227 |
#endif
|
|
|
228 |
#ifndef E3_SERIAL_RX_PIN
|
|
|
229 |
#define E3_SERIAL_RX_PIN -1
|
|
|
230 |
#endif
|
|
|
231 |
#ifndef E4_SERIAL_TX_PIN
|
|
|
232 |
#define E4_SERIAL_TX_PIN -1
|
|
|
233 |
#endif
|
|
|
234 |
#ifndef E4_SERIAL_RX_PIN
|
|
|
235 |
#define E4_SERIAL_RX_PIN -1
|
|
|
236 |
#endif
|
|
|
237 |
#endif
|
|
|
238 |
|
|
|
239 |
//
|
|
|
240 |
// Temperature Sensors
|
|
|
241 |
//
|
|
|
242 |
#define TEMP_0_PIN 13 // Analog Input
|
|
|
243 |
#define TEMP_1_PIN 15 // Analog Input
|
|
|
244 |
#define TEMP_BED_PIN 14 // Analog Input
|
|
|
245 |
|
|
|
246 |
// SPI for Max6675 or Max31855 Thermocouple
|
|
|
247 |
#if DISABLED(SDSUPPORT)
|
|
|
248 |
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
|
|
|
249 |
#else
|
|
|
250 |
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
|
|
|
251 |
#endif
|
|
|
252 |
|
|
|
253 |
//
|
|
|
254 |
// Augmentation for auto-assigning RAMPS plugs
|
|
|
255 |
//
|
|
|
256 |
#if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
|
|
|
257 |
#if HOTENDS > 1
|
|
|
258 |
#if TEMP_SENSOR_BED
|
|
|
259 |
#define IS_RAMPS_EEB
|
|
|
260 |
#else
|
|
|
261 |
#define IS_RAMPS_EEF
|
|
|
262 |
#endif
|
|
|
263 |
#elif TEMP_SENSOR_BED
|
|
|
264 |
#define IS_RAMPS_EFB
|
|
|
265 |
#else
|
|
|
266 |
#define IS_RAMPS_EFF
|
|
|
267 |
#endif
|
|
|
268 |
#endif
|
|
|
269 |
|
|
|
270 |
//
|
|
|
271 |
// Heaters / Fans
|
|
|
272 |
//
|
|
|
273 |
#ifndef MOSFET_D_PIN
|
|
|
274 |
#define MOSFET_D_PIN -1
|
|
|
275 |
#endif
|
|
|
276 |
#ifndef RAMPS_D8_PIN
|
|
|
277 |
#define RAMPS_D8_PIN 8
|
|
|
278 |
#endif
|
|
|
279 |
#ifndef RAMPS_D9_PIN
|
|
|
280 |
#define RAMPS_D9_PIN 9
|
|
|
281 |
#endif
|
|
|
282 |
#ifndef RAMPS_D10_PIN
|
|
|
283 |
#define RAMPS_D10_PIN 10
|
|
|
284 |
#endif
|
|
|
285 |
|
|
|
286 |
#define HEATER_0_PIN RAMPS_D10_PIN
|
|
|
287 |
|
|
|
288 |
#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
|
|
|
289 |
#define HEATER_BED_PIN RAMPS_D8_PIN
|
|
|
290 |
#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
|
|
|
291 |
#define HEATER_1_PIN RAMPS_D9_PIN
|
|
|
292 |
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
|
|
|
293 |
#define HEATER_1_PIN RAMPS_D9_PIN
|
|
|
294 |
#define HEATER_BED_PIN RAMPS_D8_PIN
|
|
|
295 |
#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
|
|
|
296 |
#define FAN1_PIN RAMPS_D8_PIN
|
|
|
297 |
#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
|
|
|
298 |
#define HEATER_BED_PIN RAMPS_D8_PIN
|
|
|
299 |
#if HOTENDS == 1
|
|
|
300 |
#define FAN1_PIN MOSFET_D_PIN
|
|
|
301 |
#else
|
|
|
302 |
#define HEATER_1_PIN MOSFET_D_PIN
|
|
|
303 |
#endif
|
|
|
304 |
#endif
|
|
|
305 |
|
|
|
306 |
#ifndef FAN_PIN
|
|
|
307 |
#if ENABLED(IS_RAMPS_EFB) || ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
|
|
308 |
#define FAN_PIN RAMPS_D9_PIN
|
|
|
309 |
#elif ENABLED(IS_RAMPS_EEF) || ENABLED(IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
|
|
310 |
#define FAN_PIN RAMPS_D8_PIN
|
|
|
311 |
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
|
|
|
312 |
#define FAN_PIN 4 // IO pin. Buffer needed
|
|
|
313 |
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
|
|
|
314 |
#define FAN_PIN RAMPS_D9_PIN
|
|
|
315 |
#endif
|
|
|
316 |
#endif
|
|
|
317 |
|
|
|
318 |
//
|
|
|
319 |
// Misc. Functions
|
|
|
320 |
//
|
|
|
321 |
#define SDSS 53
|
|
|
322 |
#define LED_PIN 13
|
|
|
323 |
|
|
|
324 |
#ifndef FILWIDTH_PIN
|
|
|
325 |
#define FILWIDTH_PIN 5 // Analog Input on AUX2
|
|
|
326 |
#endif
|
|
|
327 |
|
|
|
328 |
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
|
|
|
329 |
#ifndef FIL_RUNOUT_PIN
|
|
|
330 |
#define FIL_RUNOUT_PIN 4
|
|
|
331 |
#endif
|
|
|
332 |
|
|
|
333 |
#ifndef PS_ON_PIN
|
|
|
334 |
#define PS_ON_PIN 12
|
|
|
335 |
#endif
|
|
|
336 |
|
|
|
337 |
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENABLE_PIN)
|
|
|
338 |
#if NUM_SERVOS <= 1 // try to use servo connector first
|
|
|
339 |
#define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM
|
|
|
340 |
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
|
|
341 |
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
|
|
342 |
#define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM
|
|
|
343 |
#endif
|
|
|
344 |
#endif
|
|
|
345 |
|
|
|
346 |
//
|
|
|
347 |
// M3/M4/M5 - Spindle/Laser Control
|
|
|
348 |
//
|
|
|
349 |
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
|
|
|
350 |
#if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
|
|
|
351 |
#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup/pulldown!
|
|
|
352 |
#define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM
|
|
|
353 |
#define SPINDLE_DIR_PIN 5
|
|
|
354 |
#elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
|
|
|
355 |
&& (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD))) // try to use AUX 2
|
|
|
356 |
#define SPINDLE_LASER_ENABLE_PIN 40 // Pin should have a pullup/pulldown!
|
|
|
357 |
#define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM
|
|
|
358 |
#define SPINDLE_DIR_PIN 65
|
|
|
359 |
#endif
|
|
|
360 |
#endif
|
|
|
361 |
|
|
|
362 |
//
|
|
|
363 |
// Průša i3 MK2 Multiplexer Support
|
|
|
364 |
//
|
|
|
365 |
#ifndef E_MUX0_PIN
|
|
|
366 |
#define E_MUX0_PIN 40 // Z_CS_PIN
|
|
|
367 |
#endif
|
|
|
368 |
#ifndef E_MUX1_PIN
|
|
|
369 |
#define E_MUX1_PIN 42 // E0_CS_PIN
|
|
|
370 |
#endif
|
|
|
371 |
#ifndef E_MUX2_PIN
|
|
|
372 |
#define E_MUX2_PIN 44 // E1_CS_PIN
|
|
|
373 |
#endif
|
|
|
374 |
|
|
|
375 |
//////////////////////////
|
|
|
376 |
// LCDs and Controllers //
|
|
|
377 |
//////////////////////////
|
|
|
378 |
|
|
|
379 |
#if ENABLED(ULTRA_LCD)
|
|
|
380 |
|
|
|
381 |
//
|
|
|
382 |
// LCD Display output pins
|
|
|
383 |
//
|
|
|
384 |
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
|
|
385 |
|
|
|
386 |
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
|
|
|
387 |
#define LCD_PINS_ENABLE 51 // SID (MOSI)
|
|
|
388 |
#define LCD_PINS_D4 52 // SCK (CLK) clock
|
|
|
389 |
|
|
|
390 |
#elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
|
|
|
391 |
|
|
|
392 |
#define LCD_PINS_RS 40
|
|
|
393 |
#define LCD_PINS_ENABLE 42
|
|
|
394 |
#define LCD_PINS_D4 65
|
|
|
395 |
#define LCD_PINS_D5 66
|
|
|
396 |
#define LCD_PINS_D6 44
|
|
|
397 |
#define LCD_PINS_D7 64
|
|
|
398 |
|
|
|
399 |
#else
|
|
|
400 |
|
|
|
401 |
#if ENABLED(CR10_STOCKDISPLAY)
|
|
|
402 |
|
|
|
403 |
#define LCD_PINS_RS 27
|
|
|
404 |
#define LCD_PINS_ENABLE 29
|
|
|
405 |
#define LCD_PINS_D4 25
|
|
|
406 |
|
|
|
407 |
#if DISABLED(NEWPANEL)
|
|
|
408 |
#define BEEPER_PIN 37
|
|
|
409 |
#endif
|
|
|
410 |
|
|
|
411 |
#elif ENABLED(ZONESTAR_LCD)
|
|
|
412 |
|
|
|
413 |
#define LCD_PINS_RS 64
|
|
|
414 |
#define LCD_PINS_ENABLE 44
|
|
|
415 |
#define LCD_PINS_D4 63
|
|
|
416 |
#define LCD_PINS_D5 40
|
|
|
417 |
#define LCD_PINS_D6 42
|
|
|
418 |
#define LCD_PINS_D7 65
|
|
|
419 |
|
|
|
420 |
#else
|
|
|
421 |
|
|
|
422 |
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
|
|
423 |
#define LCD_PINS_DC 25 // Set as output on init
|
|
|
424 |
#define LCD_PINS_RS 27 // Pull low for 1s to init
|
|
|
425 |
// DOGM SPI LCD Support
|
|
|
426 |
#define DOGLCD_CS 16
|
|
|
427 |
#define DOGLCD_MOSI 17
|
|
|
428 |
#define DOGLCD_SCK 23
|
|
|
429 |
#define DOGLCD_A0 LCD_PINS_DC
|
|
|
430 |
#else
|
|
|
431 |
#define LCD_PINS_RS 16
|
|
|
432 |
#define LCD_PINS_ENABLE 17
|
|
|
433 |
#define LCD_PINS_D4 23
|
|
|
434 |
#define LCD_PINS_D5 25
|
|
|
435 |
#define LCD_PINS_D6 27
|
|
|
436 |
#endif
|
|
|
437 |
|
|
|
438 |
#define LCD_PINS_D7 29
|
|
|
439 |
|
|
|
440 |
#if DISABLED(NEWPANEL)
|
|
|
441 |
#define BEEPER_PIN 33
|
|
|
442 |
#endif
|
|
|
443 |
|
|
|
444 |
#endif
|
|
|
445 |
|
|
|
446 |
#if DISABLED(NEWPANEL)
|
|
|
447 |
// Buttons are attached to a shift register
|
|
|
448 |
// Not wired yet
|
|
|
449 |
//#define SHIFT_CLK 38
|
|
|
450 |
//#define SHIFT_LD 42
|
|
|
451 |
//#define SHIFT_OUT 40
|
|
|
452 |
//#define SHIFT_EN 17
|
|
|
453 |
#endif
|
|
|
454 |
|
|
|
455 |
#endif
|
|
|
456 |
|
|
|
457 |
//
|
|
|
458 |
// LCD Display input pins
|
|
|
459 |
//
|
|
|
460 |
#if ENABLED(NEWPANEL)
|
|
|
461 |
|
|
|
462 |
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
|
|
463 |
|
|
|
464 |
#define BEEPER_PIN 37
|
|
|
465 |
|
|
|
466 |
#if ENABLED(CR10_STOCKDISPLAY)
|
|
|
467 |
#define BTN_EN1 17
|
|
|
468 |
#define BTN_EN2 23
|
|
|
469 |
#else
|
|
|
470 |
#define BTN_EN1 31
|
|
|
471 |
#define BTN_EN2 33
|
|
|
472 |
#endif
|
|
|
473 |
|
|
|
474 |
#define BTN_ENC 35
|
|
|
475 |
#define SD_DETECT_PIN 49
|
|
|
476 |
#define KILL_PIN 41
|
|
|
477 |
|
|
|
478 |
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
|
|
|
479 |
#define LCD_BACKLIGHT_PIN 39
|
|
|
480 |
#endif
|
|
|
481 |
|
|
|
482 |
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
|
|
|
483 |
|
|
|
484 |
#define BTN_EN1 64
|
|
|
485 |
#define BTN_EN2 59
|
|
|
486 |
#define BTN_ENC 63
|
|
|
487 |
#define SD_DETECT_PIN 42
|
|
|
488 |
|
|
|
489 |
#elif ENABLED(LCD_I2C_PANELOLU2)
|
|
|
490 |
|
|
|
491 |
#define BTN_EN1 47
|
|
|
492 |
#define BTN_EN2 43
|
|
|
493 |
#define BTN_ENC 32
|
|
|
494 |
#define LCD_SDSS SDSS
|
|
|
495 |
#define KILL_PIN 41
|
|
|
496 |
|
|
|
497 |
#elif ENABLED(LCD_I2C_VIKI)
|
|
|
498 |
|
|
|
499 |
#define BTN_EN1 40 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
|
|
|
500 |
#define BTN_EN2 42 // for sake of the wiring diagram for RAMPS 1.4 we keep 40/42, confirmed working.
|
|
|
501 |
#define BTN_ENC -1
|
|
|
502 |
|
|
|
503 |
#define LCD_SDSS SDSS
|
|
|
504 |
#define SD_DETECT_PIN 49
|
|
|
505 |
|
|
|
506 |
#elif ENABLED(VIKI2) || ENABLED(miniVIKI)
|
|
|
507 |
|
|
|
508 |
#define DOGLCD_CS 45
|
|
|
509 |
#define DOGLCD_A0 44
|
|
|
510 |
#define LCD_SCREEN_ROT_180
|
|
|
511 |
|
|
|
512 |
#define BEEPER_PIN 33
|
|
|
513 |
#define STAT_LED_RED_PIN 32
|
|
|
514 |
#define STAT_LED_BLUE_PIN 35
|
|
|
515 |
|
|
|
516 |
#define BTN_EN1 22
|
|
|
517 |
#define BTN_EN2 7
|
|
|
518 |
#define BTN_ENC 39
|
|
|
519 |
|
|
|
520 |
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
|
|
|
521 |
#define KILL_PIN 31
|
|
|
522 |
|
|
|
523 |
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
|
|
524 |
|
|
|
525 |
#define DOGLCD_CS 29
|
|
|
526 |
#define DOGLCD_A0 27
|
|
|
527 |
|
|
|
528 |
#define BEEPER_PIN 23
|
|
|
529 |
#define LCD_BACKLIGHT_PIN 33
|
|
|
530 |
|
|
|
531 |
#define BTN_EN1 35
|
|
|
532 |
#define BTN_EN2 37
|
|
|
533 |
#define BTN_ENC 31
|
|
|
534 |
|
|
|
535 |
#define LCD_SDSS SDSS
|
|
|
536 |
#define SD_DETECT_PIN 49
|
|
|
537 |
#define KILL_PIN 41
|
|
|
538 |
|
|
|
539 |
#elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6
|
|
|
540 |
|
|
|
541 |
#define DOGLCD_A0 27
|
|
|
542 |
#define DOGLCD_CS 25
|
|
|
543 |
|
|
|
544 |
// GLCD features
|
|
|
545 |
//#define LCD_CONTRAST 190
|
|
|
546 |
// Uncomment screen orientation
|
|
|
547 |
//#define LCD_SCREEN_ROT_90
|
|
|
548 |
//#define LCD_SCREEN_ROT_180
|
|
|
549 |
//#define LCD_SCREEN_ROT_270
|
|
|
550 |
|
|
|
551 |
#define BEEPER_PIN 37
|
|
|
552 |
// not connected to a pin
|
|
|
553 |
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
|
|
|
554 |
|
|
|
555 |
#define BTN_EN1 31
|
|
|
556 |
#define BTN_EN2 33
|
|
|
557 |
#define BTN_ENC 35
|
|
|
558 |
|
|
|
559 |
#define SD_DETECT_PIN 49
|
|
|
560 |
#define KILL_PIN 41
|
|
|
561 |
|
|
|
562 |
#elif ENABLED(MINIPANEL)
|
|
|
563 |
|
|
|
564 |
#define BEEPER_PIN 42
|
|
|
565 |
// not connected to a pin
|
|
|
566 |
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
|
|
|
567 |
|
|
|
568 |
#define DOGLCD_A0 44
|
|
|
569 |
#define DOGLCD_CS 66
|
|
|
570 |
|
|
|
571 |
// GLCD features
|
|
|
572 |
//#define LCD_CONTRAST 190
|
|
|
573 |
// Uncomment screen orientation
|
|
|
574 |
//#define LCD_SCREEN_ROT_90
|
|
|
575 |
//#define LCD_SCREEN_ROT_180
|
|
|
576 |
//#define LCD_SCREEN_ROT_270
|
|
|
577 |
|
|
|
578 |
#define BTN_EN1 40
|
|
|
579 |
#define BTN_EN2 63
|
|
|
580 |
#define BTN_ENC 59
|
|
|
581 |
|
|
|
582 |
#define SD_DETECT_PIN 49
|
|
|
583 |
#define KILL_PIN 64
|
|
|
584 |
|
|
|
585 |
#elif ENABLED(ZONESTAR_LCD)
|
|
|
586 |
|
|
|
587 |
#define ADC_KEYPAD_PIN 12
|
|
|
588 |
|
|
|
589 |
#else
|
|
|
590 |
|
|
|
591 |
// Beeper on AUX-4
|
|
|
592 |
#define BEEPER_PIN 33
|
|
|
593 |
|
|
|
594 |
// Buttons are directly attached using AUX-2
|
|
|
595 |
#if ENABLED(REPRAPWORLD_KEYPAD)
|
|
|
596 |
#define SHIFT_OUT 40
|
|
|
597 |
#define SHIFT_CLK 44
|
|
|
598 |
#define SHIFT_LD 42
|
|
|
599 |
#define BTN_EN1 64
|
|
|
600 |
#define BTN_EN2 59
|
|
|
601 |
#define BTN_ENC 63
|
|
|
602 |
#elif ENABLED(PANEL_ONE)
|
|
|
603 |
#define BTN_EN1 59 // AUX2 PIN 3
|
|
|
604 |
#define BTN_EN2 63 // AUX2 PIN 4
|
|
|
605 |
#define BTN_ENC 49 // AUX3 PIN 7
|
|
|
606 |
#else
|
|
|
607 |
#define BTN_EN1 37
|
|
|
608 |
#define BTN_EN2 35
|
|
|
609 |
#define BTN_ENC 31
|
|
|
610 |
#endif
|
|
|
611 |
|
|
|
612 |
#if ENABLED(G3D_PANEL)
|
|
|
613 |
#define SD_DETECT_PIN 49
|
|
|
614 |
#define KILL_PIN 41
|
|
|
615 |
#endif
|
|
|
616 |
|
|
|
617 |
#endif
|
|
|
618 |
#endif // NEWPANEL
|
|
|
619 |
|
|
|
620 |
#endif // ULTRA_LCD
|