|
1 | 1 | /**
|
2 | 2 | * Marlin 3D Printer Firmware
|
3 |
| - * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] |
| 3 | + * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] |
4 | 4 | *
|
5 | 5 | * Based on Sprinter and grbl.
|
6 |
| - * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm |
| 6 | + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm |
7 | 7 | *
|
8 | 8 | * This program is free software: you can redistribute it and/or modify
|
9 | 9 | * it under the terms of the GNU General Public License as published by
|
|
19 | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
20 | 20 | *
|
21 | 21 | */
|
| 22 | +#pragma once |
22 | 23 |
|
23 | 24 | /**
|
24 | 25 | * HJC2560-C Rev2.x pin assignments
|
25 | 26 | */
|
26 | 27 |
|
27 |
| -/** |
28 |
| - * Rev 2.x 2 Aug 2018 |
29 |
| - */ |
30 |
| - |
31 | 28 | #ifndef __AVR_ATmega2560__
|
32 |
| - #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu." |
| 29 | + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" |
33 | 30 | #endif
|
34 | 31 |
|
35 |
| -// BOARD Info |
36 |
| -#define DEFAULT_MACHINE_NAME "HCMaker7" |
37 |
| -#define BOARD_NAME "HJC2560-C" |
38 |
| -#define BOARD_REV "Rev: 2.1" //主板版本:Rev 2.1, Rs=0.05R |
39 |
| -#define R_SENSOR "R-sensor: R050" //检测电阻 |
40 |
| - |
41 |
| -// FIRMWARE Info |
42 |
| -#define FIRMWARE_NAME "Marlin 1-1-9" |
43 |
| -#define FIRMWARE_REV "Rev: 1.4" //固件版本:Rev 1.4 |
| 32 | +#define DEFAULT_MACHINE_NAME "HCMaker7" |
| 33 | +#define BOARD_INFO_NAME "HJC2560-C" |
44 | 34 |
|
| 35 | +// |
| 36 | +// Servos |
| 37 | +// |
| 38 | +//#ifndef SERVO0_PIN |
| 39 | +// #define SERVO0_PIN 11 |
| 40 | +//#endif |
45 | 41 |
|
46 | 42 | //
|
47 | 43 | // Limit Switches
|
48 | 44 | //
|
49 | 45 | #define X_STOP_PIN 22
|
50 | 46 | #define Y_STOP_PIN 26
|
51 | 47 | #define Z_STOP_PIN 29
|
52 |
| -#define EXP_STOP_PIN 28 |
| 48 | +//#define EXP_STOP_PIN 28 |
53 | 49 |
|
54 | 50 | //
|
55 | 51 | // Steppers
|
|
81 | 77 | #ifndef MOTOR_CURRENT_PWM_RANGE
|
82 | 78 | #define MOTOR_CURRENT_PWM_RANGE 2000
|
83 | 79 | #endif
|
84 |
| -#define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250} |
| 80 | +#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 } |
85 | 81 |
|
86 | 82 | //
|
87 | 83 | // Temperature Sensors
|
|
97 | 93 | #define HEATER_1_PIN 3
|
98 | 94 | #define HEATER_BED_PIN 4
|
99 | 95 |
|
100 |
| -//#ifndef FAN_PIN |
101 |
| - #define FAN_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释 |
102 |
| -//#endif |
| 96 | +#ifndef FAN_PIN |
| 97 | + #define FAN_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释 |
| 98 | +#endif |
103 | 99 |
|
104 | 100 | //
|
105 | 101 | // Misc. Functions
|
106 | 102 | //
|
107 | 103 | #define SDSS 53
|
108 | 104 | #define SD_DETECT_PIN 39
|
109 |
| -//#define LED_PIN 8 |
110 |
| -#define CASE_LIGHT_PIN 8 //8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8 |
| 105 | +//#define LED_PIN 8 |
| 106 | +#define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8 |
| 107 | + |
111 | 108 | //#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered
|
112 | 109 | //#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
|
113 | 110 |
|
| 111 | +// |
| 112 | +// M3/M4/M5 - Spindle/Laser Control |
| 113 | +// |
| 114 | +#if ENABLED(SPINDLE_LASER_ENABLE) |
| 115 | + #define SPINDLE_DIR_PIN 16 |
| 116 | + #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! |
| 117 | + #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM |
| 118 | +#endif |
| 119 | + |
114 | 120 | //
|
115 | 121 | // LCD / Controller
|
116 | 122 | //
|
117 |
| -#if ENABLED(ULTRA_LCD) |
| 123 | +#if HAS_SPI_LCD |
118 | 124 |
|
119 |
| - #define BEEPER_PIN 18 |
| 125 | + #define BEEPER_PIN 18 |
120 | 126 |
|
121 | 127 | #if ENABLED(NEWPANEL)
|
122 | 128 |
|
123 |
| - #if ENABLED(HJC_LCD_SMART_CONTROLLER) |
124 |
| - #define LCD_PINS_RS 20 //LCD_CS |
125 |
| - #define LCD_PINS_ENABLE 15 //LCD_SDA |
126 |
| - #define LCD_PINS_D4 14 //LCD_SCK |
127 |
| - #define LCD_BACKLIGHT_PIN 5 //LCD_Backlight |
128 |
| -// #ifndef LCD_CONTRAST_PIN |
129 |
| -// #define LCD_CONTRAST_PIN 5 //LCD_Contrast |
130 |
| -// #endif |
131 |
| - // define digital pin 24 for the filament runout sensor. |
132 |
| - #ifndef FIL_RUNOUT_PIN |
133 |
| - #define FIL_RUNOUT_PIN 24 //Filament runout |
| 129 | + #define LCD_PINS_RS 20 // LCD_CS |
| 130 | + #define LCD_PINS_ENABLE 15 // LCD_SDA |
| 131 | + #define LCD_PINS_D4 14 // LCD_SCK |
| 132 | + |
| 133 | + #if ENABLED(HJC_LCD_SMART_CONTROLLER) |
| 134 | + #define LCD_BACKLIGHT_PIN 5 // LCD_Backlight |
| 135 | + //#ifndef LCD_CONTRAST_PIN |
| 136 | + // #define LCD_CONTRAST_PIN 5 // LCD_Contrast |
| 137 | + //#endif |
| 138 | + #ifndef FIL_RUNOUT_PIN |
| 139 | + #define FIL_RUNOUT_PIN 24 // Filament runout |
134 | 140 | #endif
|
135 |
| - #else |
136 |
| - #define LCD_PINS_RS 20 //LCD_CS |
137 |
| - #define LCD_PINS_ENABLE 15 //LCD_SDA |
138 |
| - #define LCD_PINS_D4 14 //LCD_SCK |
139 |
| - #define LCD_PINS_D5 21 |
140 |
| - #define LCD_PINS_D6 5 |
141 |
| - #define LCD_PINS_D7 6 |
| 141 | + #else |
| 142 | + #define LCD_PINS_D5 21 |
| 143 | + #define LCD_PINS_D6 5 |
| 144 | + #define LCD_PINS_D7 6 |
142 | 145 | #endif
|
143 | 146 |
|
144 |
| - // buttons are directly attached |
145 |
| - #define BTN_EN1 41 |
146 |
| - #define BTN_EN2 40 |
147 |
| - #define BTN_ENC 19 |
| 147 | + #define BTN_EN1 41 |
| 148 | + #define BTN_EN2 40 |
| 149 | + #define BTN_ENC 19 |
148 | 150 |
|
149 |
| - #define SD_DETECT_PIN 39 |
| 151 | + #define SD_DETECT_PIN 39 |
150 | 152 |
|
151 |
| - #else // !NEWPANEL - Old style panel with shift register |
| 153 | + #else |
152 | 154 |
|
153 |
| - // buttons are attached to a shift register |
154 |
| - #define SHIFT_CLK 38 |
155 |
| - #define SHIFT_LD 42 |
156 |
| - #define SHIFT_OUT 40 |
157 |
| - #define SHIFT_EN 17 |
| 155 | + // Buttons attached to a shift register |
| 156 | + #define SHIFT_CLK 38 |
| 157 | + #define SHIFT_LD 42 |
| 158 | + #define SHIFT_OUT 40 |
| 159 | + #define SHIFT_EN 17 |
158 | 160 |
|
159 |
| - #define LCD_PINS_RS 16 |
160 |
| - #define LCD_PINS_ENABLE 5 |
161 |
| - #define LCD_PINS_D4 6 |
162 |
| - #define LCD_PINS_D5 21 |
163 |
| - #define LCD_PINS_D6 20 |
164 |
| - #define LCD_PINS_D7 19 |
165 |
| - |
166 |
| - #define SD_DETECT_PIN -1 |
| 161 | + #define LCD_PINS_RS 16 |
| 162 | + #define LCD_PINS_ENABLE 5 |
| 163 | + #define LCD_PINS_D4 6 |
| 164 | + #define LCD_PINS_D5 21 |
| 165 | + #define LCD_PINS_D6 20 |
| 166 | + #define LCD_PINS_D7 19 |
167 | 167 |
|
168 | 168 | #endif // !NEWPANEL
|
169 | 169 |
|
170 |
| -#endif // ULTRA_LCD |
171 |
| - |
172 |
| - |
173 |
| -// |
174 |
| -// M3/M4/M5 - Spindle/Laser Control,默认,主轴/激光器使用独立的PWM引脚(D9)控制 |
175 |
| -// 如果使用了PWM_FAN,Case_Light和Spindle/Laser, 并希望Spindle/Laser使用CASE_Light的线,则将 |
176 |
| -//SPINDLE_LASER_PWM_PIN 定义为8 |
177 |
| -// |
178 |
| -#if ENABLED(SPINDLE_LASER_ENABLE) // use the LED_PIN for spindle speed control or case light |
179 |
| -// #undef LED_PIN |
180 |
| - #define SPINDLE_DIR_PIN 16 |
181 |
| - #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! |
182 |
| - #define SPINDLE_LASER_PWM_PIN 9 // MUST BE HARDWARE PWM, |
183 |
| -//#else |
184 |
| -// #undef LED_PIN |
185 |
| -// #define CASE_LIGHT_PIN 7 |
186 |
| -#endif |
187 |
| - |
188 |
| -// |
189 |
| -// Servos |
190 |
| -// |
191 |
| -//#ifndef SERVO0_PIN |
192 |
| -// #define SERVO0_PIN 11 |
193 |
| -//#endif |
| 170 | +#endif // HAS_SPI_LCD |
0 commit comments