MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.22k stars 19.22k forks source link

LCD IMAGE STUCK #2909

Closed schirrel closed 8 years ago

schirrel commented 8 years ago

I was using the old 1.0 firmware and just uncommented REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and changed the pins of the u8g lcd and it worked, now i uncomment and change but it get stuck in this image imag0629

KiteLab commented 8 years ago

Looking at the picture, that Marlin can't be that old. And of course its not 1.0.

Marlins own device for the ST7920 has, in some aspects, a relative aggressive timing. You could try the u8glibs original device

U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // original u8glib device

instead.

schirrel commented 8 years ago

the picture is of the 1.1 version that i'm trying, now, for the first time to use, i have used the old one with no problem. In fact it's SSD1306, i'm using it with U8GLIB_SSD1306_128X64 u8g(19, 18, 16, 17); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9 because it's a generic one, not the properly;

schirrel commented 8 years ago

I tried using the ST7920 you said, didn't works :/

KiteLab commented 8 years ago

If you did not use U8GLIB_ST7920_128X64_RRD u8g(0); before, it can not work.

I made a wrong suggestion because

... just uncommented REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and changed the pins of the u8g lcd and it worked, ...

does not include changing the device.

schirrel commented 8 years ago

i was talking about the 1.0 version of marlin where i just change it and worked, i was asking if it is need another change

schirrel commented 8 years ago

what i mean is, the info screen not appears, if i comment #define SHOW_BOOTSCREEN it will be black, nothign shows up

KiteLab commented 8 years ago

Not as far as i know. But my knowledge is limited to about one year back, and 1.0 was in use before that

Is that step in the colour of your photo visible with the naked eye or a problem introduced by taking the picture? In the first case i'd look for changes in u8glib

schirrel commented 8 years ago

Yeah, the oled has two colors, the seller send me the wrong one, but was ebay so... I tried in one of those lcd ith encoder, that one everyone uses, and it works normal, but when i put the oled it freezes at the boot screen and don't goes to the info :/

KiteLab commented 8 years ago

When you can see the bootscreen - can you communicate with Marlin via USB? I try to find out if Marlin hangs, or if only the display content is not updated.

schirrel commented 8 years ago

the printer responds, just isn't passing image to the display

schirrel commented 8 years ago

i tried to change the bootscreen. i commented

u8g.firstPage();
    do {
      if (show_bootscreen) {
        u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
        lcd_setFont(FONT_MENU);
        #ifndef STRING_SPLASH_LINE2
          u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
        #else
          int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1) * DOG_CHAR_WIDTH) / 2;
          u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT * 3 / 2, STRING_SPLASH_LINE1);
          u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT * 1 / 2, STRING_SPLASH_LINE2);
        #endif

      }
    } while (u8g.nextPage());

and add lcd_implementation_status_screen (); but it get stucks in this: imag0635

KiteLab commented 8 years ago

Ah ja. What we see is the first 1/8 of the status-screen. That's exactly what you can see without the

u8g.firstPage();
    do {
...
    } while (u8g.nextPage());

loop.

lcd_implementation_status_screen() is normally called from ultralcd.cpp around line 1714 (search for firstPage()). The actual call is a bit hidden in (*currentMenu)();

Place some debug output

SERIAL_ECHO("before DOGLCD");
SERIAL_ECHO("in DOGLCD");
SERIAL_ECHO("in lcdDrawUpdate");
SERIAL_ECHO("in loop");

Hopefully we can see than, where the problem is.

thinkyhead commented 8 years ago

Any progress here?

schirrel commented 8 years ago

HI, i'm gonna work with this today again, i havent make what kitelab purpose but i'm i'm about to

schirrel commented 8 years ago

@ KiteLab and @thinkyhead it goes:

> before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
before DOGLCD
in DOGLCD
in lcdDrawUpdate
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop

i think that the right way, but keeps stucked

schirrel commented 8 years ago

I thought that it may was repeating the bootscrean, but it only happens once, i use and serial echo too. I think that may be something between the bootscreen and the end of it

Blue-Marlin commented 8 years ago

If that output is repeated in a loop it's not Marlin but somewhere in the u8glib. If it stops, remove the debug output, run it again and post the last messages you can see on the console. Do you have the alive-dot in the lower right corner?

schirrel commented 8 years ago

Hy @Blue-Marlin i see no alive-dot sadly.

schirrel commented 8 years ago

@Blue-Marlin also, about :

If that output is repeated in a loop it's not Marlin but somewhere in the u8glib.

The lcd worked at previously version of marlin

schirrel commented 8 years ago

@Blue-Marlin @thinkyhead and @KiteLab if you dont define SHOW_BOOTSCREEN in a normal screen( what i don't have to test) it work normally? Because, the bootscreen works here, i can put whatever, basically the moment it ends that the screen stop to get info, or something like it.

jbrazio commented 8 years ago

Thank you for your interest making Marlin better and reporting this issue but this topic has been open for a long period of time without any further development. Marlin has been under heavy development for the past couple of months and moving to it's last mile to finish the RC cycle and release Marlin v1.1.0. We suggest you to try out the latest RCBugfix branch and reopening this issue if required.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.