Prusa MINI Firmware overview
pins_COHESION3D_MINI.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  * Cohesion3D Mini pin assignments
26  */
27 
28 #ifndef LPC1769
29  #error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
30 #endif
31 
32 #define BOARD_INFO_NAME "Cohesion3D Mini"
33 
34 //
35 // Servos
36 //
37 #define SERVO0_PIN P1_23
38 
39 //
40 // Limit Switches
41 //
42 #define X_MIN_PIN P1_24 // 10k pullup to 3.3V
43 #define X_MAX_PIN P1_25 // 10k pullup to 3.3V
44 #define Y_MIN_PIN P1_26 // 10k pullup to 3.3V
45 #define Y_MAX_PIN P1_27 // 10k pullup to 3.3V
46 #define Z_MIN_PIN P1_28 // 10k pullup to 3.3V
47 #define Z_MAX_PIN P1_29 // 10k pullup to 3.3V
48 
49 //
50 // Steppers
51 //
52 #define X_STEP_PIN P2_00
53 #define X_DIR_PIN P0_05
54 #define X_ENABLE_PIN P0_04
55 #define X_CS_PIN P1_10 // Ethernet Expansion - Pin 9
56 
57 #define Y_STEP_PIN P2_01
58 #define Y_DIR_PIN P0_11
59 #define Y_ENABLE_PIN P0_10
60 #define Y_CS_PIN P1_09 // Ethernet Expansion - Pin 10
61 
62 #define Z_STEP_PIN P2_02
63 #define Z_DIR_PIN P0_20
64 #define Z_ENABLE_PIN P0_19
65 #define Z_CS_PIN P1_00 // Ethernet Expansion - Pin 11
66 
67 #define E0_STEP_PIN P2_03
68 #define E0_DIR_PIN P0_22
69 #define E0_ENABLE_PIN P0_21
70 #define E0_CS_PIN P1_04 // Ethernet Expansion - Pin 12
71 
72 //
73 // Default pins for TMC software SPI
74 //
75 #if ENABLED(TMC_USE_SW_SPI)
76  #ifndef TMC_SW_MOSI
77  #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5
78  #endif
79  #ifndef TMC_SW_MISO
80  #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6
81  #endif
82  #ifndef TMC_SW_SCK
83  #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7
84  #endif
85 #endif
86 
87 //
88 // Analog Inputs
89 // 3.3V max when defined as an analog input
90 //
91 #define TEMP_0_PIN 0 // P0_23
92 #define TEMP_BED_PIN 1 // P0_24
93 
94 //
95 // Heaters / Fans
96 //
97 #define HEATER_BED_PIN P2_05
98 #define HEATER_0_PIN P2_07 // FET 1
99 #ifndef FAN_PIN
100  #define FAN_PIN P2_06 // FET 3
101 #endif
102 
103 //
104 // Auto fans
105 //
106 #define AUTO_FAN_PIN P2_04 // FET 4
107 
108 #define ORIG_E0_AUTO_FAN_PIN AUTO_FAN_PIN
109 #define ORIG_E1_AUTO_FAN_PIN AUTO_FAN_PIN
110 #define ORIG_E2_AUTO_FAN_PIN AUTO_FAN_PIN
111 
112 //
113 // Misc. Functions
114 //
115 #define LED_PIN P4_28 // Play LED
116 
117 //
118 // M3/M4/M5 - Spindle/Laser Control
119 //
120 #if HAS_CUTTER
121  #undef HEATER_0_PIN
122  #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1
123  #undef HEATER_BED_PIN
124  #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET
125  #undef FAN_PIN
126  #define SPINDLE_DIR_PIN P2_06 // FET 3
127 #endif
128 
129 //
130 // LCD / Controller
131 //
132 // LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
133 // defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
134 //
135 // A remote SD card is currently not supported because the pins routed to the EXP2
136 // connector are shared with the onboard SD card, and Marlin does not support reading
137 // G-code files from the onboard SD card.
138 //
139 #if HAS_SPI_LCD
140 
141  #define BEEPER_PIN P0_27 // EXP2-7 - open drain
142 
143  #define BTN_EN1 P3_26 // EXP2-5
144  #define BTN_EN2 P3_25 // EXP2-3
145  #define BTN_ENC P1_30 // EXP1-2
146 
147  #define LCD_PINS_RS P0_16 // EXP1-4
148  #define LCD_SDSS P0_28 // EXP2-4
149  #define LCD_PINS_ENABLE P0_18 // EXP1-3
150  #define LCD_PINS_D4 P0_15 // EXP1-5
151 
152  #define KILL_PIN P2_11 // EXP2-10
153 
154  #if ENABLED(SDSUPPORT)
155  #error "SDSUPPORT is not currently supported by the Cohesion3D boards"
156  #endif
157 
158 #endif // HAS_SPI_LCD
159 
160 //
161 // Ethernet pins
162 //
163 #define ENET_MDIO P1_17
164 #define ENET_RX_ER P1_14
165 #define ENET_RXD1 P1_10
166 #define ENET_MOC P1_16
167 #define REF_CLK P1_15
168 #define ENET_RXD0 P1_09
169 #define ENET_CRS P1_08
170 #define ENET_TX_EN P1_04
171 #define ENET_TXD0 P1_00
172 #define ENET_TXD1 P1_01