12864 lcd erratic pixel problems
August 29, 2019 12:35PM
I am running a Melzi board on my printer and am experiencing display issues. I have three “identical” reprap full graphic boards; one works great but the other two display odd pixels on the screen. The stray pixels are random, but I can’t get them to disappear, except on one of them. I tried different cables, but nothing works. Running marlin bug fix 1.1.1.
Anything else I could look at? Thanks.
Attachments:
open | download - 11AC2EC3-DAFD-4530-BB54-6416AD13787A.jpeg (879.2 KB)
Re: 12864 lcd erratic pixel problems
August 29, 2019 03:55PM
I have a 2004LCD this has 20X4 lines I have noticed that if I increase the number on characters in the line below I get garbage on the 2004LCD Display panel.

#define CUSTOM_MACHINE_NAME "HicRed v1.1.5" // Note that I have 13 characters on this line if I and a 14th the display data will wrap and display garbage.

This may or may not be what is causing yours display garbage, thought this could be tested on your display.


Computer Programmer / Electronics Technician
Re: 12864 lcd erratic pixel problems
August 29, 2019 04:16PM
Good thought, but the problem shows up on two displays but not the third one. So my guess is that it has something to do with the actual display.
Re: 12864 lcd erratic pixel problems
August 30, 2019 01:40AM
It may be electromagnetic interference. It may be a quality problem with a cheap Chinese knock-off. I have the same problem with one installed on a Folger Tech RepRap 2020 i3. I think in my case the cables may be too long. I'll eventually put on some ferrite cores or switch back to the 2004 discount display.
Re: 12864 lcd erratic pixel problems
August 30, 2019 06:16AM
Can you suggest the proper placement for the cores? Which wires might be contributing to this problem?
Re: 12864 lcd erratic pixel problems
September 23, 2019 01:33AM
Same problem as in the above screenshot with two different displays here:
- [www.amazon.de]
- [www.amazon.de]

I bought a second one because I thought it might be the ramps or the arduino. (or some Marlin configuration)

Did anyone find out a solution?
Re: 12864 lcd erratic pixel problems
September 24, 2019 08:59AM
@jefbed any luck with the ferrite?

What I also tried:

- different Ramps-board
- different Arduino-Mega
- different USB-cables for energy

I'm still not sure if Marlin is configured correctly.
@nkuck are the three displays that you tried all the same? Did you try the cables of the working one with one of the non-working displays?
Re: 12864 lcd erratic pixel problems
September 24, 2019 09:15AM
Try the test program no changes needed for a RAMP + GLCD

[github.com]

Buts It more likely to be really crappy screen

Edited 2 time(s). Last edit at 09/24/2019 09:18AM by Dust.
Re: 12864 lcd erratic pixel problems
September 24, 2019 09:43AM
Thanks for that!

The test-programm you linked actually works. What do I do now?
Re: 12864 lcd erratic pixel problems
September 24, 2019 11:48AM
The only adjustment I know of for the glcd in Marlin is timings

In configuration.h add these to override the defaults.

#define ST7920_DELAY_1 DELAY_NS(0)
#define ST7920_DELAY_2 DELAY_NS(0)
#define ST7920_DELAY_3 DELAY_NS(63) // these are the default values for a 16mhz processor (ie a mega2560)

which is used in this bit of code

#define ST7920_SND_BIT \
WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \
WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \
WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \
val <<= 1

which means for each bit that is sent
set the clock pin low and wait delay_1
set the data pin and wait delay_2
set the clock pin high and wait delay_3

but what values might work for your display I don't know (the test code doesn't do it like this at all)

Edited 1 time(s). Last edit at 09/24/2019 11:48AM by Dust.
Re: 12864 lcd erratic pixel problems
September 24, 2019 02:26PM
@Dust Thank you very much. That was exceedingly helpful!

With these delay settings, the visualization is totally correct on my display:

#define ST7920_DELAY_1 DELAY_NS(0)
#define ST7920_DELAY_2 DELAY_NS(0)
#define ST7920_DELAY_3 DELAY_NS(125)

I can increase the third delay further, but if I understand correctly that would decrease the frequency of the display refreshing (?). So I'll stick with the values that work for me. Thank you so much!

On more thing, It might be a good idea to document this somewhere? Where would be the appropriate place?

@nkuck maybe you want to try that? EDIT: Sorry, of course I meant to try the delays, not the documentation ;-)

Edited 1 time(s). Last edit at 09/25/2019 03:12AM by sloth3d.
Re: 12864 lcd erratic pixel problems
September 24, 2019 02:28PM
I will play around with it for a while first.
Sorry, only registered users may post in this forum.

Click here to login