Prusa MINI Firmware overview
pins_ARMED.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 #ifndef STM32F4
25  #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
26 #elif HOTENDS > 2 || E_STEPPERS > 2
27  #error "Arm'ed supports up to 2 hotends / E-steppers."
28 #endif
29 
30 #ifndef ARMED_V1_0
31  #define ARMED_V1_1
32 #endif
33 
34 #undef BOARD_INFO_NAME // Defined on the command line by Arduino Core STM32
35 #define BOARD_INFO_NAME "Arm'ed"
36 #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
37 
38 #define I2C_EEPROM
39 
40 #undef E2END // Defined in Arduino Core STM32 to be used with EEPROM emulation. This board uses a real EEPROM.
41 #define E2END 0xFFF // 4KB
42 
43 //
44 // Limit Switches
45 //
46 #define X_STOP_PIN PE0
47 #define Y_STOP_PIN PE1
48 #define Z_STOP_PIN PE14
49 
50 //
51 // Z Probe (when not Z_MIN_PIN)
52 //
53 //#ifndef Z_MIN_PROBE_PIN
54 // #define Z_MIN_PROBE_PIN PA4
55 //#endif
56 
57 //
58 // Filament Runout Sensor
59 //
60 #ifndef FIL_RUNOUT_PIN
61  #define FIL_RUNOUT_PIN PA3
62 #endif
63 
64 //
65 // Steppers
66 //
67 
68 #ifdef ARMED_SWAP_X_E1
69  #define X_STEP_PIN PE4
70  #define X_DIR_PIN PE2
71  #define X_ENABLE_PIN PE3
72  #define X_CS_PIN PE5
73 #else
74  #define X_STEP_PIN PD3
75  #define X_DIR_PIN PD2
76  #define X_ENABLE_PIN PD0
77  #define X_CS_PIN PD1
78 #endif
79 
80 #define Y_STEP_PIN PE11
81 #define Y_DIR_PIN PE10
82 #define Y_ENABLE_PIN PE13
83 #define Y_CS_PIN PE12
84 
85 #define Z_STEP_PIN PD6
86 #define Z_DIR_PIN PD7
87 #define Z_ENABLE_PIN PD4
88 #define Z_CS_PIN PD5
89 
90 #define E0_STEP_PIN PB5
91 #define E0_DIR_PIN PB6
92 #ifdef ARMED_V1_1
93  #define E0_ENABLE_PIN PC12
94 #else
95  #define E0_ENABLE_PIN PB3
96 #endif
97 #define E0_CS_PIN PB4
98 
99 #ifdef ARMED_SWAP_X_E1
100  #define E1_STEP_PIN PD3
101  #define E1_DIR_PIN PD2
102  #define E1_ENABLE_PIN PD0
103  #define E1_CS_PIN PD1
104 #else
105  #define E1_STEP_PIN PE4
106  #define E1_DIR_PIN PE2
107  #define E1_ENABLE_PIN PE3
108  #define E1_CS_PIN PE5
109 #endif
110 
111 //
112 // Temperature Sensors
113 //
114 #define TEMP_0_PIN PC0 // Analog Input
115 #define TEMP_1_PIN PC1 // Analog Input
116 #define TEMP_BED_PIN PC2 // Analog Input
117 
118 //
119 // Heaters / Fans
120 //
121 #define HEATER_0_PIN PA1 // Hardware PWM
122 #define HEATER_1_PIN PA2 // Hardware PWM
123 #define HEATER_BED_PIN PA0 // Hardware PWM
124 
125 #define FAN_PIN PC6 // Hardware PWM, Part cooling fan
126 #define FAN1_PIN PC7 // Hardware PWM, Extruder fan
127 #define FAN2_PIN PC8 // Hardware PWM, Controller fan
128 
129 //
130 // Misc functions
131 //
132 #define SDSS PE7
133 #define LED_PIN PB7 // Heart beat
134 #define PS_ON_PIN PA10
135 #define KILL_PIN PA8
136 #define PWR_LOSS PA4 // Power loss / nAC_FAULT
137 
138 //
139 // LCD / Controller
140 //
141 #define SD_DETECT_PIN PA15
142 #define BEEPER_PIN PC9
143 
144 #if ENABLED(FYSETC_MINI_12864)
145  //
146  // See https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
147  //
148  #define DOGLCD_A0 PE9
149  #define DOGLCD_CS PE8
150 
151  #define LCD_BACKLIGHT_PIN -1
152 
153  #define LCD_RESET_PIN PB12 // Must be high or open for LCD to operate normally.
154 
155  #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
156  #ifndef RGB_LED_R_PIN
157  #define RGB_LED_R_PIN PB13
158  #endif
159  #ifndef RGB_LED_G_PIN
160  #define RGB_LED_G_PIN PB14
161  #endif
162  #ifndef RGB_LED_B_PIN
163  #define RGB_LED_B_PIN PB15
164  #endif
165  #elif ENABLED(FYSETC_MINI_12864_2_1)
166  #define NEOPIXEL_PIN PB13
167  #endif
168 #else
169  #define LCD_PINS_RS PE9
170  #define LCD_PINS_ENABLE PE8
171  #define LCD_PINS_D4 PB12
172  #define LCD_PINS_D5 PB13
173  #define LCD_PINS_D6 PB14
174  #define LCD_PINS_D7 PB15
175 
176  #if ENABLED(MKS_MINI_12864)
177  #define DOGLCD_CS PB13
178  #define DOGLCD_A0 PB14
179  #endif
180 #endif
181 
182 #define BTN_EN1 PC4
183 #define BTN_EN2 PC5
184 #define BTN_ENC PC3
185 
186 //
187 // Extension pins
188 //
189 #define EXT0_PIN PB0
190 #define EXT1_PIN PB1
191 #define EXT2_PIN PB2
192 #define EXT3_PIN PD8
193 #define EXT4_PIN PD9
194 #define EXT5_PIN PD10
195 #define EXT6_PIN PD11
196 #define EXT7_PIN PD12
197 #define EXT8_PIN PB10
198 #define EXT9_PIN PB11