Welcome! Log In Create A New Profile

Advanced

LCD12864 startup issues

Posted by Schild0r 
LCD12864 startup issues
July 07, 2019 06:25AM
Hey there I recently wanted to switch my LCD2004 for a LCD12864.

But after swapping them and adjusting everything in Marlin I noticed that the buzzer is making quite an unpure noise
which is not the same as the tone I got from the LCD2004 buzzer but more a squeaking (sounds just like coil whine from, a graphics card).
Also the screen shows a weird image before displaying the Marlin bootlogo:


Note that after that everythings just normal after startup (normal info screen and everything AND the buzzer is making the correct sound when I press "Load Settings" or something like that)

I am using the SKR1.3 Board btw.

Can anyone help me please figure out how I can fix this startup behaviour?
Thanks in advance
Re: LCD12864 startup issues
July 07, 2019 06:56AM
32bit boards talk to fast to some lcd controllers (not all GLCD's are equal)

play with ST7920_DELAY_1 ST7920_DELAY_2 and ST7920_DELAY_3

add to configuration.h

#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)

and up the numbers till it works
Re: LCD12864 startup issues
July 07, 2019 07:43AM
Quote
Dust
32bit boards talk to fast to some lcd controllers (not all GLCD's are equal)

play with ST7920_DELAY_1 ST7920_DELAY_2 and ST7920_DELAY_3

add to configuration.h

#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)

and up the numbers till it works

Can you tell me what each value will do?

I upped the values to
#define ST7920_DELAY_1 DELAY_NS(10000)
#define ST7920_DELAY_2 DELAY_NS(20000)
#define ST7920_DELAY_3 DELAY_NS(30000)

but it still does not work... how much would you expect I'd have increase the values?

Edited 1 time(s). Last edit at 07/07/2019 07:44AM by Schild0r.
Re: LCD12864 startup issues
July 08, 2019 05:00PM
So I tested the Display on an MKS Gen L with Marlin 1.1.9 and it worked fine

I also measured the duration of the whining noise (<1.5s) and then set the Delays to
#define ST7920_DELAY_1 DELAY_MS(1500) //Note: that is MS -> Milliseconds
#define ST7920_DELAY_2 DELAY_MS(1500)
#define ST7920_DELAY_3 DELAY_MS(1500)

I also set it to every preset delay I could find in Marlin

The LCD2004 makes the same noise on the skr1.3 btw but it won't show bullsht at startup

but it made no difference

Edited 1 time(s). Last edit at 07/09/2019 03:03AM by Schild0r.
Re: LCD12864 startup issues
July 15, 2019 03:03PM
FWIW - I get the same garbage displayed on my RRDFGSC connected to the SKR V1.3 running Marlin bugfix-2.0.x and it works fine once fully booted. I did not alter any of the timing settings and am using the longer cables. The display worked w/o any issues when connected to an Arduino/Ramps setup so it's either the current version of Marlin or the H/W.

Oddly, the garbage on the display does not always show up when doing a board reset so it's probably just a timing issue when the H/W is waking up.
Re: LCD12864 startup issues
July 15, 2019 04:55PM
All 12864-based GLCDs should be equal, because they all use the ST7920 chip, except the Viki2 which uses a different chip.

It could be a hardware issue. The specification of the ST7920 chip used in 12864 displays specifies the minimum input high voltage as 0.7Vdd, which is 3.5V when the device is powered from 5V. That's why on the Duet Maestro, we level-shift the 12864 SPI signals from the 3.3V output of the chip to 5V. Some other 32-bit boards I have looked at don't level-shift those signals, so they drive the ST7920 chip at 3.3V, which is out of specification. I have heard of users getting this arrangement to work if the cable length is short and the clock speed is reduced.

You should be able to tell from the schematic of your controller board whether it level-shifts the clock and data signals to the 12864 display, or not.

EDIT: if the problem only ever occurs at startup, then it cold be an issue with initialisation timing. It's advisable for the firmware to clear the alpha RAM before switching into graphics mode, and the command to clear the alpha RAM take quite a long time to execute (1.6ms according to the datasheet).

Edited 3 time(s). Last edit at 07/15/2019 05:03PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login