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