Subversion Repositories MK-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
 * Mega controller pin assignments
25
 */
26
 
27
#ifndef __AVR_ATmega2560__
28
  #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
#endif
30
 
31
#if HOTENDS > 2 || E_STEPPERS > 2
32
  #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue."
33
#endif
34
 
35
#define BOARD_NAME "Mega Controller"
36
 
37
//
38
// Servos
39
//
40
#define SERVO0_PIN         30
41
#define SERVO1_PIN         31
42
#define SERVO2_PIN         32
43
#define SERVO3_PIN         33
44
 
45
//
46
// Limit Switches
47
//
48
#define X_MIN_PIN          43
49
#define X_MAX_PIN          42
50
#define Y_MIN_PIN          38
51
#define Y_MAX_PIN          41
52
#define Z_MIN_PIN          40
53
#define Z_MAX_PIN          37
54
 
55
//
56
// Z Probe (when not Z_MIN_PIN)
57
//
58
#ifndef Z_MIN_PROBE_PIN
59
  #define Z_MIN_PROBE_PIN  37
60
#endif
61
 
62
//
63
// Steppers
64
//
65
#define X_STEP_PIN         62   // A8
66
#define X_DIR_PIN          63   // A9
67
#define X_ENABLE_PIN       61   // A7
68
 
69
#define Y_STEP_PIN         65   // A11
70
#define Y_DIR_PIN          66   // A12
71
#define Y_ENABLE_PIN       64   // A10
72
 
73
#define Z_STEP_PIN         68   // A14
74
#define Z_DIR_PIN          69   // A15
75
#define Z_ENABLE_PIN       67   // A13
76
 
77
#define E0_STEP_PIN        23
78
#define E0_DIR_PIN         24
79
#define E0_ENABLE_PIN      22
80
 
81
#define E1_STEP_PIN        26
82
#define E1_DIR_PIN         27
83
#define E1_ENABLE_PIN      25
84
 
85
//
86
// Temperature Sensors
87
//
88
#if TEMP_SENSOR_0 == -1
89
  #define TEMP_0_PIN        4   // Analog Input
90
#else
91
  #define TEMP_0_PIN        0   // Analog Input
92
#endif
93
 
94
#if TEMP_SENSOR_1 == -1
95
  #define TEMP_1_PIN        5   // Analog Input
96
#else
97
  #define TEMP_1_PIN        2   // Analog Input
98
#endif
99
 
100
#define TEMP_2_PIN          3   // Analog Input
101
 
102
#if TEMP_SENSOR_BED == -1
103
  #define TEMP_BED_PIN      6   // Analog Input
104
#else
105
  #define TEMP_BED_PIN      1   // Analog Input
106
#endif
107
 
108
//
109
// Heaters / Fans
110
//
111
#define HEATER_0_PIN       29
112
#define HEATER_1_PIN       34
113
#define HEATER_BED_PIN     28
114
 
115
#ifndef FAN_PIN
116
  #define FAN_PIN          39
117
#endif
118
#define FAN1_PIN           35
119
#define FAN2_PIN           36
120
 
121
#ifndef CONTROLLER_FAN_PIN
122
  #define CONTROLLER_FAN_PIN FAN2_PIN
123
#endif
124
 
125
#define FAN_SOFT_PWM
126
 
127
//
128
// Misc. Functions
129
//
130
#define SDSS               53
131
#define LED_PIN            13
132
#define CASE_LIGHT_PIN      2
133
 
134
//
135
// LCD / Controller
136
//
137
#if ENABLED(MINIPANEL)
138
 
139
  #define BEEPER_PIN       46
140
  // Pins for DOGM SPI LCD Support
141
  #define DOGLCD_A0        47
142
  #define DOGLCD_CS        45
143
  #define LCD_BACKLIGHT_PIN 44   // backlight LED on PA3
144
 
145
  #define KILL_PIN         12
146
  // GLCD features
147
  //#define LCD_CONTRAST 190
148
  // Uncomment screen orientation
149
  //#define LCD_SCREEN_ROT_90
150
  //#define LCD_SCREEN_ROT_180
151
  //#define LCD_SCREEN_ROT_270
152
 
153
  #define BTN_EN1          48
154
  #define BTN_EN2          11
155
  #define BTN_ENC          10
156
 
157
  #define SD_DETECT_PIN    49
158
 
159
#endif // MINIPANEL
160
 
161
//
162
// M3/M4/M5 - Spindle/Laser Control
163
//
164
#define SPINDLE_LASER_PWM_PIN     6   // MUST BE HARDWARE PWM
165
#define SPINDLE_LASER_ENABLE_PIN  7   // Pin should have a pullup!
166
#define SPINDLE_DIR_PIN           8