Skip to content

Commit f7aac7a

Browse files
committed
Add Support for ADIMLab Granty
1 parent de122c9 commit f7aac7a

File tree

2 files changed

+137
-160
lines changed

2 files changed

+137
-160
lines changed
+63-86
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* Marlin 3D Printer Firmware
3-
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3+
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
44
*
55
* 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
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -19,37 +19,33 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#pragma once
2223

2324
/**
2425
* HJC2560-C Rev2.x pin assignments
2526
*/
2627

27-
/**
28-
* Rev 2.x 2 Aug 2018
29-
*/
30-
3128
#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.'"
3330
#endif
3431

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"
4434

35+
//
36+
// Servos
37+
//
38+
//#ifndef SERVO0_PIN
39+
// #define SERVO0_PIN 11
40+
//#endif
4541

4642
//
4743
// Limit Switches
4844
//
4945
#define X_STOP_PIN 22
5046
#define Y_STOP_PIN 26
5147
#define Z_STOP_PIN 29
52-
#define EXP_STOP_PIN 28
48+
//#define EXP_STOP_PIN 28
5349

5450
//
5551
// Steppers
@@ -81,7 +77,7 @@
8177
#ifndef MOTOR_CURRENT_PWM_RANGE
8278
#define MOTOR_CURRENT_PWM_RANGE 2000
8379
#endif
84-
#define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
80+
#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 }
8581

8682
//
8783
// Temperature Sensors
@@ -97,97 +93,78 @@
9793
#define HEATER_1_PIN 3
9894
#define HEATER_BED_PIN 4
9995

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
10399

104100
//
105101
// Misc. Functions
106102
//
107103
#define SDSS 53
108104
#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+
111108
//#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered
112109
//#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
113110

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+
114120
//
115121
// LCD / Controller
116122
//
117-
#if ENABLED(ULTRA_LCD)
123+
#if HAS_SPI_LCD
118124

119-
#define BEEPER_PIN 18
125+
#define BEEPER_PIN 18
120126

121127
#if ENABLED(NEWPANEL)
122128

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
134140
#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
142145
#endif
143146

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
148150

149-
#define SD_DETECT_PIN 39
151+
#define SD_DETECT_PIN 39
150152

151-
#else // !NEWPANEL - Old style panel with shift register
153+
#else
152154

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
158160

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
167167

168168
#endif // !NEWPANEL
169169

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

Comments
 (0)