| 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 |
* Arduino Mega with RAMPS v1.4 adjusted pin assignments
|
|
|
25 |
*
|
|
|
26 |
* MKS GEN v1.3 (Extruder, Fan, Bed)
|
|
|
27 |
* MKS GEN v1.3 (Extruder, Extruder, Fan, Bed)
|
|
|
28 |
* MKS GEN v1.4 (Extruder, Fan, Bed)
|
|
|
29 |
* MKS GEN v1.4 (Extruder, Extruder, Fan, Bed)
|
|
|
30 |
*/
|
|
|
31 |
|
|
|
32 |
#if HOTENDS > 2 || E_STEPPERS > 2
|
|
|
33 |
#error "MKS GEN 1.3/1.4 supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
|
|
34 |
#endif
|
|
|
35 |
|
|
|
36 |
#define BOARD_NAME "MKS GEN >= v1.3"
|
|
|
37 |
|
|
|
38 |
//
|
|
|
39 |
// Heaters / Fans
|
|
|
40 |
//
|
|
|
41 |
// Power outputs EFBF or EFBE
|
|
|
42 |
#define MOSFET_D_PIN 7
|
|
|
43 |
|
|
|
44 |
//
|
|
|
45 |
// PSU / SERVO
|
|
|
46 |
//
|
|
|
47 |
// If POWER_SUPPLY is specified, always hijack Servo 3
|
|
|
48 |
//
|
|
|
49 |
#if POWER_SUPPLY > 0
|
|
|
50 |
#define SERVO3_PIN -1
|
|
|
51 |
#define PS_ON_PIN 4
|
|
|
52 |
#endif
|
|
|
53 |
|
|
|
54 |
#include "pins_RAMPS.h"
|
|
|
55 |
|
|
|
56 |
//
|
|
|
57 |
// LCD / Controller
|
|
|
58 |
//
|
|
|
59 |
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
|
|
|
60 |
/**
|
|
|
61 |
* VIKI2 Has two groups of wires with...
|
|
|
62 |
*
|
|
|
63 |
* +Vin + Input supply, requires 120ma for LCD and mSD card
|
|
|
64 |
* GND Ground Pin
|
|
|
65 |
* MOSI Data input for LCD and SD
|
|
|
66 |
* MISO Data output for SD
|
|
|
67 |
* SCK Clock for LCD and SD
|
|
|
68 |
* AO Reg. Sel for LCD
|
|
|
69 |
* LCS Chip Select for LCD
|
|
|
70 |
* SDCS Chip Select for SD
|
|
|
71 |
* SDCD Card Detect pin for SD
|
|
|
72 |
* ENCA Encoder output A
|
|
|
73 |
* ENCB Encoder output B
|
|
|
74 |
* ENCBTN Encoder button switch
|
|
|
75 |
*
|
|
|
76 |
* BTN Panel mounted button switch
|
|
|
77 |
* BUZZER Piezo buzzer
|
|
|
78 |
* BLUE-LED Blue LED ring pin (3 to 5v, mosfet buffered)
|
|
|
79 |
* RED-LED Red LED ring pin (3 to 5v, mosfet buffered)
|
|
|
80 |
*
|
|
|
81 |
* This configuration uses the following arrangement:
|
|
|
82 |
*
|
|
|
83 |
* EXP1 D37 = EN2 D35 = EN1 EXP2 D50 = MISO D52 = SCK
|
|
|
84 |
* D17 = BLUE D16 = RED D31 = ENC D53 = SDCS
|
|
|
85 |
* D23 = KILL D25 = BUZZ D33 = --- D51 = MOSI
|
|
|
86 |
* D27 = A0 D29 = LCS D49 = SDCD RST = ---
|
|
|
87 |
* GND = GND 5V = 5V GND = --- D41 = ---
|
|
|
88 |
*/
|
|
|
89 |
|
|
|
90 |
#undef BTN_EN1
|
|
|
91 |
#undef BTN_EN2
|
|
|
92 |
#undef BTN_ENC
|
|
|
93 |
#undef DOGLCD_A0
|
|
|
94 |
#undef DOGLCD_CS
|
|
|
95 |
#undef SD_DETECT_PIN
|
|
|
96 |
#undef BEEPER_PIN
|
|
|
97 |
#undef KILL_PIN
|
|
|
98 |
|
|
|
99 |
//
|
|
|
100 |
// VIKI2 12-wire lead
|
|
|
101 |
//
|
|
|
102 |
|
|
|
103 |
// orange/white SDCD
|
|
|
104 |
#define SD_DETECT_PIN 49
|
|
|
105 |
|
|
|
106 |
// white ENCA
|
|
|
107 |
#define BTN_EN1 35
|
|
|
108 |
|
|
|
109 |
// green ENCB
|
|
|
110 |
#define BTN_EN2 37
|
|
|
111 |
|
|
|
112 |
// purple ENCBTN
|
|
|
113 |
#define BTN_ENC 31
|
|
|
114 |
|
|
|
115 |
// brown A0
|
|
|
116 |
#define DOGLCD_A0 27
|
|
|
117 |
|
|
|
118 |
// green/white LCS
|
|
|
119 |
#define DOGLCD_CS 29
|
|
|
120 |
|
|
|
121 |
// 50 gray MISO
|
|
|
122 |
// 51 yellow MOSI
|
|
|
123 |
// 52 orange SCK
|
|
|
124 |
|
|
|
125 |
// blue SDCS
|
|
|
126 |
//#define SDSS 53
|
|
|
127 |
|
|
|
128 |
//
|
|
|
129 |
// VIKI2 4-wire lead
|
|
|
130 |
//
|
|
|
131 |
|
|
|
132 |
// blue BTN
|
|
|
133 |
#define KILL_PIN 23
|
|
|
134 |
|
|
|
135 |
// green BUZZER
|
|
|
136 |
#define BEEPER_PIN 25
|
|
|
137 |
|
|
|
138 |
// yellow RED-LED
|
|
|
139 |
#define STAT_LED_RED_PIN 16
|
|
|
140 |
|
|
|
141 |
// white BLUE-LED
|
|
|
142 |
#define STAT_LED_BLUE_PIN 17
|
|
|
143 |
|
|
|
144 |
#endif
|