Prusa MINI Firmware overview
Main Page
Modules
Classes
Files
File List
File Members
pins_TT_OSCAR.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
23
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
24
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
25
#endif
26
27
#if HOTENDS > 5 || E_STEPPERS > 5
28
#error "TTOSCAR supports up to 5 hotends / E-steppers. Comment out this line to continue."
29
#endif
30
31
#define BOARD_INFO_NAME "TT OSCAR"
32
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
33
34
//
35
// Servos
36
//
37
#define SERVO0_PIN 11
38
#define SERVO1_PIN 12
39
#define SERVO2_PIN 5
40
#define SERVO3_PIN 4
41
42
//
43
// Limit Switches
44
//
45
#define X_MIN_PIN 3
46
#define X_MAX_PIN 2
47
#define Y_MIN_PIN 14
48
#define Y_MAX_PIN 15
49
#define Z_MIN_PIN 18
50
#define Z_MAX_PIN 19
51
52
//
53
// Z Probe (when not Z_MIN_PIN)
54
//
55
#ifndef Z_MIN_PROBE_PIN
56
#define Z_MIN_PROBE_PIN SERVO3_PIN
57
#endif
58
59
//
60
// Steppers
61
//
62
#define X_STEP_PIN 54
63
#define X_DIR_PIN 55
64
#define X_ENABLE_PIN 38
65
#define X_CS_PIN 57
66
67
#define Y_STEP_PIN 60
68
#define Y_DIR_PIN 61
69
#define Y_ENABLE_PIN 56
70
#define Y_CS_PIN 58
71
72
#define Z_STEP_PIN 46
73
#define Z_DIR_PIN 48
74
#define Z_ENABLE_PIN 62
75
#define Z_CS_PIN 53
76
77
#define E0_STEP_PIN 26
78
#define E0_DIR_PIN 28
79
#define E0_ENABLE_PIN 24
80
#define E0_CS_PIN 49
81
82
#define E1_STEP_PIN 36
83
#define E1_DIR_PIN 34
84
#define E1_ENABLE_PIN 30
85
#define E1_CS_PIN E0_CS_PIN
86
87
#define E2_STEP_PIN 63
88
#define E2_DIR_PIN 22
89
#define E2_ENABLE_PIN 59
90
#define E2_CS_PIN E0_CS_PIN
91
92
#define E3_STEP_PIN 32
93
#define E3_DIR_PIN 40
94
#define E3_ENABLE_PIN 39
95
#define E3_CS_PIN E0_CS_PIN
96
97
#define E4_STEP_PIN 43
98
#define E4_DIR_PIN 42
99
#define E4_ENABLE_PIN 47
100
#define E4_CS_PIN E0_CS_PIN
101
102
#if HAS_TMC220x
103
/**
104
* TMC2208/TMC2209 stepper drivers
105
*
106
* Hardware serial communication ports.
107
* If undefined software serial is used according to the pins below
108
*/
109
//#define X_HARDWARE_SERIAL Serial1
110
//#define X2_HARDWARE_SERIAL Serial1
111
//#define Y_HARDWARE_SERIAL Serial1
112
//#define Y2_HARDWARE_SERIAL Serial1
113
//#define Z_HARDWARE_SERIAL Serial1
114
//#define Z2_HARDWARE_SERIAL Serial1
115
//#define E0_HARDWARE_SERIAL Serial1
116
//#define E1_HARDWARE_SERIAL Serial1
117
//#define E2_HARDWARE_SERIAL Serial1
118
//#define E3_HARDWARE_SERIAL Serial1
119
//#define E3_HARDWARE_SERIAL Serial1
120
121
//
122
// Software serial
123
//
124
125
#define X_SERIAL_TX_PIN -1 // 59
126
#define X_SERIAL_RX_PIN -1 // 63
127
#define X2_SERIAL_TX_PIN -1
128
#define X2_SERIAL_RX_PIN -1
129
130
#define Y_SERIAL_TX_PIN -1 // 64
131
#define Y_SERIAL_RX_PIN -1 // 40
132
#define Y2_SERIAL_TX_PIN -1
133
#define Y2_SERIAL_RX_PIN -1
134
135
#define Z_SERIAL_TX_PIN -1 // 44
136
#define Z_SERIAL_RX_PIN -1 // 42
137
#define Z2_SERIAL_TX_PIN -1
138
#define Z2_SERIAL_RX_PIN -1
139
140
#define E0_SERIAL_TX_PIN -1 // 66
141
#define E0_SERIAL_RX_PIN -1 // 65
142
#define E1_SERIAL_TX_PIN -1
143
#define E1_SERIAL_RX_PIN -1
144
#define E2_SERIAL_TX_PIN -1
145
#define E2_SERIAL_RX_PIN -1
146
#define E3_SERIAL_TX_PIN -1
147
#define E3_SERIAL_RX_PIN -1
148
#define E4_SERIAL_TX_PIN -1
149
#define E4_SERIAL_RX_PIN -1
150
#endif
151
152
//
153
// Default pins for TMC software SPI
154
//
155
//#if ENABLED(TMC_USE_SW_SPI)
156
// #ifndef TMC_SW_MOSI
157
// #define TMC_SW_MOSI 66
158
// #endif
159
// #ifndef TMC_SW_MISO
160
// #define TMC_SW_MISO 44
161
// #endif
162
// #ifndef TMC_SW_SCK
163
// #define TMC_SW_SCK 64
164
// #endif
165
//#endif
166
167
//
168
// Temperature Sensors
169
//
170
#define TEMP_0_PIN 13
171
#define TEMP_1_PIN 15
172
#define TEMP_2_PIN 10
173
#define TEMP_3_PIN 11
174
#define TEMP_BED_PIN 14
175
176
#if TEMP_SENSOR_CHAMBER > 0
177
#define TEMP_CHAMBER_PIN 12
178
#else
179
#define TEMP_4_PIN 12
180
#endif
181
182
// SPI for Max6675 or Max31855 Thermocouple
183
//#if DISABLED(SDSUPPORT)
184
// #define MAX6675_SS 66 // Don't use 53 if there is even the remote possibility of using Display/SD card
185
//#else
186
// #define MAX6675_SS 66 // Don't use 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
187
//#endif
188
189
//
190
// Heaters / Fans
191
//
192
#define HEATER_0_PIN 10
193
#define HEATER_1_PIN 7
194
#define HEATER_2_PIN 44
195
#define HEATER_BED_PIN 8
196
197
#define FAN_PIN 9
198
199
#if EXTRUDERS >= 5
200
#define HEATER_4_PIN 6
201
#else
202
#define FAN1_PIN 6
203
#endif
204
205
#if EXTRUDERS >= 4
206
#define HEATER_3_PIN 45
207
#else
208
#define FAN2_PIN 45
209
#endif
210
211
//
212
// Misc. Functions
213
//
214
#define SDSS 53
215
#define LED_PIN 13
216
217
//#ifndef FILWIDTH_PIN
218
// #define FILWIDTH_PIN 5 // Analog Input
219
//#endif
220
221
// DIO 4 (Servos plug) for the runout sensor.
222
//#define FIL_RUNOUT_PIN SERVO3_PIN
223
224
#ifndef PS_ON_PIN
225
#define PS_ON_PIN 12
226
#endif
227
228
//
229
// Case Light
230
//
231
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
232
#if !NUM_SERVOS // Prefer the servo connector
233
#define CASE_LIGHT_PIN 6 // Hardware PWM
234
#elif HAS_FREE_AUX2_PINS // Try to use AUX 2
235
#define CASE_LIGHT_PIN 44 // Hardware PWM
236
#endif
237
#endif
238
239
//
240
// M3/M4/M5 - Spindle/Laser Control
241
//
242
#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE)
243
#if !NUM_SERVOS // Prefer the servo connector
244
#define SPINDLE_LASER_ENABLE_PIN 4 // Pullup or pulldown!
245
#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
246
#define SPINDLE_DIR_PIN 5
247
#elif HAS_FREE_AUX2_PINS // Try to use AUX 2
248
#define SPINDLE_LASER_ENABLE_PIN 40 // Pullup or pulldown!
249
#define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
250
#define SPINDLE_DIR_PIN 65
251
#endif
252
#endif
253
254
//
255
// Průša i3 MK2 Multiplexer Support
256
//
257
//#ifndef E_MUX0_PIN
258
// #define E_MUX0_PIN 58 // Y_CS_PIN
259
//#endif
260
//#ifndef E_MUX1_PIN
261
// #define E_MUX1_PIN 53 // Z_CS_PIN
262
//#endif
263
//#ifndef E_MUX2_PIN
264
// #define E_MUX2_PIN 49 // En_CS_PIN
265
//#endif
266
267
//////////////////////////
268
// LCDs and Controllers //
269
//////////////////////////
270
271
#if HAS_SPI_LCD
272
273
//
274
// LCD Display output pins
275
//
276
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
277
278
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
279
#define LCD_PINS_ENABLE 51 // SID (MOSI)
280
#define LCD_PINS_D4 52 // SCK (CLK) clock
281
282
#elif BOTH(NEWPANEL, PANEL_ONE)
283
284
#define LCD_PINS_RS 40
285
#define LCD_PINS_ENABLE 42
286
#define LCD_PINS_D4 65
287
#define LCD_PINS_D5 66
288
#define LCD_PINS_D6 44
289
#define LCD_PINS_D7 64
290
291
#elif ENABLED(ZONESTAR_LCD)
292
293
#define LCD_PINS_RS 64
294
#define LCD_PINS_ENABLE 44
295
#define LCD_PINS_D4 63
296
#define LCD_PINS_D5 40
297
#define LCD_PINS_D6 42
298
#define LCD_PINS_D7 65
299
#define ADC_KEYPAD_PIN 12
300
301
#else
302
303
#if ENABLED(CR10_STOCKDISPLAY)
304
305
#define LCD_PINS_RS 27
306
#define LCD_PINS_ENABLE 29
307
#define LCD_PINS_D4 25
308
309
#if DISABLED(NEWPANEL)
310
#define BEEPER_PIN 37
311
#endif
312
313
#else
314
315
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
316
#define LCD_PINS_DC 25 // Set as output on init
317
#define LCD_PINS_RS 27 // Pull low for 1s to init
318
// DOGM SPI LCD Support
319
#define DOGLCD_CS 16
320
#define DOGLCD_MOSI 17
321
#define DOGLCD_SCK 23
322
#define DOGLCD_A0 LCD_PINS_DC
323
#else
324
#define LCD_PINS_RS 16
325
#define LCD_PINS_ENABLE 17
326
#define LCD_PINS_D4 23
327
#define LCD_PINS_D5 25
328
#define LCD_PINS_D6 27
329
#endif
330
331
#define LCD_PINS_D7 29
332
333
#if DISABLED(NEWPANEL)
334
#define BEEPER_PIN 33
335
#endif
336
337
#endif
338
339
#if DISABLED(NEWPANEL)
340
// Buttons attached to a shift register
341
// Not wired yet
342
//#define SHIFT_CLK 38
343
//#define SHIFT_LD 42
344
//#define SHIFT_OUT 40
345
//#define SHIFT_EN 17
346
#endif
347
348
#endif
349
350
//
351
// LCD Display input pins
352
//
353
#if ENABLED(NEWPANEL)
354
355
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
356
357
#define BEEPER_PIN 37
358
359
#if ENABLED(CR10_STOCKDISPLAY)
360
#define BTN_EN1 17
361
#define BTN_EN2 23
362
#else
363
#define BTN_EN1 31
364
#define BTN_EN2 33
365
#endif
366
367
#define BTN_ENC 35
368
#define SD_DETECT_PIN 49
369
//#define KILL_PIN 41
370
371
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
372
#define LCD_BACKLIGHT_PIN 39
373
#endif
374
375
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
376
377
#define BTN_EN1 64
378
#define BTN_EN2 59
379
#define BTN_ENC 63
380
#define SD_DETECT_PIN 42
381
382
#elif ENABLED(LCD_I2C_PANELOLU2)
383
384
#define BTN_EN1 47
385
#define BTN_EN2 43
386
#define BTN_ENC 32
387
#define LCD_SDSS 53
388
//#define KILL_PIN 41
389
390
#elif ENABLED(LCD_I2C_VIKI)
391
392
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
393
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
394
#define BTN_ENC -1
395
396
#define LCD_SDSS 53
397
#define SD_DETECT_PIN 49
398
399
#elif EITHER(VIKI2, miniVIKI)
400
401
#define DOGLCD_CS 45
402
#define DOGLCD_A0 44
403
#define LCD_SCREEN_ROT_180
404
405
#define BEEPER_PIN 33
406
#define STAT_LED_RED_PIN 32
407
#define STAT_LED_BLUE_PIN 35
408
409
#define BTN_EN1 22
410
#define BTN_EN2 7
411
#define BTN_ENC 39
412
413
#define SDSS 53
414
#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
415
//#define KILL_PIN 31
416
417
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
418
419
#define DOGLCD_CS 29
420
#define DOGLCD_A0 27
421
422
#define BEEPER_PIN 23
423
#define LCD_BACKLIGHT_PIN 33
424
425
#define BTN_EN1 35
426
#define BTN_EN2 37
427
#define BTN_ENC 31
428
429
#define LCD_SDSS 53
430
#define SD_DETECT_PIN 49
431
//#define KILL_PIN 41
432
433
#elif ENABLED(MKS_MINI_12864)
434
435
#define DOGLCD_A0 27
436
#define DOGLCD_CS 25
437
438
// GLCD features
439
//#define LCD_CONTRAST_INIT 190
440
// Uncomment screen orientation
441
//#define LCD_SCREEN_ROT_90
442
//#define LCD_SCREEN_ROT_180
443
//#define LCD_SCREEN_ROT_270
444
445
#define BEEPER_PIN 37
446
447
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
448
449
#define BTN_EN1 31
450
#define BTN_EN2 33
451
#define BTN_ENC 35
452
//#define SDSS 53
453
#define SD_DETECT_PIN 49
454
//#define KILL_PIN 64
455
456
#elif ENABLED(MINIPANEL)
457
458
#define BEEPER_PIN 42
459
// not connected to a pin
460
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
461
462
#define DOGLCD_A0 44
463
#define DOGLCD_CS 66
464
465
// GLCD features
466
//#define LCD_CONTRAST_INIT 190
467
// Uncomment screen orientation
468
//#define LCD_SCREEN_ROT_90
469
//#define LCD_SCREEN_ROT_180
470
//#define LCD_SCREEN_ROT_270
471
472
#define BTN_EN1 40
473
#define BTN_EN2 63
474
#define BTN_ENC 59
475
476
#define SDSS 53
477
#define SD_DETECT_PIN 49
478
//#define KILL_PIN 64
479
480
#else
481
482
// Beeper on AUX-4
483
#define BEEPER_PIN 33
484
485
// Buttons are directly attached to AUX-2
486
#if ENABLED(REPRAPWORLD_KEYPAD)
487
#define SHIFT_OUT 40
488
#define SHIFT_CLK 44
489
#define SHIFT_LD 42
490
#define BTN_EN1 64
491
#define BTN_EN2 59
492
#define BTN_ENC 63
493
#elif ENABLED(PANEL_ONE)
494
#define BTN_EN1 59 // AUX2 PIN 3
495
#define BTN_EN2 63 // AUX2 PIN 4
496
#define BTN_ENC 49 // AUX3 PIN 7
497
#else
498
#define BTN_EN1 37
499
#define BTN_EN2 35
500
#define BTN_ENC 31
501
#endif
502
503
#if ENABLED(G3D_PANEL)
504
#define SD_DETECT_PIN 49
505
//#define KILL_PIN 41
506
#endif
507
508
#endif
509
510
#endif // NEWPANEL
511
512
#endif
Prusa-Firmware-Buddy-Private1
lib
Marlin
Marlin
src
pins
ramps
pins_TT_OSCAR.h
Generated by
1.8.16