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
 * Elefu RA Board 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
#define BOARD_NAME "Elefu Ra v3"
32
 
33
//
34
// Limit Switches
35
//
36
#define X_MIN_PIN          35
37
#define X_MAX_PIN          34
38
#define Y_MIN_PIN          33
39
#define Y_MAX_PIN          32
40
#define Z_MIN_PIN          31
41
#define Z_MAX_PIN          30
42
 
43
//
44
// Z Probe (when not Z_MIN_PIN)
45
//
46
#ifndef Z_MIN_PROBE_PIN
47
  #define Z_MIN_PROBE_PIN  30
48
#endif
49
 
50
//
51
// Steppers
52
//
53
#define X_STEP_PIN         49
54
#define X_DIR_PIN          13
55
#define X_ENABLE_PIN       48
56
 
57
#define Y_STEP_PIN         11
58
#define Y_DIR_PIN           9
59
#define Y_ENABLE_PIN       12
60
 
61
#define Z_STEP_PIN          7
62
#define Z_DIR_PIN           6
63
#define Z_ENABLE_PIN        8
64
 
65
#define E0_STEP_PIN        40
66
#define E0_DIR_PIN         41
67
#define E0_ENABLE_PIN      37
68
 
69
#define E1_STEP_PIN        18
70
#define E1_DIR_PIN         19
71
#define E1_ENABLE_PIN      38
72
 
73
#define E2_STEP_PIN        43
74
#define E2_DIR_PIN         47
75
#define E2_ENABLE_PIN      42
76
 
77
//
78
// Temperature Sensors
79
//
80
#define TEMP_0_PIN          3   // Analog Input
81
#define TEMP_1_PIN          2   // Analog Input
82
#define TEMP_2_PIN          1   // Analog Input
83
#define TEMP_BED_PIN        0   // Analog Input
84
 
85
//
86
// Heaters / Fans
87
//
88
#define HEATER_0_PIN       45   // 12V PWM1
89
#define HEATER_1_PIN       46   // 12V PWM2
90
#define HEATER_2_PIN       17   // 12V PWM3
91
#define HEATER_BED_PIN     44   // DOUBLE 12V PWM
92
 
93
#ifndef FAN_PIN
94
  #define FAN_PIN          16   // 5V PWM
95
#endif
96
 
97
//
98
// Misc. Functions
99
//
100
#define PS_ON_PIN          10   // Set to -1 if using a manual switch on the PWRSW Connector
101
#define SLEEP_WAKE_PIN     26   // This feature still needs work
102
#define PHOTOGRAPH_PIN     29
103
 
104
//
105
// LCD / Controller
106
//
107
#define BEEPER_PIN         36
108
 
109
#if ENABLED(RA_CONTROL_PANEL)
110
 
111
  #define SDSS             53
112
  #define SD_DETECT_PIN    28
113
 
114
  #define BTN_EN1          14
115
  #define BTN_EN2          39
116
  #define BTN_ENC          15
117
 
118
#endif // RA_CONTROL_PANEL
119
 
120
#if ENABLED(RA_DISCO)
121
  // variables for which pins the TLC5947 is using
122
  #define TLC_CLOCK_PIN    25
123
  #define TLC_BLANK_PIN    23
124
  #define TLC_XLAT_PIN     22
125
  #define TLC_DATA_PIN     24
126
 
127
  // We also need to define pin to port number mapping for the 2560 to match the pins listed above.
128
  // If you change the TLC pins, update this as well per the 2560 datasheet! This currently only works with the RA Board.
129
  #define TLC_CLOCK_BIT     3
130
  #define TLC_CLOCK_PORT    &PORTA
131
 
132
  #define TLC_BLANK_BIT     1
133
  #define TLC_BLANK_PORT    &PORTA
134
 
135
  #define TLC_DATA_BIT      2
136
  #define TLC_DATA_PORT     &PORTA
137
 
138
  #define TLC_XLAT_BIT      0
139
  #define TLC_XLAT_PORT     &PORTA
140
 
141
  // Change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
142
  // Leave it at at least 1 if you have enabled RA_LIGHTING
143
  // The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
144
  #define NUM_TLCS          2
145
 
146
  // These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
147
  // Modify them according to your specific situation.
148
  // NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
149
  #define TRANS_ARRAY { 0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8 }    // forward
150
  //#define TRANS_ARRAY { 7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15 }  // backward
151
#endif // RA_DISCO