Results 11 to 20 of 25
Thread: Garbled LCD screens
-
08-22-2014, 01:20 PM #11
-
08-22-2014, 03:01 PM #12
Aw, man. I guess I should have known better than to gloss over details. State of the RS (register select) pin when the E pin is strobed is how the LCD module differentiates commands from data. At the start of the initialization sequence the LCD module doesn't know if the transfers will be 4-bit or 8-bit, but the first commands used only have four valid bits, and the others are don't care. So, the multiple-nibble synchronization problem can't occur on those first commands.
EDIT: I'd summarize the interface these modules have as fairly clunky by today's standards. I don't know how long the interface has been out there - I bought my first module off the surplus market in 2004, so I'm guessing it's been out there 15 years or so.Last edited by printbus; 08-24-2014 at 03:21 AM.
-
08-22-2014, 04:21 PM #13
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
I think much older than that. Being an old git my mind is unclear but I am sure I remember using a Z80 to talk to them possible as early as 1980.
-
08-22-2014, 05:00 PM #14
Last edited by printbus; 08-24-2014 at 03:21 AM.
-
08-22-2014, 05:34 PM #15
Looking good. Should someone want to add the display auto-recovery, here's the change. In file ultralcd.cpp, look for...
Code:#ifdef ULTIPANEL static void lcd_return_to_status() { encoderPosition = 0; currentMenu = lcd_status_screen; }
Code:#ifdef ULTIPANEL static void lcd_return_to_status() { encoderPosition = 0; currentMenu = lcd_status_screen; lcd_implementation_init(); // added; reinitialize the display module to recover from garbled display mode if happening }
FOLLOWUP COMMENT: Looking into the LCD code some more, I see the same lcd_implementation_init is already included as part of software detecting SD card insertion and removal. That code even has a comment with it that talks about how it is an attempt to recover the display from a possible static discharge. So, for a printer standing around doing nothing, just inserting or removing the SD card will also reinitialize the display module, without having to make this change.
Last edited by printbus; 08-24-2014 at 03:24 AM. Reason: code tags!
-
11-08-2014, 05:08 PM #16
- Join Date
- Nov 2014
- Location
- Kentucky, US
- Posts
- 70
Sorry to bring up an old thread. But I'd like to know how well this fix has worked?I've been fighting this problem for years on other projects.Jim
-
11-08-2014, 05:21 PM #17
I've used the trick maybe twice to recover from a garbled screen since I made the firmware change. Although the screen isn't readable when it occurs, I just hit the button on the smart panel and let Marlin time out and return to the main menu to reinitialize the display interface. I haven't described it in my MakerFarm i3v build thread yet, but I've also added a bezel over the LCD. I learned in other projects a long time ago that having these type of LCDs behind a bezel can do wonders in protecting them from going nuts after inadvertent static discharge.
As I update other projects using the LCDs in 4-bit transfer mode, I'll be looking for ways that I can automatically do the interface reinitialization periodically now that I understand how the data nibbles can get out of sync.
-
12-14-2014, 07:49 AM #18
Evolution of Marlin took a different approach to the garbled LCD screens that negates the need for the fix proposed here. I don't know when it was changed in Marlin, but the Sept 28 2014 MakerFarm dacb fork now calls the lcd_implementation_init() whenever the printer is displaying the status screen and the LCD panel button is pressed. So, the display recovery occurs as soon as you press the button - you don't have to wait for the display to timeout before the LCD interface is reinitialized like my fix did. The additional delay spent reinitializing the interface before the top menu comes up isn't significant.
So, if you get the garbled LCD display on your printer with a fairly current version of Marlin, you can either just press the knob on the panel or you can insert/eject the SD card.Last edited by printbus; 12-14-2014 at 08:05 AM.
-
05-26-2015, 07:10 PM #19
- Join Date
- May 2015
- Posts
- 3
I don't really think that the screen get garbled due to timings or ESD.
I never supposed that anybody could connect something directly to an MCU pin with a half-meter wire, but they did it... And that single thin GND wire (yep, only one of 20 wires is a GND) only aggravates the situation.
This garbling issue can be fixed by adding a serial resistor to each MCU output connected to the LCD. These resistors should be placed as close as possible to the signal source (i.e. to the MCU in our case case) and by routing a reliable ground wire to the LCD board.
But I'm to lazy to do all these things, so I've just cut the LCD cable (there are two cables - one for LCD and power, and another one for SD card) at the mainboard side and solder 47 Ohm resistors there. This appears to be enough to get rid of LCD screen garbling.
lcd1.jpg
-
05-27-2015, 12:33 PM #20
Interesting. Be sure to report back after a while to confirm whether or not the series termination resistors solved your garbled display problem. I'd try the fix myself, but I've eliminated the nibble transfer display as part of migrating to Smoothieboard on my i3v.
Technically, the bulk of the benefit is likely obtained by adding the termination resistor in the E signal line to the display. IIRC, that is the signal that is pulsed to latch each nibble data transfer into the display module. Ringing on any other pins likely wouldn't matter as long as they're stable when the E pin is pulsed, but there's no reason the termination can't be added in all the data lines. Also note that some of the data lines (encoder, SD reader) on the two cables are driven by the smartpanel and not the ATMEGA2560.
I don't really think that the screen get garbled due to timings or ESD.Last edited by printbus; 05-29-2015 at 11:24 AM.
Ender 3v2 poor printing quality
10-28-2024, 09:08 AM in Tips, Tricks and Tech Help