Преглед изворни кода

Add support for Megatronics 3 a la #1426

Scott Lahteine пре 10 година
родитељ
комит
2ce4a102ee
3 измењених фајлова са 55 додато и 66 уклоњено
  1. 1
    0
      Marlin/boards.h
  2. 4
    2
      Marlin/pins.h
  3. 50
    64
      Marlin/pins_MEGATRONICS_3.h

+ 1
- 0
Marlin/boards.h Прегледај датотеку

41
 #define BOARD_MEGATRONICS       70   // Megatronics
41
 #define BOARD_MEGATRONICS       70   // Megatronics
42
 #define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
42
 #define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
43
 #define BOARD_MEGATRONICS_1     702  // Minitronics v1.0
43
 #define BOARD_MEGATRONICS_1     702  // Minitronics v1.0
44
+#define BOARD_MEGATRONICS_3     703  // Megatronics v3.0
44
 #define BOARD_OMCA_A            90   // Alpha OMCA board
45
 #define BOARD_OMCA_A            90   // Alpha OMCA board
45
 #define BOARD_OMCA              91   // Final OMCA board
46
 #define BOARD_OMCA              91   // Final OMCA board
46
 #define BOARD_RAMBO             301  // Rambo
47
 #define BOARD_RAMBO             301  // Rambo

+ 4
- 2
Marlin/pins.h Прегледај датотеку

88
   #include "pins_GEN3_MONOLITHIC.h"
88
   #include "pins_GEN3_MONOLITHIC.h"
89
 #elif MB(MEGATRONICS)
89
 #elif MB(MEGATRONICS)
90
   #include "pins_MEGATRONICS.h"
90
   #include "pins_MEGATRONICS.h"
91
-#elif MB(MEGATRONICS_2)
92
-  #include "pins_MEGATRONICS_2.h"
93
 #elif MB(MEGATRONICS_1)
91
 #elif MB(MEGATRONICS_1)
94
   #include "pins_MEGATRONICS_1.h"
92
   #include "pins_MEGATRONICS_1.h"
93
+#elif MB(MEGATRONICS_2)
94
+  #include "pins_MEGATRONICS_2.h"
95
+#elif MB(MEGATRONICS_3)
96
+  #include "pins_MEGATRONICS_3.h"
95
 #elif MB(OMCA_A)
97
 #elif MB(OMCA_A)
96
   #include "pins_OMCA_A.h"
98
   #include "pins_OMCA_A.h"
97
 #elif MB(OMCA)
99
 #elif MB(OMCA)

+ 50
- 64
Marlin/pins_MEGATRONICS_3.h Прегледај датотеку

1
 /**
1
 /**
2
- * MegaTronics v2.0 pin assignments
2
+ * MegaTronics v3.0 pin assignments
3
  */
3
  */
4
 
4
 
5
 #ifndef __AVR_ATmega2560__
5
 #ifndef __AVR_ATmega2560__
8
 
8
 
9
 #define LARGE_FLASH        true
9
 #define LARGE_FLASH        true
10
 
10
 
11
-#define X_STEP_PIN 26
12
-#define X_DIR_PIN 27
13
-#define X_ENABLE_PIN 25
14
-#define X_MIN_PIN 37
15
-#define X_MAX_PIN 40
11
+#define X_STEP_PIN         58
12
+#define X_DIR_PIN          57
13
+#define X_ENABLE_PIN       59
14
+#define X_MIN_PIN          37
15
+#define X_MAX_PIN          40   // 2 // Max endstops default to disabled "-1", set to commented value to enable.
16
 
16
 
17
-#define Y_STEP_PIN 4 // A6
18
-#define Y_DIR_PIN 54 // A0
19
-#define Y_ENABLE_PIN 5
20
-#define Y_MIN_PIN 41
21
-#define Y_MAX_PIN 38
17
+#define Y_STEP_PIN         5 // A6
18
+#define Y_DIR_PIN          17 // A0
19
+#define Y_ENABLE_PIN       4
20
+#define Y_MIN_PIN          41
21
+#define Y_MAX_PIN          38   // 15
22
 
22
 
23
-#define Z_STEP_PIN 56 // A2
24
-#define Z_DIR_PIN 60 // A6
25
-#define Z_ENABLE_PIN 55 // A1
26
-#define Z_MIN_PIN 18
27
-#define Z_MAX_PIN 19
23
+#define Z_STEP_PIN         16 // A2
24
+#define Z_DIR_PIN          11 // A6
25
+#define Z_ENABLE_PIN       3 // A1
26
+#define Z_MIN_PIN          18
27
+#define Z_MAX_PIN          19
28
 
28
 
29
-#define E0_STEP_PIN 35
30
-#define E0_DIR_PIN 36
31
-#define E0_ENABLE_PIN 34
29
+#define E0_STEP_PIN        28
30
+#define E0_DIR_PIN         27
31
+#define E0_ENABLE_PIN      29
32
 
32
 
33
-#define E1_STEP_PIN 29
34
-#define E1_DIR_PIN 39
35
-#define E1_ENABLE_PIN 28
33
+#define E1_STEP_PIN        25
34
+#define E1_DIR_PIN         24
35
+#define E1_ENABLE_PIN      26
36
 
36
 
37
-#define E2_STEP_PIN 23
38
-#define E2_DIR_PIN 24
39
-#define E2_ENABLE_PIN 22
37
+#define E2_STEP_PIN        22
38
+#define E2_DIR_PIN         60
39
+#define E2_ENABLE_PIN      23
40
 
40
 
41
 #define SDPOWER -1
41
 #define SDPOWER -1
42
 #define SDSS 53
42
 #define SDSS 53
43
 #define LED_PIN 13
43
 #define LED_PIN 13
44
 
44
 
45
-#define FAN_PIN 7
46
-#define FAN2_PIN 6
47
 #define PS_ON_PIN 12
45
 #define PS_ON_PIN 12
48
 #define KILL_PIN -1
46
 #define KILL_PIN -1
49
 
47
 
50
-#define HEATER_0_PIN 9 // EXTRUDER 1
51
-#define HEATER_1_PIN 8 // EXTRUDER 2
52
-#define HEATER_2_PIN -1
48
+#define HEATER_0_PIN 2
49
+#define HEATER_1_PIN 8
50
+#define HEATER_2_PIN 9
51
+#define HEATER_BED_PIN 10
52
+#define FAN_PIN 6
53
+#define FAN2_PIN 7
53
 
54
 
54
-#if TEMP_SENSOR_0 == -1
55
-  #define TEMP_0_PIN 4 // ANALOG NUMBERING
56
-#else
57
-  #define TEMP_0_PIN 13 // ANALOG NUMBERING
58
-#endif
59
-
60
-
61
-#if TEMP_SENSOR_1 == -1
62
-  #define TEMP_1_PIN 8 // ANALOG NUMBERING
63
-#else
64
-  #define TEMP_1_PIN 15 // ANALOG NUMBERING
65
-#endif
66
-
67
-#define TEMP_2_PIN -1 // ANALOG NUMBERING
68
-
69
-#define HEATER_BED_PIN 10 // BED
70
-
71
-#if TEMP_SENSOR_BED == -1
72
-  #define TEMP_BED_PIN 8 // ANALOG NUMBERING
73
-#else
74
-  #define TEMP_BED_PIN 14 // ANALOG NUMBERING
75
-#endif
76
-
77
-#define BEEPER 64
55
+#define TEMP_0_PIN   (TEMP_SENSOR_0 == -1 ?  11 : 15) // ANALOG NUMBERING
56
+#define TEMP_1_PIN   (TEMP_SENSOR_1 == -1 ?  10 : 13) // ANALOG NUMBERING
57
+#define TEMP_2_PIN   (TEMP_SENSOR_2 == -1 ?   9 : 12) // ANALOG NUMBERING
58
+#define TEMP_BED_PIN (TEMP_SENSOR_BED == -1 ? 8 : 14) // ANALOG NUMBERING
78
 
59
 
60
+#define BEEPER 61
79
 
61
 
80
-#define LCD_PINS_RS 14
81
-#define LCD_PINS_ENABLE 15
82
-#define LCD_PINS_D4 30
83
-#define LCD_PINS_D5 31
84
-#define LCD_PINS_D6 32
85
-#define LCD_PINS_D7 33
62
+#define LCD_PINS_RS 32
63
+#define LCD_PINS_ENABLE 31
64
+#define LCD_PINS_D4 14
65
+#define LCD_PINS_D5 30
66
+#define LCD_PINS_D6 39
67
+#define LCD_PINS_D7 15
86
 
68
 
69
+#define SHIFT_CLK 43
70
+#define SHIFT_LD 35
71
+#define SHIFT_OUT 34
72
+#define SHIFT_EN 44
87
 
73
 
88
 // Buttons are directly attached using keypad
74
 // Buttons are directly attached using keypad
89
-#define BTN_EN1 61
90
-#define BTN_EN2 59
91
-#define BTN_ENC 43 //the click
75
+#define BTN_EN1 44
76
+#define BTN_EN2 45
77
+#define BTN_ENC 33 // the click
92
 
78
 
93
 #define BLEN_C 2
79
 #define BLEN_C 2
94
 #define BLEN_B 1
80
 #define BLEN_B 1
95
 #define BLEN_A 0
81
 #define BLEN_A 0
96
 
82
 
97
-#define SDCARDDETECT -1  // Megatronics does not use this port
83
+#define SDCARDDETECT -1	// Megatronics does not use this port
98
 
84
 
99
 // Encoder rotation values
85
 // Encoder rotation values
100
 #define encrot0 0
86
 #define encrot0 0

Loading…
Откажи
Сачувај