Subversion Repositories Tronxy-X3A-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ron 1
/**
2
 * Marlin 3D Printer Firmware
3
 * Copyright (C) 2016 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
 * Ultimaker pin assignments
25
 */
26
 
27
/**
28
 * Rev B   2 JAN 2017
29
 *
30
 *  Added pin definitions for:
31
 *    M3, M4 & M5 spindle control commands
32
 *    case light
33
 */
34
 
35
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
36
  #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
37
#endif
38
 
39
#define DEFAULT_MACHINE_NAME    "Ultimaker"
40
#define DEFAULT_SOURCE_CODE_URL "https://github.com/Ultimaker/Marlin"
41
#define BOARD_NAME              "Ultimaker"
42
 
43
//
44
// Servos
45
//
46
#define SERVO0_PIN         11
47
 
48
//
49
// Limit Switches
50
//
51
#define X_MIN_PIN          22
52
#define X_MAX_PIN          24
53
#define Y_MIN_PIN          26
54
#define Y_MAX_PIN          28
55
#define Z_MIN_PIN          30
56
#define Z_MAX_PIN          32
57
 
58
//
59
// Z Probe (when not Z_MIN_PIN)
60
//
61
#ifndef Z_MIN_PROBE_PIN
62
  #define Z_MIN_PROBE_PIN  32
63
#endif
64
 
65
//
66
// Steppers
67
//
68
#define X_STEP_PIN         25
69
#define X_DIR_PIN          23
70
#define X_ENABLE_PIN       27
71
 
72
#define Y_STEP_PIN         31
73
#define Y_DIR_PIN          33
74
#define Y_ENABLE_PIN       29
75
 
76
#define Z_STEP_PIN         37
77
#define Z_DIR_PIN          39
78
#define Z_ENABLE_PIN       35
79
 
80
#define E0_STEP_PIN        43
81
#define E0_DIR_PIN         45
82
#define E0_ENABLE_PIN      41
83
 
84
#define E1_STEP_PIN        49
85
#define E1_DIR_PIN         47
86
#define E1_ENABLE_PIN      48
87
 
88
//
89
// Temperature Sensors
90
//
91
#define TEMP_0_PIN          8   // Analog Input
92
#define TEMP_1_PIN          9   // Analog Input
93
#define TEMP_BED_PIN       10   // Analog Input
94
 
95
//
96
// Heaters / Fans
97
//
98
#define HEATER_0_PIN        2
99
#define HEATER_1_PIN        3
100
#define HEATER_BED_PIN      4
101
 
102
#ifndef FAN_PIN
103
  #define FAN_PIN           7
104
#endif
105
 
106
//
107
// Misc. Functions
108
//
109
#define SDSS               53
110
#define LED_PIN            13
111
#define PS_ON_PIN          12
112
#define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.
113
#define CASE_LIGHT_PIN      8
114
 
115
//
116
// LCD / Controller
117
//
118
#if ENABLED(ULTRA_LCD)
119
 
120
  #define BEEPER_PIN 18
121
 
122
  #if ENABLED(NEWPANEL)
123
 
124
    #define LCD_PINS_RS    20
125
    #define LCD_PINS_ENABLE 17
126
    #define LCD_PINS_D4    16
127
    #define LCD_PINS_D5    21
128
    #define LCD_PINS_D6     5
129
    #define LCD_PINS_D7     6
130
 
131
    // buttons are directly attached
132
    #define BTN_EN1 40
133
    #define BTN_EN2 42
134
    #define BTN_ENC 19
135
 
136
    #define SD_DETECT_PIN 38
137
 
138
  #else // !NEWPANEL - Old style panel with shift register
139
 
140
    // buttons are attached to a shift register
141
    #define SHIFT_CLK 38
142
    #define SHIFT_LD 42
143
    #define SHIFT_OUT 40
144
    #define SHIFT_EN 17
145
 
146
    #define LCD_PINS_RS 16
147
    #define LCD_PINS_ENABLE 5
148
    #define LCD_PINS_D4 6
149
    #define LCD_PINS_D5 21
150
    #define LCD_PINS_D6 20
151
    #define LCD_PINS_D7 19
152
 
153
    #define SD_DETECT_PIN -1
154
 
155
  #endif // !NEWPANEL
156
 
157
#endif // ULTRA_LCD
158
 
159
//
160
// M3/M4/M5 - Spindle/Laser Control
161
//
162
#define SPINDLE_LASER_PWM_PIN     9   // MUST BE HARDWARE PWM
163
#define SPINDLE_LASER_ENABLE_PIN 10   // Pin should have a pullup!
164
#define SPINDLE_DIR_PIN          11   // use the EXP3 PWM header