1
+ /**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016, 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
+
23
+ /**
24
+ * PRINTRBOARD_G2
25
+ *
26
+ */
27
+
28
+ #ifndef __SAM3X8E__
29
+ #error "Oops! Select 'Arduino Due' in 'Tools > Board.'"
30
+ #endif
31
+
32
+ #ifndef BOARD_NAME
33
+ #define BOARD_NAME "PRINTRBOARD_G2"
34
+ #endif
35
+
36
+ //
37
+ // Servos
38
+ //
39
+ //#define SERVO0_PIN
40
+ //#define SERVO1_PIN
41
+
42
+
43
+ //
44
+ // Limit Switches
45
+ //
46
+ #define X_MIN_PIN 22 // PB26
47
+ #define Y_MAX_PIN 18 // PA11
48
+ #define Z_MIN_PIN 19 // PA10
49
+
50
+
51
+ //
52
+ // Z Probe (when not Z_MIN_PIN)
53
+ //
54
+ #ifndef Z_MIN_PROBE_PIN
55
+ #define Z_MIN_PROBE_PIN 22
56
+ #endif
57
+
58
+ #ifndef FIL_RUNOUT_PIN
59
+ //#define FIL_RUNOUT_PIN 57 // PA22
60
+ #endif
61
+ #ifndef FIL_RUNOUT2_PIN
62
+ //#define FIL_RUNOUT2_PIN 21 // PB13
63
+ #endif
64
+
65
+ // PB12 NeoPixel pin
66
+ // D0_12 #REF! (INDICATOR_LED)
67
+ // B28 JTAG-CLK
68
+ // B31 JTAG_TMS /SWD_DIO
69
+ //A18 INTERRUPT_OUT
70
+ //A12 USART_RX not used
71
+ //A13 USART_TX not used
72
+ //A14 UART_RTS
73
+ //A15 UART_CTS
74
+ //PB2 Unassigned
75
+ //PB4 to PB9 Unassigned
76
+
77
+ //
78
+ // Steppers
79
+ //
80
+ #define Z_STEP_PIN 73 // PA21 MOTOR 1
81
+ #define Z_DIR_PIN 75 // PA26
82
+ #define Z_ENABLE_PIN 74 // PA25
83
+
84
+ #define X_STEP_PIN 66 // PB15 MOTOR 2
85
+ #define X_DIR_PIN 54 // PA16
86
+ #define X_ENABLE_PIN 67 // PB16
87
+
88
+ #define Y_STEP_PIN 34 // PA29 MOTOR 3
89
+ #define Y_DIR_PIN 35 // PB1
90
+ #define Y_ENABLE_PIN 36 // PB0
91
+
92
+ #define E0_STEP_PIN 53 // PB14 MOTOR 4
93
+ #define E0_DIR_PIN 78 // PB23
94
+ #define E0_ENABLE_PIN 37 // PB22
95
+
96
+
97
+ // Microstepping mode pins
98
+ #define Z_MS1_PIN 52 // PB21 MODE0 MOTOR 1
99
+ #define Z_MS2_PIN 52 // PB21 MODE1
100
+ #define Z_MS3_PIN 65 // PB20 MODE2
101
+
102
+ #define X_MS1_PIN 43 // PA20 MODE0 MOTOR 2
103
+ #define X_MS2_PIN 43 // PA20 MODE1
104
+ #define X_MS3_PIN 42 // PA19 MODE2
105
+
106
+ #define Y_MS1_PIN 77 // PA28 MODE0 MOTOR 3
107
+ #define Y_MS2_PIN 77 // PA28 MODE1
108
+ #define Y_MS3_PIN 76 // PA27 MODE2
109
+
110
+ #define E0_MS1_PIN 38 // PB11 MODE0 MOTOR 4
111
+ #define E0_MS2_PIN 38 // PB11 MODE1
112
+ #define E0_MS3_PIN 39 // PB10 MODE2
113
+
114
+
115
+ // Motor current PWM pins
116
+ #define MOTOR_CURRENT_PWM_X_PIN 62 // PB17 MOTOR 1
117
+ #define MOTOR_CURRENT_PWM_Z_PIN 63 // PB18 MOTOR 2
118
+ #define MOTOR_CURRENT_PWM_Y_PIN 64 // PB19 MOTOR 3
119
+ #define MOTOR_CURRENT_PWM_E_PIN 61 // PA2 MOTOR 4
120
+
121
+ #define DEFAULT_PWM_MOTOR_CURRENT { 300, 400, 1000} // XY Z E0, 1000 = 1000mAh
122
+
123
+ //
124
+ // Temperature Sensors
125
+ //
126
+ #define TEMP_0_PIN 2 // digital 56// was 58 // PA23 VERIFIED
127
+ #define TEMP_BED_PIN 5 // digital 59 // was 61 // PA4 VERIFIED
128
+
129
+ //
130
+ // Heaters / Fans
131
+ //
132
+ #define HEATER_0_PIN 40 // G2 says PA5 DO_1
133
+ #define HEATER_BED_PIN 41 // G2 says PB24 DO_11
134
+
135
+ #ifndef FAN_PIN
136
+ #define FAN_PIN 13 // PB27 DO_4 Fan1A
137
+ #endif
138
+ #define FAN1_PIN 58 // was 60 // PA6 DO_3 Fan1B
139
+
140
+ #define FET_SAFETY_PIN 31 // PA7 must be pulsed low every 50 mS or FETs are turned off
141
+ #define FET_SAFETY_DELAY 50 // 50 mS delay between pulses
142
+ #define FET_SAFETY_INVERTED true // true - negative going pulse of 2 uS
143
+
144
+
145
+ /////////////////////////////////////////////////////////
146
+
147
+
148
+ #define MISO_PIN 0 // set them to unused pins for now
149
+ #define MOSI_PIN 1 // set them to unused pins for now
150
+ #define SCK_PIN 2 // set them to unused pins for now
151
+ #define SDSS 3 // set them to unused pins for now
152
+
153
+
154
+
155
+ /**
156
+ * G2 uses 8 pins that are not available in the DUE environment:
157
+ * 34 PA29 - Y_STEP_PIN
158
+ * 35 PB1 - Y_DIR_PIN
159
+ * 36 PB0 - Y_ENABLE_PIN
160
+ * 37 PB22 - E0_ENABLE_PIN
161
+ * 38 PB11 - E0_MS1_PIN - normally used by the USB native port
162
+ * 39 PB10 - E0_MS3_PIN - normally used by the USB native port
163
+ * 40 PA5 - HEATER_0_PIN
164
+ * 41 PB24 - HEATER_BED_PIN
165
+ *
166
+ * None of these are in the arduino_due_x variant so digitalWrite and digitalRead can't be used on them.
167
+ *
168
+ * They can be accessed via FASTIO functions WRITE, READ, OUT_WRITE, OUTPUT, ...
169
+ *
170
+ */
0 commit comments