Marlin: R_D_F_G_S_C with MEGATRONICS 3 broken by #4408

Created on 28 Jul 2016  路  18Comments  路  Source: MarlinFirmware/Marlin

Hi,
i have build a Delta printer with the Megatronics3 Board with the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER. After Pull Request #4408 the Display remains without any text. I have identified the problem. It seems that the display is now only serial triggered, but i have wired up mine via D4-D7. So i commented out the new stuff and it worked well again! Is there a configuration option for that?

/*#if ENABLED(DOGLCD)

  #if ENABLED(U8GLIB_ST7920)
    #define LCD_PINS_RS     56 //CS chip select /SS chip slave select
    #define LCD_PINS_ENABLE 51 //SID (MOSI)
    #define LCD_PINS_D4     52 //SCK (CLK) clock
    #define SD_DETECT_PIN 35
  #endif

#else*/

  #define LCD_PINS_RS 32
  #define LCD_PINS_ENABLE 31
  #define LCD_PINS_D4 14
  #define LCD_PINS_D5 30
  #define LCD_PINS_D6 39
  #define LCD_PINS_D7 15

  #define SHIFT_CLK 43
  #define SHIFT_LD 35
  #define SHIFT_OUT 34
  #define SHIFT_EN 44

  #define SD_DETECT_PIN 56 // Megatronics v3.1 only

//#endif
Confirmed !

All 18 comments

Yes!
You have a REPRAP_DISCOUNT_SMART_CONTROLLER - not a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

I have the same problem. And i'm sure i have the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

The double enable check make no sense. The comment says "IMPORTANT NOTE: The U8glib library is required for Full Graphic Display!" So if you have DOGLCD is enable U8GLIB_ST7920 is enabled too otherwise you got no Pins defined.

I propose:

#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
  #define LCD_PINS_RS     56 //CS chip select /SS chip slave select
  #define LCD_PINS_ENABLE 51 //SID (MOSI)
  #define LCD_PINS_D4     52 //SCK (CLK) clock
  #define SD_DETECT_PIN 35
#else
  #define LCD_PINS_RS 32
  #define LCD_PINS_ENABLE 31
  #define LCD_PINS_D4 14
  #define LCD_PINS_D5 30
  #define LCD_PINS_D6 39
  #define LCD_PINS_D7 15

  #define SHIFT_CLK 43
  #define SHIFT_LD 35
  #define SHIFT_OUT 34
  #define SHIFT_EN 44

  #define SD_DETECT_PIN 56 // Megatronics v3.1 only
#endif

Maybe @brupje from reprapworld can check if this works for him too

So if you have DOGLCD is enable U8GLIB_ST7920 is enabled too otherwise you got no Pins defined

It's the other way around. If U8GLIB_ST7920 is defined also DOGLCD is defined. But there are several possibilities to define DOGLCD without U8GLIB_ST7920.

The #else seems to be at the wrong #if level.
This could be about right

@@ -111,28 +111,26 @@
   #if ENABLED(U8GLIB_ST7920)
     #define LCD_PINS_RS     56 //CS chip select /SS chip slave select
     #define LCD_PINS_ENABLE 51 //SID (MOSI)
     #define LCD_PINS_D4     52 //SCK (CLK) clock
     #define SD_DETECT_PIN 35
+  #else
+    #define LCD_PINS_RS 32
+    #define LCD_PINS_ENABLE 31
+    #define LCD_PINS_D4 14
+    #define LCD_PINS_D5 30
+    #define LCD_PINS_D6 39
+    #define LCD_PINS_D7 15
+
+    #define SHIFT_CLK 43
+    #define SHIFT_LD 35
+    #define SHIFT_OUT 34
+    #define SHIFT_EN 44
+
+    #define SD_DETECT_PIN 56 // Megatronics v3.1 only
   #endif

-#else
-
-  #define LCD_PINS_RS 32
-  #define LCD_PINS_ENABLE 31
-  #define LCD_PINS_D4 14
-  #define LCD_PINS_D5 30
-  #define LCD_PINS_D6 39
-  #define LCD_PINS_D7 15
-  
-  #define SHIFT_CLK 43
-  #define SHIFT_LD 35
-  #define SHIFT_OUT 34
-  #define SHIFT_EN 44
-
-  #define SD_DETECT_PIN 56 // Megatronics v3.1 only
-
 #endif

 // Buttons are directly attached using keypad
 #define BTN_EN1 44
 #define BTN_EN2 45

A similar change is needed in pins_MINITRONICS.h

The code @AnHardt does not work iether because the conditions_lcd file give the following code:

  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
    #define DOGLCD
    #define U8GLIB_ST7920
    #define REPRAP_DISCOUNT_SMART_CONTROLLER
  #endif

This way the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER still gets the wrong pinout

With my code i get the bootscreen and then nothing... So the display works. The serial output is normal.

@fabtopia Does having an SD card inserted have any effect on the screen not showing anything after the bootscreen?

No it does not but i mis the sdcard ok at the end of the serial boot info.

When i recommend the define SDSUPPORT the screen is going on and of and the serial bootinfo gets in a loop:

echo:Filament settings: Disabled
echo:  M200 D3.00
echo:  M200 D0
echo:Z-Probe Offset (mm):
echo:  M851 Z0.00
start
echo:Marlin 1.1.0-RC7
echo: Last Updated: 2016-07-26 12:00 | Author: (iTopia, Pandora)
Compiled: Jul 28 2016
echo: Free Memory: 4253  PlannerBufferBytes: 1232

Hmm. So turning off SDSUPPORT seems to be causing continuous rebooting. Are you using a Megatronics version 3.0 or 3.1?

I have Megetronics 3.0, but i did not checked the SD functionality yet.

I have tested RC7 against Megatronics, RAMPS and Minitronics with the ReprapWorld Graphical LCD and found it to be working ok. Also disabling SDSUPPORT with or without LCD on megatronics 3 does not seem to cause any problems.

I have a Megatronics 3.0 but used the on board card reader of the R_D_F_G_S_C with RC3 and RC6 with success. I will try to disconnect the SD pins

I will open a new issue. because when i comment the R_D_F_G_S-C and the SDSUPPORT, the Board will still reboot and reboot. Even if i disconnect de display.

@fabtopia Keep using RCBugFix going forward, as we're continuing to patch stuff as we find it.

So what happend here?

I made a wire failure after some testing without display and connecting it back on. So no new issue will be opened.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manianac picture manianac  路  4Comments

Kaibob2 picture Kaibob2  路  4Comments

Glod76 picture Glod76  路  3Comments

ShadowOfTheDamn picture ShadowOfTheDamn  路  3Comments

Bobsta6 picture Bobsta6  路  3Comments