Prusa MINI Firmware overview
pins_ULTIMAKER.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  * Ultimaker pin assignments
26  */
27 
28 /**
29  * Rev B 2 JAN 2017
30  *
31  * Added pin definitions for:
32  * M3, M4 & M5 spindle control commands
33  * case light
34  */
35 
36 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
37  #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
38 #endif
39 
40 #define BOARD_INFO_NAME "Ultimaker"
41 #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
42 #define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
43 
44 //
45 // Servos
46 //
47 #define SERVO0_PIN 11
48 
49 //
50 // Limit Switches
51 //
52 #define X_MIN_PIN 22
53 #define X_MAX_PIN 24
54 #define Y_MIN_PIN 26
55 #define Y_MAX_PIN 28
56 #define Z_MIN_PIN 30
57 #define Z_MAX_PIN 32
58 
59 //
60 // Z Probe (when not Z_MIN_PIN)
61 //
62 #ifndef Z_MIN_PROBE_PIN
63  #define Z_MIN_PROBE_PIN 32
64 #endif
65 
66 //
67 // Steppers
68 //
69 #define X_STEP_PIN 25
70 #define X_DIR_PIN 23
71 #define X_ENABLE_PIN 27
72 
73 #define Y_STEP_PIN 31
74 #define Y_DIR_PIN 33
75 #define Y_ENABLE_PIN 29
76 
77 #define Z_STEP_PIN 37
78 #define Z_DIR_PIN 39
79 #define Z_ENABLE_PIN 35
80 
81 #define E0_STEP_PIN 43
82 #define E0_DIR_PIN 45
83 #define E0_ENABLE_PIN 41
84 
85 #define E1_STEP_PIN 49
86 #define E1_DIR_PIN 47
87 #define E1_ENABLE_PIN 48
88 
89 //
90 // Temperature Sensors
91 //
92 #define TEMP_0_PIN 8 // Analog Input
93 #define TEMP_1_PIN 9 // Analog Input
94 #define TEMP_BED_PIN 10 // Analog Input
95 
96 //
97 // Heaters / Fans
98 //
99 #define HEATER_0_PIN 2
100 #define HEATER_1_PIN 3
101 #define HEATER_BED_PIN 4
102 
103 #ifndef FAN_PIN
104  #define FAN_PIN 7
105 #endif
106 
107 //
108 // Misc. Functions
109 //
110 #define SDSS 53
111 #define LED_PIN 13
112 #define PS_ON_PIN 12
113 #define SUICIDE_PIN 54 // PIN that has to be turned on right after start, to keep power flowing.
114 #define CASE_LIGHT_PIN 8
115 
116 //
117 // LCD / Controller
118 //
119 #if HAS_SPI_LCD
120 
121  #define BEEPER_PIN 18
122 
123  #if ENABLED(NEWPANEL)
124 
125  #define LCD_PINS_RS 20
126  #define LCD_PINS_ENABLE 17
127  #define LCD_PINS_D4 16
128  #define LCD_PINS_D5 21
129  #define LCD_PINS_D6 5
130  #define LCD_PINS_D7 6
131 
132  // Buttons directly attached
133  #define BTN_EN1 40
134  #define BTN_EN2 42
135  #define BTN_ENC 19
136 
137  #define SD_DETECT_PIN 38
138 
139  #else // !NEWPANEL - Old style panel with shift register
140 
141  // Buttons attached to a shift register
142  #define SHIFT_CLK 38
143  #define SHIFT_LD 42
144  #define SHIFT_OUT 40
145  #define SHIFT_EN 17
146 
147  #define LCD_PINS_RS 16
148  #define LCD_PINS_ENABLE 5
149  #define LCD_PINS_D4 6
150  #define LCD_PINS_D5 21
151  #define LCD_PINS_D6 20
152  #define LCD_PINS_D7 19
153 
154  #define SD_DETECT_PIN -1
155 
156  #endif // !NEWPANEL
157 
158 #endif // HAS_SPI_LCD
159 
160 //
161 // M3/M4/M5 - Spindle/Laser Control
162 //
163 #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
164 #define SPINDLE_LASER_ENA_PIN 10 // Pullup!
165 #define SPINDLE_DIR_PIN 11 // use the EXP3 PWM header