Prusa MINI Firmware overview
pins_BEAST.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 #if !defined(__STM32F1__) && !defined(__STM32F4__)
25  #error "Oops! Select an STM32F1/4 board in 'Tools > Board.'"
26 #endif
27 
28 /**
29  * 21017 Victor Perez Marlin for stm32f1 test
30  */
31 
32 #define BOARD_INFO_NAME "Beast STM32"
33 #define DEFAULT_MACHINE_NAME "STM32F103RET6"
34 
35 // Enable I2C_EEPROM for testing
36 #define I2C_EEPROM
37 
38 // Ignore temp readings during development.
39 //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
40 
41 //
42 // Steppers
43 //
44 #define X_STEP_PIN PE0
45 #define X_DIR_PIN PE1
46 #define X_ENABLE_PIN PC0
47 #define X_MIN_PIN PD5
48 #define X_MAX_PIN -1
49 
50 #define Y_STEP_PIN PE2
51 #define Y_DIR_PIN PE3
52 #define Y_ENABLE_PIN PC1
53 #define Y_MIN_PIN PD6
54 #define Y_MAX_PIN
55 
56 #define Z_STEP_PIN PE4
57 #define Z_DIR_PIN PE5
58 #define Z_ENABLE_PIN PC2
59 #define Z_MIN_PIN PD7
60 #define Z_MAX_PIN -1
61 
62 #define Y2_STEP_PIN -1
63 #define Y2_DIR_PIN -1
64 #define Y2_ENABLE_PIN -1
65 
66 #define Z2_STEP_PIN -1
67 #define Z2_DIR_PIN -1
68 #define Z2_ENABLE_PIN -1
69 
70 #define E0_STEP_PIN PE6
71 #define E0_DIR_PIN PE7
72 #define E0_ENABLE_PIN PC3
73 
74 /**
75  * TODO: Currently using same Enable pin to all steppers.
76  */
77 
78 #define E1_STEP_PIN PE8
79 #define E1_DIR_PIN PE9
80 #define E1_ENABLE_PIN PC4
81 
82 #define E2_STEP_PIN PE10
83 #define E2_DIR_PIN PE11
84 #define E2_ENABLE_PIN PC5
85 
86 //
87 // Misc. Functions
88 //
89 #define SDSS PA15
90 #define LED_PIN PB2
91 
92 #define PS_ON_PIN -1
93 #define KILL_PIN -1
94 
95 //
96 // Heaters / Fans
97 //
98 #define HEATER_0_PIN PD12 // EXTRUDER 1
99 #define HEATER_1_PIN PD13
100 #define HEATER_2_PIN PD14
101 
102 #define HEATER_BED_PIN PB9 // BED
103 #define HEATER_BED2_PIN -1 // BED2
104 #define HEATER_BED3_PIN -1 // BED3
105 
106 #ifndef FAN_PIN
107  #define FAN_PIN PB10
108 #endif
109 
110 #define FAN_SOFT_PWM
111 
112 //
113 // Temperature Sensors
114 //
115 #define TEMP_BED_PIN PA0 // Analog Input
116 #define TEMP_0_PIN PA1 // Analog Input
117 #define TEMP_1_PIN PA2 // Analog Input
118 #define TEMP_2_PIN PA3 // Analog Input
119 
120 //
121 // LCD Pins
122 //
123 #if HAS_SPI_LCD
124 
125  #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
126  #define LCD_PINS_RS 49 // CS chip select /SS chip slave select
127  #define LCD_PINS_ENABLE 51 // SID (MOSI)
128  #define LCD_PINS_D4 52 // SCK (CLK) clock
129  #elif BOTH(NEWPANEL, PANEL_ONE)
130  #define LCD_PINS_RS PB8
131  #define LCD_PINS_ENABLE PD2
132  #define LCD_PINS_D4 PB12
133  #define LCD_PINS_D5 PB13
134  #define LCD_PINS_D6 PB14
135  #define LCD_PINS_D7 PB15
136  #else
137  #define LCD_PINS_RS PB8
138  #define LCD_PINS_ENABLE PD2
139  #define LCD_PINS_D4 PB12
140  #define LCD_PINS_D5 PB13
141  #define LCD_PINS_D6 PB14
142  #define LCD_PINS_D7 PB15
143  #if DISABLED(NEWPANEL)
144  #define BEEPER_PIN 33
145  // Buttons attached to a shift register
146  // Not wired yet
147  //#define SHIFT_CLK 38
148  //#define SHIFT_LD 42
149  //#define SHIFT_OUT 40
150  //#define SHIFT_EN 17
151  #endif
152  #endif
153 
154  #if ENABLED(NEWPANEL)
155 
156  #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
157 
158  #define BEEPER_PIN 37
159 
160  #define BTN_EN1 31
161  #define BTN_EN2 33
162  #define BTN_ENC 35
163 
164  #define SD_DETECT_PIN 49
165  #define KILL_PIN 41
166 
167  #if ENABLED(BQ_LCD_SMART_CONTROLLER)
168  #define LCD_BACKLIGHT_PIN 39
169  #endif
170 
171  #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
172 
173  #define BTN_EN1 64
174  #define BTN_EN2 59
175  #define BTN_ENC 63
176  #define SD_DETECT_PIN 42
177 
178  #elif ENABLED(LCD_I2C_PANELOLU2)
179 
180  #define BTN_EN1 47
181  #define BTN_EN2 43
182  #define BTN_ENC 32
183  #define LCD_SDSS 53
184  #define SD_DETECT_PIN -1
185  #define KILL_PIN 41
186 
187  #elif ENABLED(LCD_I2C_VIKI)
188 
189  #define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
190  #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
191 
192  #define BTN_ENC -1
193  #define LCD_SDSS 53
194  #define SD_DETECT_PIN 49
195 
196  #elif ANY(VIKI2, miniVIKI)
197 
198  #define BEEPER_PIN 33
199 
200  // Pins for DOGM SPI LCD Support
201  #define DOGLCD_A0 44
202  #define DOGLCD_CS 45
203  #define LCD_SCREEN_ROT_180
204 
205  #define BTN_EN1 22
206  #define BTN_EN2 7
207  #define BTN_ENC 39
208 
209  #define SDSS 53
210  #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
211 
212  #define KILL_PIN 31
213 
214  #define STAT_LED_RED_PIN 32
215  #define STAT_LED_BLUE_PIN 35
216 
217  #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
218 
219  #define BTN_EN1 35
220  #define BTN_EN2 37
221  #define BTN_ENC 31
222  #define SD_DETECT_PIN 49
223  #define LCD_SDSS 53
224  #define KILL_PIN 41
225  #define BEEPER_PIN 23
226  #define DOGLCD_CS 29
227  #define DOGLCD_A0 27
228  #define LCD_BACKLIGHT_PIN 33
229 
230  #elif ENABLED(MINIPANEL)
231 
232  #define BEEPER_PIN 42
233  // Pins for DOGM SPI LCD Support
234  #define DOGLCD_A0 44
235  #define DOGLCD_CS 66
236  #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
237  #define SDSS 53
238 
239  #define KILL_PIN 64
240  // GLCD features
241  // Uncomment screen orientation
242  //#define LCD_SCREEN_ROT_90
243  //#define LCD_SCREEN_ROT_180
244  //#define LCD_SCREEN_ROT_270
245  // The encoder and click button
246  #define BTN_EN1 40
247  #define BTN_EN2 63
248  #define BTN_ENC 59
249  // not connected to a pin
250  #define SD_DETECT_PIN 49
251 
252  #else
253 
254  // Beeper on AUX-4
255  #define BEEPER_PIN 33
256 
257  // Buttons directly attached to AUX-2
258  #if ENABLED(REPRAPWORLD_KEYPAD)
259  #define BTN_EN1 64
260  #define BTN_EN2 59
261  #define BTN_ENC 63
262  #define SHIFT_OUT 40
263  #define SHIFT_CLK 44
264  #define SHIFT_LD 42
265  #elif ENABLED(PANEL_ONE)
266  #define BTN_EN1 59 // AUX2 PIN 3
267  #define BTN_EN2 63 // AUX2 PIN 4
268  #define BTN_ENC 49 // AUX3 PIN 7
269  #else
270  #define BTN_EN1 37
271  #define BTN_EN2 35
272  #define BTN_ENC 31
273  #endif
274 
275  #if ENABLED(G3D_PANEL)
276  #define SD_DETECT_PIN 49
277  #define KILL_PIN 41
278  #else
279  //#define SD_DETECT_PIN -1 // Ramps doesn't use this
280  #endif
281 
282  #endif
283  #endif // NEWPANEL
284 
285 #endif // HAS_SPI_LCD