Prusa MINI Firmware overview
pins_TRONXY_V3_1_0.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  * Arduino Mega for Tronxy X5S-2E, etc.
26  */
27 
28 #ifndef __AVR_ATmega2560__
29  #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
30 #elif HOTENDS > 2 || E_STEPPERS > 2
31  #error "TRONXY-V3-1.0 supports only 2 hotends/E-steppers. Comment out this line to continue."
32 #endif
33 
34 #define BOARD_INFO_NAME "TRONXY-V3-1.0"
35 
36 //
37 // Servos
38 //
39 #define SERVO1_PIN 12 // 2560 PIN 25/PB6
40 
41 //
42 // Import RAMPS 1.4 pins
43 //
44 #include "pins_RAMPS.h"
45 
46 /**
47  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
48  *
49  * ===== AUX-1 connector =====
50  *
51  * 2 4 6 8
52  * #----------------#
53  * #2 | ° ° ° ° |
54  * #1 | ° ° ° ° |
55  * NOTCH #------ ------#
56  * 1 3 5 7
57  *
58  * ###################################
59  * # Pin | ATMEGA2560 Pin | Arduino #
60  * ###################################
61  * # 1 | VCC | + #
62  * # 2 | VCC | + #
63  * # 3 | GND | - #
64  * # 4 | GND | - #
65  * # 5 | N/C | #
66  * # 6 | 3 / PE1 (TXD0) | D1 #
67  * # 7 | N/C | #
68  * # 8 | 2 / PE0 (RXD0) | D0 #
69  * ###################################
70  *
71  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
72  *
73  * ===== Limit Switch connectors =====
74  *
75  * ############## X+ #################
76  * X+ # Pin | ATMEGA2560 Pin | Arduino #
77  * 1 2 3 ###################################
78  * #- --- -# # 1 | 6 / PE4 (INT4) | D2 #
79  * | ° ° ° | # 2 | GND | - #
80  * #-------# # 3 | VCC | + #
81  * ###################################
82  *
83  * ############## X- #################
84  * X- # Pin | ATMEGA2560 Pin | Arduino #
85  * 1 2 3 ###################################
86  * #- --- -# # 1 | 7 / PE5 (INT5) | D3 #
87  * | ° ° ° | # 2 | GND | - #
88  * #-------# # 3 | VCC | + #
89  * ###################################
90  *
91  * ############## Y+ #################
92  * Y+ # Pin | ATMEGA2560 Pin | Arduino #
93  * 1 2 3 ###################################
94  * #- --- -# # 1 | 63/PJ0 (PCINT9) | D15 #
95  * | ° ° ° | # 2 | GND | - #
96  * #-------# # 3 | VCC | + #
97  * ###################################
98  *
99  * ############## Y- #################
100  * Y- # Pin | ATMEGA2560 Pin | Arduino #
101  * 1 2 3 ###################################
102  * #- --- -# # 1 | 64/PJ1 (PCINT10)| D14 #
103  * | ° ° ° | # 2 | GND | - #
104  * #-------# # 3 | VCC | + #
105  * ###################################
106  *
107  * ############## Z+ #################
108  * Z+ # Pin | ATMEGA2560 Pin | Arduino #
109  * 1 2 3 ###################################
110  * #- --- -# # 1 | 45 / PD2 (INT2) | D19 #
111  * | ° ° ° | # 2 | GND | - #
112  * #-------# # 3 | VCC | + #
113  * ###################################
114  *
115  * ############## Z- #################
116  * Z- # Pin | ATMEGA2560 Pin | Arduino #
117  * 1 2 3 ###################################
118  * #- --- -# # 1 | 46 / PD3 (INT3) | D18 #
119  * | ° ° ° | # 2 | GND | - #
120  * #-------# # 3 | VCC | + #
121  * ###################################
122  *
123  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
124  *
125  * ===== EXP1/EXP2 connectors =====
126  *
127  * (NOTE ORDER) EXP2 EXP1
128  * 2 4 6 8 10 2 4 6 8 10
129  * #-------------------# #-------------------#
130  * #2 | ° ° ° ° ° | #2 | ° ° ° ° ° |
131  * #1 | ° ° ° ° ° | #1 | ° ° ° ° ° |
132  * NOTCH #-------- -------# NOTCH #-------- -------#
133  * 1 3 5 7 9 1 3 5 7 9
134  *
135  * ############# EXP1 ################
136  * # Pin | ATMEGA2560 Pin | Arduino #
137  * ###################################
138  * # 1 | 53 / PC0 | D37 #
139  * # 2 | 55 / PC2 | D35 #
140  * # 3 | 12 / PH0 (RXD2) | D17 #
141  * # 4 | 13 / PH1 (TXD2) | D16 #
142  * # 5 | 77 / PA1 | D23 #
143  * # 6 | 75 / PA3 | D25 #
144  * # 7 | 73 / PA5 | D27 #
145  * # 8 | 71 / PA7 | D29 #
146  * # 9 | GND | - #
147  * # 10 | VCC | + #
148  * ###################################
149  *
150  * ############# EXP2 ################
151  * # Pin | ATMEGA2560 Pin | Arduino #
152  * ###################################
153  * # 1 | 22 / PB3 (MISO) | D50 #
154  * # 2 | 20 / PB1 (SCK) | D52 #
155  * # 3 | 59 / PC6 | D31 #
156  * # 4 | N/C | #
157  * # 5 | 57 / PC4 | D33 #
158  * # 6 | 21 / PB2 (MOSI) | D51 #
159  * # 7 | N/C | #
160  * # 8 | 30 / !RESET | RESET #
161  * # 9 | GND | - #
162  * # 10 | 51 / PG0 | D41 #
163  * ###################################
164  *
165  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
166  *
167  * ===== ICSP connector =====
168  *
169  * 2 4 6
170  * #---------#
171  * | ° ° ° |
172  * | ° ° ° |
173  * #---------#
174  * 1 3 5
175  *
176  * ##################################
177  * # Pin | ATMEGA2560 Pin | Arduino #
178  * ##################################
179  * # 1 | 22 / PB3 (MISO)| 50 #
180  * # 2 | VCC | + #
181  * # 3 | 20 / PB1 (SCK) | 52 #
182  * # 4 | 21 / PB2 (MOSI)| 51 #
183  * # 5 | 30 / !RESET | RESET #
184  * # 6 | GND | - #
185  * ##################################
186  *
187  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
188  *
189  * ===== SERVOS connector =====
190  *
191  * 2 4 6
192  * #---------#
193  * | ° ° ° |
194  * | ° ° ° |
195  * #---------#
196  * 1 3 5
197  *
198  * ##################################
199  * # Pin | ATMEGA2560 Pin | Arduino #
200  * ##################################
201  * # 1 | 25 / PB6 (OC1B)| D12 #
202  * # 2 | 24 / PB5 (OC1A)| D11 #
203  * # 3 | GND | - #
204  * # 4 | GND | - #
205  * # 5 | VCC | + #
206  * # 6 | VCC | + #
207  * ##################################
208  *
209  * NOTE: Pins 1 and 2 are the ones closest to the "L" and "PWR" LEDs.
210  *
211  * NOTE: Check servo wiring before connecting, for example:
212  * + Airtronics (non-Z) use: Red = +; Black = -; Black & White, White or Orange = signal.
213  * + Airtronics-Z use: Red = +; Black = -; Blue = signal.
214  * + Futaba use: Red = +; Black = -; White = signal.
215  * + Hitec use: Red = +; Black = -; Yellow = signal.
216  * + JR use: Red = +; Brown = -; Orange = signal.
217  *
218  * NOTE: Test your servo limits:
219  * Due to effects of component tolerances and/or age, the usable range of S-values for individual servos may be less than the settable 0-255 range. For example:
220  * 1. One servo may have a fully usable range of M280 P0 S0 through M280 P0 S255.
221  * 2. A different servo (of the same brand and model) may have a usable range of only M280 P0 S0 through M280 P0 S165 after which you experience binding.
222  *
223  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
224  *
225  * ===== Thermistor connectors =====
226  *
227  * (NOTE ORDER) TH2 TH1 TB
228  * 1 2 1 2 1 2
229  * #- -# #- -# #- -#
230  * | ° ° | | ° ° | | ° ° |
231  * #-----# #-----# #-----#
232  *
233  * ############## TB #################
234  * # Pin | ATMEGA2560 Pin | Arduino #
235  * ###################################
236  * # 1 | GND | - #
237  * # 2 | 83 / PK6 (ADC14)| A14 #
238  * ###################################
239  *
240  * ############## TH1 ################
241  * # Pin | ATMEGA2560 Pin | Arduino #
242  * ###################################
243  * # 1 | GND | - #
244  * # 2 | 84 / PK5 (ADC13)| A13 #
245  * ###################################
246  *
247  * ############## TH2 ################
248  * # Pin | ATMEGA2560 Pin | Arduino #
249  * ###################################
250  * # 1 | GND | - #
251  * # 2 | 82 / PK7 (ADC15)| A15 #
252  * ###################################
253  *
254  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
255  *
256  * ===== XS3 connector =====
257  *
258  * 2 4 6
259  * #---------#
260  * | ° ° ° |
261  * | ° ° ° |
262  * #---------#
263  * 1 3 5
264  *
265  * ##################################
266  * # Pin | ATMEGA2560 Pin | Arduino #
267  * ##################################
268  * # 1 | 85 / ADC12 | A12 #
269  * # 2 | 86 / ADC11 | A11 #
270  * # 3 | GND | - #
271  * # 4 | GND | - #
272  * # 5 | VCC | + #
273  * # 6 | VCC | + #
274  * ##################################
275  *
276  * NOTE: Pins 1 and 2 are the ones closest to the "L" and "PWR" LEDs.
277  *
278  * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
279  */
pins_RAMPS.h