Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U8glib MOD for RepRapDiscount G LCD JHD12864F screen / Ramps 1.4 #5270

Closed
GrevanGER opened this issue Nov 21, 2016 · 10 comments
Closed

U8glib MOD for RepRapDiscount G LCD JHD12864F screen / Ramps 1.4 #5270

GrevanGER opened this issue Nov 21, 2016 · 10 comments

Comments

@GrevanGER
Copy link

Greetings.

As some of you might know, there is a problem with certain versions of the RepRapDiscount Full Graphic Display (RRD FGD for short from here on), since they don't seem to be supported by the default RRD FGD settings.
I have had this exact same issue with 1.0.2 about a year ago, but fergot to file a report about it here since I found something on youtube to solve it and, shame on me, you guys know how it is, once something is running rarely anybody makes the effort to go back here to report how they fixed it. So I figured I#d want to write this up. Even if it just for the case I have to workaround the support problem again in case I should loose my backup files again.

Right now I am running the current RCBugFix version. And since this worked with 1.0.2 as well, I guess that you should be able to use this workaround with most Marlin versions.

So this is what I get when running the default RRD FGD settings by uncommenting

#define DOGLCD

at line 1065 in the Configuration.h
No beeps, no graphic glitches, just a blank screen.
(Beeps and flickering displays indicate, that you might want to check this topic here: #4689)

RDD FGD with default settings

I am not a huge fan of cutting away pin sockets and soldering right away, since the software solution might just be around the corner. So after some research I came across a youtube video with someone discribing the exact same problem that I ran in to with my hardware.
u8glib MOD for G LCD JHD12864F screen + RAMPS 1 4 + Arduino Mega 2560
With that said, all the praise goes to zeeproduction of course, since he was the one who did all the work.

But to sum up his workaround:
All you have to do is to go in to the u8glib library and navigate to:

C:\Users...\Documents\Arduino\libraries\U8glib\examples\GraphicsTest

There you will find an arduino file named "GraphicsTest".
Open it with your favorite text editor and add the following constructor call to the list which begins in line 43 and ends in line 140.

U8GLIB_ST7920_128X64_1X u8g(23, 17, 16); // SPI Com: SCK = en = 23, MOSI = rw = 17, CS = di = 16

Done.

Working RDD FDG

@Kaibob2
Copy link
Contributor

Kaibob2 commented Nov 21, 2016

Only trying to understand:

Isn't DOGLCD automatically defined when uncommenting REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER as display to be used

And how does adding this line to an example file affect Marlin?

I have three RRD FGD from different suppliers and they all worked out of the box.

@GrevanGER
Copy link
Author

Well, my understanding of electronics is not big enough to explain it in english, but the Video explains it pretty Well.

@Kaibob2
Copy link
Contributor

Kaibob2 commented Nov 21, 2016

Hmm, for my understanding this line might be necessary to get the example running, but after flashing Marlin to the Arduino this example sketch is gone. So whatever line was changed in it, it doesn't survive reflashing another sketch to the Arduino. Maybe someone else can clarify this. I really really wonder if this worked for you, but am still glad it did :)

@Blue-Marlin
Copy link
Contributor

If you really want, you can replace

#elif ENABLED(U8GLIB_ST7920)
  //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
  U8GLIB_ST7920_128X64_RRD u8g(0);

with this line.
But i swear you don't want.
The original u8glib device uses a 8-stripe update and can't use fastio. It's at lease 50% slower than ours.

@thinkyhead
Copy link
Member

thinkyhead commented Nov 26, 2016

@Blue-Marlin Does it make sense to add a custom option for JHD12864F display? Is that distinct from the usual REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER?

Or, maybe replace this…

//U8GLIB_ST7920_128X64_RRD u8g(0,0,0);

…with this as the alternative option…

//U8GLIB_ST7920_128X64_RRD u8g(ST7920_CLK_PIN, ST7920_DAT_PIN, ST7920_CS_PIN);

…?

@thinkyhead
Copy link
Member

thinkyhead commented Nov 26, 2016

@GrevanGER Your table indicates the pins are probably correct, at least with RAMPS.

image

So… maybe try this modification in ultralcd_impl_DOGM.h

#elif ENABLED(U8GLIB_ST7920)
  U8GLIB_ST7920_128X64_RRD u8g(ST7920_CLK_PIN, ST7920_DAT_PIN, ST7920_CS_PIN);
  //U8GLIB_ST7920_128X64_RRD u8g(0);

That should be about equivalent to your version, when using REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER.

@OlevP
Copy link

OlevP commented Feb 28, 2017

Hi,
I had the same issue with my Chinese Ramps + RRD Full Graphics LCD (Marlin 1.1.0-RC8) and was banging my head against the wall. It worked perfectly with Repetier so I knew the HW was working and had to be something in Marlin. Found this thread while searching for solution, tried the original suggestion (editing "GraphicsTest"), this did change anything. After I uncommented this in "ultralcd_impl_DOGM.h", the screen started working, although it's ssllooww:
U8GLIB_ST7920_128X64_1X u8g(ST7920_CLK_PIN, ST7920_DAT_PIN, ST7920_CS_PIN);

@thinkyhead's suggestion in previous post causes a compile error. As much as I understand U8GLIB_ST7920_128X64_RRD expects a single argument, but this provides 3.

Slow screen is much better than a blank one in my books, but I wouldn't mind getting it working with the faster option and I would be willing to spend some time on this. Unfortunately my programming skills are on elementary level and I don't know much about how LCDs work...

@thinkyhead
Copy link
Member

U8GLIB_ST7920_128X64_RRD expects a single argument

Ah. Then your U8GLIB_ST7920_128X64_1X is closer to the mark. Perhaps we need to supply an advanced flag in Configuration_adv.h for this crop of RRDFGSC units. We might take a look at Repetier-Firmware also to see what their special mojo is.

@OlevP
Copy link

OlevP commented Mar 4, 2017

After living with this solution now for a few days, it's not unbearably slow and has worked without hiccups, so I'm happy. Probably about the same as in Repetier, I guess Repetier uses the same U8glib standard WoW , and not the U8GLIB_ST7920_128X64_RRD that is created in Marlin (which seems not to work with my display and some others).

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants