Browse Source

Fix for R.D.F.G.S.C. with MEGATRONICS 3 board

The support for reprapworld LCD boke the code for the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER. See Full Grapics Display does not work any more after #4408  #4439
fabtopia 8 years ago
parent
commit
83d0d59303
1 changed files with 44 additions and 36 deletions
  1. 44
    36
      Marlin/pins_MEGATRONICS_3.h

+ 44
- 36
Marlin/pins_MEGATRONICS_3.h View File

28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
 #endif
29
 #endif
30
 
30
 
31
-#define BOARD_NAME         "Megatronics v3.0"
31
+#define MEGATRONICS_31
32
+
33
+#if ENABLED(MEGATRONICS_31)
34
+  #define BOARD_NAME       "Megatronics v3.1"
35
+#else
36
+  #define BOARD_NAME       "Megatronics v3.0"
37
+#endif
38
+
32
 #define LARGE_FLASH        true
39
 #define LARGE_FLASH        true
33
 
40
 
34
 #if ENABLED(Z_PROBE_SLED)
41
 #if ENABLED(Z_PROBE_SLED)
36
 #endif
43
 #endif
37
 
44
 
38
 // Servo support
45
 // Servo support
39
-#define SERVO0_PIN         46 //AUX3-6
40
-#define SERVO1_PIN         47 //AUX3-5
41
-#define SERVO2_PIN         48 //AUX3-4
42
-#define SERVO3_PIN         49 //AUX3-3
46
+#define SERVO0_PIN         46 // AUX3-6
47
+#define SERVO1_PIN         47 // AUX3-5
48
+#define SERVO2_PIN         48 // AUX3-4
49
+#define SERVO3_PIN         49 // AUX3-3
43
 
50
 
44
 #define X_STEP_PIN         58
51
 #define X_STEP_PIN         58
45
 #define X_DIR_PIN          57
52
 #define X_DIR_PIN          57
46
 #define X_ENABLE_PIN       59
53
 #define X_ENABLE_PIN       59
47
 #define X_MIN_PIN          37
54
 #define X_MIN_PIN          37
48
-#define X_MAX_PIN          40 // put to -1 to disable
55
+#define X_MAX_PIN          40
49
 
56
 
50
 #define Y_STEP_PIN         5
57
 #define Y_STEP_PIN         5
51
 #define Y_DIR_PIN          17
58
 #define Y_DIR_PIN          17
52
 #define Y_ENABLE_PIN       4
59
 #define Y_ENABLE_PIN       4
53
 #define Y_MIN_PIN          41
60
 #define Y_MIN_PIN          41
54
-#define Y_MAX_PIN          38 // put to -1 to disable
61
+#define Y_MAX_PIN          38
55
 
62
 
56
 #define Z_STEP_PIN         16
63
 #define Z_STEP_PIN         16
57
 #define Z_DIR_PIN          11
64
 #define Z_DIR_PIN          11
58
 #define Z_ENABLE_PIN       3
65
 #define Z_ENABLE_PIN       3
59
 #define Z_MIN_PIN          18
66
 #define Z_MIN_PIN          18
60
-#define Z_MAX_PIN          19 // put to -1 to disable
67
+#define Z_MAX_PIN          19
61
 
68
 
62
 #define E0_STEP_PIN        28
69
 #define E0_STEP_PIN        28
63
 #define E0_DIR_PIN         27
70
 #define E0_DIR_PIN         27
104
   #define TEMP_BED_PIN 14 // ANALOG NUMBERING
111
   #define TEMP_BED_PIN 14 // ANALOG NUMBERING
105
 #endif
112
 #endif
106
 
113
 
114
+/**
115
+ * Controllers and LCDs
116
+ */
107
 #define BEEPER_PIN 61
117
 #define BEEPER_PIN 61
108
 
118
 
109
-#if ENABLED(DOGLCD)
110
-
111
-  #if ENABLED(U8GLIB_ST7920)
112
-    #define LCD_PINS_RS     56 //CS chip select /SS chip slave select
113
-    #define LCD_PINS_ENABLE 51 //SID (MOSI)
114
-    #define LCD_PINS_D4     52 //SCK (CLK) clock
115
-    #define SD_DETECT_PIN 35
116
-  #endif
117
-
118
-#else
119
-
120
-  #define LCD_PINS_RS 32
121
-  #define LCD_PINS_ENABLE 31
122
-  #define LCD_PINS_D4 14
123
-  #define LCD_PINS_D5 30
124
-  #define LCD_PINS_D6 39
125
-  #define LCD_PINS_D7 15
126
-  
127
-  #define SHIFT_CLK 43
128
-  #define SHIFT_LD 35
129
-  #define SHIFT_OUT 34
130
-  #define SHIFT_EN 44
131
-
132
-  #define SD_DETECT_PIN 56 // Megatronics v3.1 only
133
-
134
-#endif
135
-
136
-// Buttons are directly attached using keypad
137
 #define BTN_EN1 44
119
 #define BTN_EN1 44
138
 #define BTN_EN2 45
120
 #define BTN_EN2 45
139
 #define BTN_ENC 33
121
 #define BTN_ENC 33
141
 #define BLEN_C 2
123
 #define BLEN_C 2
142
 #define BLEN_B 1
124
 #define BLEN_B 1
143
 #define BLEN_A 0
125
 #define BLEN_A 0
126
+
127
+#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
128
+  #define LCD_PINS_RS     56 // CS chip select / SS chip slave select
129
+  #define LCD_PINS_ENABLE 51 // SID (MOSI)
130
+  #define LCD_PINS_D4     52 // SCK (CLK) clock
131
+  #define SD_DETECT_PIN   35
132
+#else
133
+  #define LCD_PINS_RS     32
134
+  #define LCD_PINS_ENABLE 31
135
+  #define LCD_PINS_D4     14
136
+  #define LCD_PINS_D5     30
137
+  #define LCD_PINS_D6     39
138
+  #define LCD_PINS_D7     15
139
+  
140
+  #define SHIFT_CLK       43
141
+  #define SHIFT_LD        35
142
+  #define SHIFT_OUT       34
143
+  #define SHIFT_EN        44
144
+
145
+  #if ENABLED(MEGATRONICS_31)
146
+    #define SD_DETECT_PIN 56
147
+  #else
148
+    #define SD_DETECT_PIN -1
149
+  #endif
150
+
151
+#endif

Loading…
Cancel
Save